aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Stephani2017-03-25 13:04:13 +0100
committerPhilipp Stephani2017-03-25 13:04:13 +0100
commit1531c3c9f2844ba992f02ec62cc57f782d073c65 (patch)
tree67fc6e86051310072a0abe63b394fdf294763c1d
parentef443467826dc33c6e58081e7af7c68905f6db26 (diff)
downloademacs-1531c3c9f2844ba992f02ec62cc57f782d073c65.tar.gz
emacs-1531c3c9f2844ba992f02ec62cc57f782d073c65.zip
Use a named function for 'safe-local-variable
This improves the help screen for `version-control' (Bug#25431). * lisp/files.el (version-control-safe-local-p): New function. (version-control): Use it.
-rw-r--r--lisp/files.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 0a023a88b10..b4872e46b01 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -279,8 +279,13 @@ The value `never' means do not make them."
279 (const :tag "If existing" nil) 279 (const :tag "If existing" nil)
280 (other :tag "Always" t)) 280 (other :tag "Always" t))
281 :group 'backup) 281 :group 'backup)
282
283(defun version-control-safe-local-p (x)
284 "Return whether X is safe as local value for `version-control'."
285 (or (booleanp x) (equal x 'never)))
286
282(put 'version-control 'safe-local-variable 287(put 'version-control 'safe-local-variable
283 (lambda (x) (or (booleanp x) (equal x 'never)))) 288 #'version-control-safe-local-p)
284 289
285(defcustom dired-kept-versions 2 290(defcustom dired-kept-versions 2
286 "When cleaning directory, number of versions to keep." 291 "When cleaning directory, number of versions to keep."