1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00

Prefer defcustom :local specifier in allout

* lisp/allout-widgets.el (allout-widgets-track-decoration):
* lisp/allout.el (allout-inhibit-auto-fill)
(allout-inhibit-auto-fill-on-headline, allout-use-hanging-indents)
(allout-reindent-bodies, allout-show-bodies, allout-header-prefix)
(allout-primary-bullet, allout-plain-bullets-string)
(allout-distinctive-bullets-string, allout-old-style-prefixes)
(allout-stylish-prefixes, allout-numbered-bullet)
(allout-presentation-padding, allout-encrypt-unencrypted-on-saves)
(allout-enable-file-variable-adjustment): Prefer defcustom :local
specifier to using 'make-variable-buffer-local' directly.
This commit is contained in:
Stefan Kangas 2024-10-01 23:40:56 +02:00
parent bf3129d582
commit df8d8a786f
2 changed files with 16 additions and 18 deletions

View File

@ -275,8 +275,8 @@ buffer rather than as a prevailing configuration (but it's handy
to publicize it by making it a customization variable)." to publicize it by making it a customization variable)."
:version "24.1" :version "24.1"
:type 'boolean :type 'boolean
:local t
:group 'allout-widgets-developer) :group 'allout-widgets-developer)
(make-variable-buffer-local 'allout-widgets-track-decoration)
;;;_ : Mode context - variables, hookup, and hooks ;;;_ : Mode context - variables, hookup, and hooks
;;;_ . internal mode variables ;;;_ . internal mode variables

View File

@ -382,23 +382,23 @@ value that `normal-auto-fill-function', if any, when allout mode starts, or
else allout's special hanging-indent maintaining auto-fill function, else allout's special hanging-indent maintaining auto-fill function,
`allout-auto-fill'." `allout-auto-fill'."
:type 'boolean :type 'boolean
:local t
:group 'allout) :group 'allout)
(make-variable-buffer-local 'allout-inhibit-auto-fill)
;;;_ = allout-inhibit-auto-fill-on-headline ;;;_ = allout-inhibit-auto-fill-on-headline
(defcustom allout-inhibit-auto-fill-on-headline nil (defcustom allout-inhibit-auto-fill-on-headline nil
"If non-nil, auto-fill will be inhibited while on topic's header line." "If non-nil, auto-fill will be inhibited while on topic's header line."
:version "24.1" :version "24.1"
:type 'boolean :type 'boolean
:local t
:group 'allout) :group 'allout)
(make-variable-buffer-local 'allout-inhibit-auto-fill-on-headline)
;;;_ = allout-use-hanging-indents ;;;_ = allout-use-hanging-indents
(defcustom allout-use-hanging-indents t (defcustom allout-use-hanging-indents t
"If non-nil, topic body text auto-indent defaults to indent of the header. "If non-nil, topic body text auto-indent defaults to indent of the header.
I.e., it is indented to be just past the header prefix. This is I.e., it is indented to be just past the header prefix. This is
relevant mostly for situations where auto-fill occurs." relevant mostly for situations where auto-fill occurs."
:type 'boolean :type 'boolean
:local t
:group 'allout) :group 'allout)
(make-variable-buffer-local 'allout-use-hanging-indents)
;;;###autoload ;;;###autoload
(put 'allout-use-hanging-indents 'safe-local-variable #'booleanp) (put 'allout-use-hanging-indents 'safe-local-variable #'booleanp)
;;;_ = allout-reindent-bodies ;;;_ = allout-reindent-bodies
@ -414,9 +414,9 @@ A value of t enables reindent in non-programming-code buffers, ie
those that do not have the variable `comment-start' set. A value of those that do not have the variable `comment-start' set. A value of
`force' enables reindent whether or not `comment-start' is set." `force' enables reindent whether or not `comment-start' is set."
:type '(choice (const nil) (const t) (const text) (const force)) :type '(choice (const nil) (const t) (const text) (const force))
:local t
:group 'allout) :group 'allout)
(make-variable-buffer-local 'allout-reindent-bodies)
;;;###autoload ;;;###autoload
(put 'allout-reindent-bodies 'safe-local-variable (put 'allout-reindent-bodies 'safe-local-variable
(lambda (x) (memq x '(nil t text force)))) (lambda (x) (memq x '(nil t text force))))
@ -425,8 +425,8 @@ those that do not have the variable `comment-start' set. A value of
(defcustom allout-show-bodies nil (defcustom allout-show-bodies nil
"If non-nil, show entire body when exposing a topic, rather than just the header." "If non-nil, show entire body when exposing a topic, rather than just the header."
:type 'boolean :type 'boolean
:local t
:group 'allout) :group 'allout)
(make-variable-buffer-local 'allout-show-bodies)
;;;###autoload ;;;###autoload
(put 'allout-show-bodies 'safe-local-variable #'booleanp) (put 'allout-show-bodies 'safe-local-variable #'booleanp)
@ -498,8 +498,8 @@ header prefix, which mostly have the value of this var at their front.
Level 1 topics are exceptions. They consist of only a single Level 1 topics are exceptions. They consist of only a single
character, which is typically set to the `allout-primary-bullet'." character, which is typically set to the `allout-primary-bullet'."
:type 'string :type 'string
:local t
:group 'allout) :group 'allout)
(make-variable-buffer-local 'allout-header-prefix)
;;;###autoload ;;;###autoload
(put 'allout-header-prefix 'safe-local-variable #'stringp) (put 'allout-header-prefix 'safe-local-variable #'stringp)
;;;_ = allout-primary-bullet ;;;_ = allout-primary-bullet
@ -515,8 +515,8 @@ with the original Emacs outline mode. See `allout-plain-bullets-string'
and `allout-distinctive-bullets-string' for the range of available and `allout-distinctive-bullets-string' for the range of available
bullets." bullets."
:type 'string :type 'string
:local t
:group 'allout) :group 'allout)
(make-variable-buffer-local 'allout-primary-bullet)
;;;###autoload ;;;###autoload
(put 'allout-primary-bullet 'safe-local-variable #'stringp) (put 'allout-primary-bullet 'safe-local-variable #'stringp)
;;;_ = allout-plain-bullets-string ;;;_ = allout-plain-bullets-string
@ -531,8 +531,8 @@ DO NOT include the close-square-bracket, `]', as a bullet.
Outline mode has to be reactivated in order for changes to the value Outline mode has to be reactivated in order for changes to the value
of this var to take effect." of this var to take effect."
:type 'string :type 'string
:local t
:group 'allout) :group 'allout)
(make-variable-buffer-local 'allout-plain-bullets-string)
;;;###autoload ;;;###autoload
(put 'allout-plain-bullets-string 'safe-local-variable #'stringp) (put 'allout-plain-bullets-string 'safe-local-variable #'stringp)
;;;_ = allout-distinctive-bullets-string ;;;_ = allout-distinctive-bullets-string
@ -579,8 +579,8 @@ adopt changes of this value.
DO NOT include the close-square-bracket, `]', on either of the bullet DO NOT include the close-square-bracket, `]', on either of the bullet
strings." strings."
:type 'string :type 'string
:local t
:group 'allout) :group 'allout)
(make-variable-buffer-local 'allout-distinctive-bullets-string)
;;;###autoload ;;;###autoload
(put 'allout-distinctive-bullets-string 'safe-local-variable #'stringp) (put 'allout-distinctive-bullets-string 'safe-local-variable #'stringp)
@ -646,8 +646,8 @@ like the original Emacs-outline style prefixes.
Whatever the setting of this variable, both old and new style prefixes Whatever the setting of this variable, both old and new style prefixes
are always respected by the topic maneuvering functions." are always respected by the topic maneuvering functions."
:type 'boolean :type 'boolean
:local t
:group 'allout) :group 'allout)
(make-variable-buffer-local 'allout-old-style-prefixes)
;;;###autoload ;;;###autoload
(put 'allout-old-style-prefixes 'safe-local-variable #'booleanp) (put 'allout-old-style-prefixes 'safe-local-variable #'booleanp)
;;;_ = allout-stylish-prefixes -- alternating bullets ;;;_ = allout-stylish-prefixes -- alternating bullets
@ -694,8 +694,8 @@ this variable setting.
The setting of this var is not relevant when `allout-old-style-prefixes' The setting of this var is not relevant when `allout-old-style-prefixes'
is non-nil." is non-nil."
:type 'boolean :type 'boolean
:local t
:group 'allout) :group 'allout)
(make-variable-buffer-local 'allout-stylish-prefixes)
;;;###autoload ;;;###autoload
(put 'allout-stylish-prefixes 'safe-local-variable #'booleanp) (put 'allout-stylish-prefixes 'safe-local-variable #'booleanp)
@ -708,8 +708,8 @@ sequence-number tacked on, just after the bullet. Conventionally set
to \"#\", you can set it to a bullet of your choice. A nil value to \"#\", you can set it to a bullet of your choice. A nil value
disables numbering maintenance." disables numbering maintenance."
:type '(choice (const nil) string) :type '(choice (const nil) string)
:local t
:group 'allout) :group 'allout)
(make-variable-buffer-local 'allout-numbered-bullet)
;;;###autoload ;;;###autoload
(put 'allout-numbered-bullet 'safe-local-variable #'string-or-null-p) (put 'allout-numbered-bullet 'safe-local-variable #'string-or-null-p)
;;;_ = allout-file-xref-bullet ;;;_ = allout-file-xref-bullet
@ -725,9 +725,8 @@ Set this var to the bullet you want to use for file cross-references."
(defcustom allout-presentation-padding 2 (defcustom allout-presentation-padding 2
"Presentation-format white-space padding factor, for greater indent." "Presentation-format white-space padding factor, for greater indent."
:type 'integer :type 'integer
:local t
:group 'allout) :group 'allout)
(make-variable-buffer-local 'allout-presentation-padding)
;;;###autoload ;;;###autoload
(put 'allout-presentation-padding 'safe-local-variable #'integerp) (put 'allout-presentation-padding 'safe-local-variable #'integerp)
@ -809,11 +808,10 @@ text for editing though the file system copy is encrypted.
\(Auto-saves are handled differently. Buffers with plain-text \(Auto-saves are handled differently. Buffers with plain-text
exposed encrypted topics are exempted from auto saves until all exposed encrypted topics are exempted from auto saves until all
such topics are encrypted.)" such topics are encrypted.)"
:type 'boolean :type 'boolean
:local t
:version "23.1" :version "23.1"
:group 'allout-encryption) :group 'allout-encryption)
(make-variable-buffer-local 'allout-encrypt-unencrypted-on-saves)
(defvar allout-auto-save-temporarily-disabled nil (defvar allout-auto-save-temporarily-disabled nil
"Non-nil while topic encryption is pending and auto-saving was active. "Non-nil while topic encryption is pending and auto-saving was active.
@ -842,8 +840,8 @@ is nil.
Operations potentially causing edits include allout encryption routines. Operations potentially causing edits include allout encryption routines.
For details, see `allout-toggle-current-subtree-encryption's docstring." For details, see `allout-toggle-current-subtree-encryption's docstring."
:type 'boolean :type 'boolean
:local t
:group 'allout) :group 'allout)
(make-variable-buffer-local 'allout-enable-file-variable-adjustment)
;;;_* CODE -- no user customizations below. ;;;_* CODE -- no user customizations below.