emacs-devel
[Top][All Lists]
Advanced

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

What if backup-enable-predicate is nil?


From: Juanma Barranquero
Subject: What if backup-enable-predicate is nil?
Date: Thu, 4 Jan 2007 18:27:41 +0100

ELISP> (let ((backup-enable-predicate nil))
        (find-file-noselect "~/.emacs.el"))
*** Eval error ***  Symbol's function definition is void: nil

which makes sense, but the docstring for `backup-enable-predicate'
does not imply that it couldn't be nil.

Perhaps the following patch should be committed (or the docstring for
`backup-enable-predicate' clarified).

                   /L/e/k/t/u



Index: lisp/files.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/files.el,v
retrieving revision 1.875
diff -u -2 -r1.875 files.el
--- lisp/files.el       2 Jan 2007 01:26:20 -0000       1.875
+++ lisp/files.el       4 Jan 2007 17:22:00 -0000
@@ -1651,5 +1651,6 @@
      ;; Turn off backup files for certain file names.  Since
      ;; this is a permanent local, the major mode won't eliminate it.
-      (and (not (funcall backup-enable-predicate buffer-file-name))
+      (and backup-enable-predicate
+          (not (funcall backup-enable-predicate buffer-file-name))
           (progn
             (make-local-variable 'backup-inhibited)
@@ -2905,4 +2906,5 @@
  ;; Since this is a permanent local, the major mode won't eliminate it.
  (and buffer-file-name
+       backup-enable-predicate
       (not (funcall backup-enable-predicate buffer-file-name))
       (progn




reply via email to

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