From: Philipp Stephani Date: Sat, 25 Mar 2017 12:04:13 +0000 (+0100) Subject: Use a named function for 'safe-local-variable X-Git-Tag: emacs-26.0.90~522^2~44 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1531c3c9f2844ba992f02ec62cc57f782d073c65;p=emacs.git 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. --- 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." (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."