mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-23 07:18:53 +00:00
org-num-skip-tags: Avoid using function that is not pre-loaded in autoloads
* lisp/org-num.el (org-num-skip-tags): Make sure that function used for :safe `defcustom' slot does not require functions that are not defined in org-loaddefs.el. This is because `org-num-skip-tags' is autoloaded and cannot rely upon requires in org-num.el. Instead, it may only use pre-loaded functions and other autoloaded Org mode functions. Reported-by: Eli Zaretskii <eliz@gnu.org> Link: https://yhetil.org/emacs-devel/868qzd9hjg.fsf@gnu.org/
This commit is contained in:
parent
4bb0719374
commit
bd8b861ee9
@ -251,6 +251,17 @@ removed."
|
||||
default)))
|
||||
": ")))
|
||||
|
||||
(if (fboundp 'list-of-strings-p)
|
||||
(defalias 'org-list-of-strings-p #'list-of-strings-p)
|
||||
;; From Emacs subr.el.
|
||||
;;;###autoload
|
||||
(defun org-list-of-strings-p (object)
|
||||
"Return t if OBJECT is nil or a list of strings."
|
||||
(declare (pure t) (side-effect-free error-free))
|
||||
(while (and (consp object) (stringp (car object)))
|
||||
(setq object (cdr object)))
|
||||
(null object)))
|
||||
|
||||
|
||||
;;; Emacs < 27.1 compatibility
|
||||
|
||||
|
@ -144,7 +144,7 @@ control tag inheritance."
|
||||
:group 'org-appearance
|
||||
:package-version '(Org . "9.3")
|
||||
:type '(repeat (string :tag "Tag"))
|
||||
:safe (lambda (val) (and (listp val) (cl-every #'stringp val))))
|
||||
:safe #'org-list-of-strings-p)
|
||||
|
||||
;;;###autoload
|
||||
(defcustom org-num-skip-unnumbered nil
|
||||
|
Loading…
Reference in New Issue
Block a user