emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/files.el,v


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/files.el,v
Date: Sun, 17 Dec 2006 18:03:09 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Richard M. Stallman <rms>       06/12/17 18:03:09

Index: files.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/files.el,v
retrieving revision 1.868
retrieving revision 1.869
diff -u -b -r1.868 -r1.869
--- files.el    11 Dec 2006 04:40:41 -0000      1.868
+++ files.el    17 Dec 2006 18:03:09 -0000      1.869
@@ -2141,6 +2141,7 @@
 
 If FUNCTION is nil, then it is not called.  (That is a way of saying
 \"allow `auto-mode-alist' to decide for these files.\")")
+(put 'magic-mode-alist 'risky-local-variable t)
 
 (defvar magic-mode-regexp-match-limit 4000
   "Upper limit on `magic-mode-alist' regexp matches.")
@@ -3228,6 +3229,12 @@
       (if (string-match (car elt) file)
          (setq backup-directory (cdr elt)
                alist nil)))
+    ;; If backup-directory is relative, it should be relative to the
+    ;; file's directory.  By expanding explicitly here, we avoid
+    ;; depending on default-directory.
+    (if backup-directory
+       (setq backup-directory (expand-file-name backup-directory
+                                                (file-name-directory file))))
     (if (and backup-directory (not (file-exists-p backup-directory)))
        (condition-case nil
            (make-directory backup-directory 'parents)




reply via email to

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