From 04d807e6ceccc7a1e8c0ab5e8914183bfe6dc5d8 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 1 Apr 1998 03:44:50 +0000 Subject: [PATCH] (hack-one-local-variable): Variables named ...-predicate are treated as risky. (write-file): Omit directory part when making default file name. --- lisp/files.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 1790e1d194d..439b2c03829 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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 -- 2.39.2