emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 1531c3c: Use a named function for 'safe-local-varia


From: Philipp Stephani
Subject: [Emacs-diffs] master 1531c3c: Use a named function for 'safe-local-variable
Date: Sat, 25 Mar 2017 08:06:08 -0400 (EDT)

branch: master
commit 1531c3c9f2844ba992f02ec62cc57f782d073c65
Author: Philipp Stephani <address@hidden>
Commit: Philipp Stephani <address@hidden>

    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.
---
 lisp/files.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/files.el b/lisp/files.el
index 0a023a8..b4872e4 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."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]