diff options
author | Stefan Kangas <stefan@marxist.se> | 2022-07-06 19:56:32 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2022-07-06 20:50:42 +0200 |
commit | 3e7f6ff4b09760c92b1a6b1a193d08c52f37675a (patch) | |
tree | 8aaa2d68eb42053c4aa5e37aa622d97de3e648be /lisp/emacs-lisp | |
parent | 5866fd5fecd93116f0885f55887a449d739c369c (diff) | |
download | emacs-3e7f6ff4b09760c92b1a6b1a193d08c52f37675a.tar.gz emacs-3e7f6ff4b09760c92b1a6b1a193d08c52f37675a.tar.bz2 emacs-3e7f6ff4b09760c92b1a6b1a193d08c52f37675a.zip |
Prefer defcustom :safe to putting 'safe-local-variable'
* lisp/emacs-lisp/lisp-mode.el (lisp-indent-offset)
(lisp-body-indent, emacs-lisp-docstring-fill-column):
* lisp/files.el (version-control):
* lisp/progmodes/modula2.el (m2-indent):
* lisp/progmodes/octave.el (octave-block-offset):
* lisp/progmodes/sh-script.el (sh-basic-offset):
* lisp/progmodes/tcl.el (tcl-indent-level)
(tcl-continued-indent-level):
* lisp/simple.el (fill-prefix):
* lisp/textmodes/fill.el (colon-double-space):
* lisp/textmodes/paragraphs.el (paragraph-start)
(paragraph-separate, sentence-end-double-space)
(sentence-end-without-period, sentence-end-without-space)
(sentence-end, sentence-end-base, page-delimiter)
(paragraph-ignore-fill-prefix):
* lisp/textmodes/tex-mode.el (tex-fontify-script):
* lisp/vc/add-log.el (add-log-dont-create-changelog-file):
* lisp/vc/vc-hooks.el (vc-follow-symlinks): Prefer defcustom :safe to
putting 'safe-local-variable'.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index c559dd427cb..68528e199f8 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -838,9 +838,8 @@ or to switch back to an existing one." (defcustom lisp-indent-offset nil "If non-nil, indent second line of expressions that many more columns." :group 'lisp - :type '(choice (const nil) integer)) -(put 'lisp-indent-offset 'safe-local-variable - (lambda (x) (or (null x) (integerp x)))) + :type '(choice (const nil) integer) + :safe (lambda (x) (or (null x) (integerp x)))) (defcustom lisp-indent-function 'lisp-indent-function "A function to be called by `calculate-lisp-indent'. @@ -1252,8 +1251,8 @@ Lisp function does not specify a special indentation." (defcustom lisp-body-indent 2 "Number of columns to indent the second line of a `(def...)' form." :group 'lisp - :type 'integer) -(put 'lisp-body-indent 'safe-local-variable 'integerp) + :type 'integer + :safe #'integerp) (defun lisp-indent-specform (count state indent-point normal-indent) (let ((containing-form-start (elt state 1)) @@ -1414,9 +1413,8 @@ Any non-integer value means do not use a different value of `fill-column' when filling docstrings." :type '(choice (integer) (const :tag "Use the current `fill-column'" t)) + :safe (lambda (x) (or (eq x t) (integerp x))) :group 'lisp) -(put 'emacs-lisp-docstring-fill-column 'safe-local-variable - (lambda (x) (or (eq x t) (integerp x)))) (defun lisp-fill-paragraph (&optional justify) "Like \\[fill-paragraph], but handle Emacs Lisp comments and docstrings. |