]> git.eshelyaron.com Git - emacs.git/commitdiff
(hack-one-local-variable): Variables named ...-predicate are treated as risky.
authorRichard M. Stallman <rms@gnu.org>
Wed, 1 Apr 1998 03:44:50 +0000 (03:44 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 1 Apr 1998 03:44:50 +0000 (03:44 +0000)
(write-file): Omit directory part when making default file name.

lisp/files.el

index 1790e1d194d810c97c73b92b8519315853eecf4b..439b2c03829afb3f1bc7bb84f5a025e7bd8f1017 100644 (file)
@@ -1616,7 +1616,7 @@ is specified, returning t if it is specified."
        ;; Likewise for setting hook variables.
        ((or (get var 'risky-local-variable)
             (and
-             (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-command$"
+             (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-command$\\|-predicate$"
                            (symbol-name var))
              (not (get var 'safe-local-variable))))
         ;; Permit evalling a put of a harmless property.
@@ -1789,7 +1789,7 @@ Interactively, confirmation is required unless you supply a prefix argument."
           (read-file-name "Write file: "
                               (cdr (assq 'default-directory
                                          (buffer-local-variables)))
-                              nil nil (buffer-name)))
+                              nil nil (file-name-nondirectory (buffer-name))))
         (not current-prefix-arg)))
   (or (null filename) (string-equal filename "")
       (progn