diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-05-28 21:18:28 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-05-28 21:18:28 +0200 |
commit | dac180ea0d4efa143ea8408cd5a04f7f7da444fe (patch) | |
tree | c073993fa286c0739ff8ad0104dc3a3135a758ce | |
parent | c32938b7fd63328bed55d060f185a0aa56477776 (diff) | |
download | org-mode-dac180ea0d4efa143ea8408cd5a04f7f7da444fe.tar.gz |
org-footnote: Improve :safe values
* lisp/org-footnote.el (org-footnote-auto-label):
(org-footnote-auto-adjust): Use simpler :safe value.
The point of the :safe value is to determine if the variable is safe,
not to check correctness of its value. Besides, lambda functions
appear as the following in *Help* buffer:
This variable is safe as a file local variable if its value
satisfies the predicate which is a byte-compiled expression.
which is not particularly clear. Let's keep :safe values simple.
-rw-r--r-- | lisp/org-footnote.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index d3abe78..119a53a 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -142,8 +142,7 @@ random Automatically generate a unique, random label." (const :tag "Create automatic [fn:N]" t) (const :tag "Offer automatic [fn:N] for editing" confirm) (const :tag "Create a random label" random)) - :safe (lambda (x) - (memq x '(nil t confirm random)))) + :safe #'symbolp) (defcustom org-footnote-auto-adjust nil "Non-nil means automatically adjust footnotes after insert/delete. @@ -162,8 +161,7 @@ The main values of this variable can be set with in-buffer options: (const :tag "Renumber" renumber) (const :tag "Sort" sort) (const :tag "Renumber and Sort" t)) - :safe (lambda (x) - (memq x '(nil renumber sort t)))) + :safe #'symbolp) (defcustom org-footnote-fill-after-inline-note-extraction nil "Non-nil means fill paragraphs after extracting footnotes. |