lisp/org-num.el: Autoload safe variables

* lisp/org-num.el (org-num-face):
(org-num-max-level):
(org-num-skip-commented):
(org-num-skip-footnotes):
(org-num-skip-tags):
(org-num-skip-unnumbered): Autoload variables with :safe
specification.  Without autoloading, if org-num is not loaded,
unexpected warning may be displayed when opening an Org file.

Reported-by: Chang Xiaoduan <drcxd@sina.com>
Link: https://list.orgmode.org/orgmode/87jznf7gqo.fsf@PWRD-20230207OU./
This commit is contained in:
Ihor Radchenko 2024-02-08 16:17:34 +01:00
parent 62956196d0
commit bfc0cb3723
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 6 additions and 0 deletions

View File

@ -83,6 +83,7 @@
;;; Customization ;;; Customization
;;;###autoload
(defcustom org-num-face nil (defcustom org-num-face nil
"Face to use for numbering. "Face to use for numbering.
When nil, use the same face as the headline. This value is When nil, use the same face as the headline. This value is
@ -104,6 +105,7 @@ Any `face' text property on the returned string overrides
:package-version '(Org . "9.3") :package-version '(Org . "9.3")
:type 'function) :type 'function)
;;;###autoload
(defcustom org-num-max-level nil (defcustom org-num-max-level nil
"Level below which headlines are not numbered. "Level below which headlines are not numbered.
When set to nil, all headlines are numbered." When set to nil, all headlines are numbered."
@ -113,6 +115,7 @@ When set to nil, all headlines are numbered."
(integer :tag "Stop numbering at level")) (integer :tag "Stop numbering at level"))
:safe (lambda (val) (or (null val) (wholenump val)))) :safe (lambda (val) (or (null val) (wholenump val))))
;;;###autoload
(defcustom org-num-skip-commented nil (defcustom org-num-skip-commented nil
"Non-nil means commented sub-trees are not numbered." "Non-nil means commented sub-trees are not numbered."
:group 'org-appearance :group 'org-appearance
@ -120,6 +123,7 @@ When set to nil, all headlines are numbered."
:type 'boolean :type 'boolean
:safe #'booleanp) :safe #'booleanp)
;;;###autoload
(defcustom org-num-skip-footnotes nil (defcustom org-num-skip-footnotes nil
"Non-nil means footnotes sections are not numbered." "Non-nil means footnotes sections are not numbered."
:group 'org-appearance :group 'org-appearance
@ -127,6 +131,7 @@ When set to nil, all headlines are numbered."
:type 'boolean :type 'boolean
:safe #'booleanp) :safe #'booleanp)
;;;###autoload
(defcustom org-num-skip-tags nil (defcustom org-num-skip-tags nil
"List of tags preventing the numbering of sub-trees. "List of tags preventing the numbering of sub-trees.
@ -141,6 +146,7 @@ control tag inheritance."
:type '(repeat (string :tag "Tag")) :type '(repeat (string :tag "Tag"))
:safe (lambda (val) (and (listp val) (cl-every #'stringp val)))) :safe (lambda (val) (and (listp val) (cl-every #'stringp val))))
;;;###autoload
(defcustom org-num-skip-unnumbered nil (defcustom org-num-skip-unnumbered nil
"Non-nil means numbering obeys to UNNUMBERED property." "Non-nil means numbering obeys to UNNUMBERED property."
:group 'org-appearance :group 'org-appearance