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.
This commit is contained in:
Philipp Stephani 2017-03-25 13:04:13 +01:00
parent ef44346782
commit 1531c3c9f2

View file

@ -279,8 +279,13 @@ The value `never' means do not make them."
(const :tag "If existing" nil)
(other :tag "Always" t))
:group 'backup)
(defun version-control-safe-local-p (x)
"Return whether X is safe as local value for `version-control'."
(or (booleanp x) (equal x 'never)))
(put 'version-control 'safe-local-variable
(lambda (x) (or (booleanp x) (equal x 'never))))
#'version-control-safe-local-p)
(defcustom dired-kept-versions 2
"When cleaning directory, number of versions to keep."