forked from mirrors/org-mode
org-element: Autoload org-element-use-cache
* lisp/org-element.el (org-element-use-cache): Autoload to silence byte compiler warning in Emacs repo. On Emacs's emacs-29 branch, compiling lisp/org/org-loaddefs.el gives the following warning that stems from an autoloaded defsubst, org-element-at-point-no-context (new to Org 9.6): In org-element-at-point-no-context: org/org-loaddefs.el:846:61: Warning: Unused lexical variable `org-element-use-cache' That doesn't show up in the Org repo because mk/org-fixup.el generates org-loaddefs.el via autoload.el's generate-file-autoloads, which adds "no-byte-compile: t" to its output file. However, in Emacs 29, autoload.el is now deprecated, and the Emacs build uses loaddefs-gen.el's loaddefs-generate--emacs-batch, which does include no-byte-compile.
This commit is contained in:
parent
41a8666c09
commit
2a529ee57b
|
@ -5295,6 +5295,7 @@ indentation removed from its contents."
|
|||
;; `org-element--cache-diagnostics-ring-size', `org-element--cache-map-statistics',
|
||||
;; `org-element--cache-map-statistics-threshold'.
|
||||
|
||||
;;;###autoload
|
||||
(defvar org-element-use-cache t
|
||||
"Non-nil when Org parser should cache its results.")
|
||||
|
||||
|
|
Loading…
Reference in New Issue