From 8f59e8d93f22e080ed1944d893941d9f9cbfbce3 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Thu, 16 Jun 2022 13:10:38 +0800 Subject: [PATCH] Fix native-comp warnings * lisp/org-fold.el (org-fold-show-set-visibility--text-properties): Resolve unused variable warning. * lisp/ob-core.el (org-attach-dir): * lisp/ob-latex.el (org-at-heading-p): (org-back-to-heading): (org-next-visible-heading): * lisp/org.el (org-agenda-todo-yesterday): * lisp/ox-ascii.el (org-at-heading-p): (org-back-to-heading): (org-next-visible-heading): * lisp/ox-html.el (org-at-heading-p): (org-back-to-heading): (org-next-visible-heading): * lisp/ox-icalendar.el (org-at-heading-p): (org-back-to-heading): (org-next-visible-heading): * lisp/ox-latex.el (engrave-faces-latex-gen-preamble-line): (engrave-faces-get-theme): (engrave-faces-latex-output-style): (engrave-faces-current-preset-style): (engrave-faces-latex-mathescape): * lisp/ox-odt.el (org-at-heading-p): (org-back-to-heading): (org-next-visible-heading): * lisp/ox-publish.el (org-at-heading-p): (org-back-to-heading): (org-next-visible-heading): * lisp/ox.el (org-at-heading-p): (org-back-to-heading): (org-next-visible-heading): Add declarations. --- lisp/ob-core.el | 1 + lisp/ob-latex.el | 3 +++ lisp/org-fold.el | 4 +++- lisp/org.el | 1 + lisp/ox-ascii.el | 3 +++ lisp/ox-html.el | 3 +++ lisp/ox-icalendar.el | 3 +++ lisp/ox-latex.el | 6 ++++++ lisp/ox-odt.el | 4 ++++ lisp/ox-publish.el | 3 +++ lisp/ox.el | 3 +++ 11 files changed, 33 insertions(+), 1 deletion(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 6cbd94ef8..1ed20f4c2 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -42,6 +42,7 @@ (defvar org-src-preserve-indentation) (defvar org-babel-tangle-uncomment-comments) +(declare-function org-attach-dir "org-attach" (&optional create-if-not-exists-p no-fs-check)) (declare-function org-at-item-p "org-list" ()) (declare-function org-at-table-p "org" (&optional table-type)) (declare-function org-babel-lob-execute-maybe "ob-lob" ()) diff --git a/lisp/ob-latex.el b/lisp/ob-latex.el index 7253803af..eaa9a9217 100644 --- a/lisp/ob-latex.el +++ b/lisp/ob-latex.el @@ -37,6 +37,9 @@ (declare-function org-latex-compile "ox-latex" (texfile &optional snippet)) (declare-function org-latex-guess-inputenc "ox-latex" (header)) (declare-function org-splice-latex-header "org" (tpl def-pkg pkg snippets-p &optional extra)) +(declare-function org-at-heading-p "org" (&optional _)) +(declare-function org-back-to-heading "org" (&optional invisible-ok)) +(declare-function org-next-visible-heading "org" (arg)) (defvar org-babel-tangle-lang-exts) (add-to-list 'org-babel-tangle-lang-exts '("latex" . "tex")) diff --git a/lisp/org-fold.el b/lisp/org-fold.el index c5542b92e..53420cb07 100644 --- a/lisp/org-fold.el +++ b/lisp/org-fold.el @@ -837,11 +837,13 @@ DETAIL is either nil, `minimal', `local', `ancestors', (let (org-hide-emphasis-markers org-link-descriptive org-pretty-entities - org-hide-macro-markers + (org-hide-macro-markers nil) (region (or (org-find-text-property-region (point) 'org-emphasis) (org-find-text-property-region (point) 'org-macro) (org-find-text-property-region (point) 'invisible) region))) + ;; Silence byte-compiler. + (ignore org-hide-macro-markers) (when region (org-with-point-at (car region) (beginning-of-line) diff --git a/lisp/org.el b/lisp/org.el index 1417fd5f3..7ba9f0e03 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -129,6 +129,7 @@ Stars are put in group 1 and the trimmed body in group 2.") (declare-function isearch-no-upper-case-p "isearch" (string regexp-flag)) (declare-function org-add-archive-files "org-archive" (files)) (declare-function org-agenda-entry-get-agenda-timestamp "org-agenda" (pom)) +(declare-function org-agenda-todo-yesterday "org-agenda" (&optional arg)) (declare-function org-agenda-list "org-agenda" (&optional arg start-day span with-hour)) (declare-function org-agenda-redo "org-agenda" (&optional all)) (declare-function org-agenda-remove-restriction-lock "org-agenda" (&optional noupdate)) diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index 7e68daac7..6fcde013b 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -35,6 +35,9 @@ ;;; Function Declarations (declare-function aa2u "ext:ascii-art-to-unicode" ()) +(declare-function org-at-heading-p "org" (&optional _)) +(declare-function org-back-to-heading "org" (&optional invisible-ok)) +(declare-function org-next-visible-heading "org" (arg)) ;;; Define Back-End ;; diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 81ef002a0..2627b3d70 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -43,6 +43,9 @@ (declare-function org-id-find-id-file "org-id" (id)) (declare-function htmlize-region "ext:htmlize" (beg end)) (declare-function mm-url-decode-entities "mm-url" ()) +(declare-function org-at-heading-p "org" (&optional _)) +(declare-function org-back-to-heading "org" (&optional invisible-ok)) +(declare-function org-next-visible-heading "org" (arg)) (defvar htmlize-css-name-prefix) (defvar htmlize-output-type) diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el index abf31ce65..6e4688119 100644 --- a/lisp/ox-icalendar.el +++ b/lisp/ox-icalendar.el @@ -36,6 +36,9 @@ (require 'org-agenda) (require 'ox-ascii) (declare-function org-bbdb-anniv-export-ical "ol-bbdb" nil) +(declare-function org-at-heading-p "org" (&optional _)) +(declare-function org-back-to-heading "org" (&optional invisible-ok)) +(declare-function org-next-visible-heading "org" (arg)) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index ed985133a..8c43fadad 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -39,6 +39,12 @@ (declare-function engrave-faces-latex-gen-preamble "ext:engrave-faces-latex") (declare-function engrave-faces-latex-buffer "ext:engrave-faces-latex") +(declare-function engrave-faces-latex-gen-preamble-line "ext:engrave-faces-latex") +(declare-function engrave-faces-get-theme "ext:engrave-faces") + +(defvar engrave-faces-latex-output-style) +(defvar engrave-faces-current-preset-style) +(defvar engrave-faces-latex-mathescape) ;;; Define Back-End diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index 9b46f15b5..9d47067f1 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -32,6 +32,10 @@ (require 'ox) (require 'table nil 'noerror) +(declare-function org-at-heading-p "org" (&optional _)) +(declare-function org-back-to-heading "org" (&optional invisible-ok)) +(declare-function org-next-visible-heading "org" (arg)) + ;;; Define Back-End (org-export-define-backend 'odt diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index 86166e94b..09739673e 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -42,6 +42,9 @@ (require 'format-spec) (require 'ox) +(declare-function org-at-heading-p "org" (&optional _)) +(declare-function org-back-to-heading "org" (&optional invisible-ok)) +(declare-function org-next-visible-heading "org" (arg)) ;;; Variables diff --git a/lisp/ox.el b/lisp/ox.el index 3362f2c71..034878c7f 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -86,6 +86,9 @@ (declare-function org-publish-all "ox-publish" (&optional force async)) (declare-function org-publish-current-file "ox-publish" (&optional force async)) (declare-function org-publish-current-project "ox-publish" (&optional force async)) +(declare-function org-at-heading-p "org" (&optional _)) +(declare-function org-back-to-heading "org" (&optional invisible-ok)) +(declare-function org-next-visible-heading "org" (arg)) (defvar org-publish-project-alist) (defvar org-table-number-fraction)