]> git.eshelyaron.com Git - emacs.git/commitdiff
Clean up some safe-local-variable predicates
authorStefan Kangas <stefankangas@gmail.com>
Wed, 30 Aug 2023 17:42:58 +0000 (19:42 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Wed, 30 Aug 2023 17:52:53 +0000 (19:52 +0200)
* lisp/progmodes/project.el: Add comments with a reminder to simplify
'safe-local-variable' predicates when Emacs 28 support is dropped.
(project-vc-ignores): Mark only a list of strings as safe-local.
* lisp/textmodes/reftex-vars.el (reftex-guess-label-type): Use
booleanp for 'safe-local-variable' predicate.  (Bug#65608)

lisp/progmodes/project.el
lisp/textmodes/reftex-vars.el

index 7aaf7a9f9fb30988f7d570f152a32e8317f9b518..37db677943ac11ceaab5b179a859aa559c3f7cdb 100644 (file)
@@ -410,7 +410,8 @@ the buffer's value of `default-directory'."
 (defcustom project-vc-ignores nil
   "List of patterns to add to `project-ignores'."
   :type '(repeat string))
-;;;###autoload(put 'project-vc-ignores 'safe-local-variable #'listp)
+;; Change to `list-of-strings-p' when support for Emacs 28 is dropped.
+;;;###autoload(put 'project-vc-ignores 'safe-local-variable (lambda (val) (and (listp val) (not (memq nil (mapcar #'stringp val))))))
 
 (defcustom project-vc-merge-submodules t
   "Non-nil to consider submodules part of the parent project.
@@ -465,6 +466,7 @@ variables, such as `project-vc-ignores' or `project-vc-name'."
   :type '(repeat string)
   :version "29.1"
   :package-version '(project . "0.9.0"))
+;; Change to `list-of-strings-p' when support for Emacs 28 is dropped.
 ;;;###autoload(put 'project-vc-extra-root-markers 'safe-local-variable (lambda (val) (and (listp val) (not (memq nil (mapcar #'stringp val))))))
 
 ;; FIXME: Using the current approach, major modes are supposed to set
index ebe49ae9fef29270fa23bd55e48e8a876524e991..a153bfb3ec3510218fe1cf0c5fa0c49ba092286a 100644 (file)
@@ -1156,7 +1156,7 @@ immediately offer the correct label menu - otherwise it will prompt you for
 a label type.  If you set this variable to nil, RefTeX will always prompt."
   :group 'reftex-referencing-labels
   :type 'boolean)
-;;;###autoload(put 'reftex-guess-label-type 'safe-local-variable (lambda (x) (memq x '(nil t))))
+;;;###autoload(put 'reftex-guess-label-type 'safe-local-variable #'booleanp)
 
 (defcustom reftex-format-ref-function nil
   "Function which produces the string to insert as a reference.