Mercurial > emacs
comparison lisp/files.el @ 21327:01870b9b4f2a
(hack-one-local-variable): Variables named ...-predicate are treated as risky.
(write-file): Omit directory part when making default file name.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 01 Apr 1998 03:44:50 +0000 |
parents | 4a9b37818fac |
children | f9043d661283 |
comparison
equal
deleted
inserted
replaced
21326:8150549598cc | 21327:01870b9b4f2a |
---|---|
1614 nil) | 1614 nil) |
1615 ;; "Setting" eval means either eval it or do nothing. | 1615 ;; "Setting" eval means either eval it or do nothing. |
1616 ;; Likewise for setting hook variables. | 1616 ;; Likewise for setting hook variables. |
1617 ((or (get var 'risky-local-variable) | 1617 ((or (get var 'risky-local-variable) |
1618 (and | 1618 (and |
1619 (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-command$" | 1619 (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-command$\\|-predicate$" |
1620 (symbol-name var)) | 1620 (symbol-name var)) |
1621 (not (get var 'safe-local-variable)))) | 1621 (not (get var 'safe-local-variable)))) |
1622 ;; Permit evalling a put of a harmless property. | 1622 ;; Permit evalling a put of a harmless property. |
1623 ;; if the args do nothing tricky. | 1623 ;; if the args do nothing tricky. |
1624 (if (or (and (eq var 'eval) | 1624 (if (or (and (eq var 'eval) |
1787 (read-file-name "Write file: " | 1787 (read-file-name "Write file: " |
1788 nil nil nil nil) | 1788 nil nil nil nil) |
1789 (read-file-name "Write file: " | 1789 (read-file-name "Write file: " |
1790 (cdr (assq 'default-directory | 1790 (cdr (assq 'default-directory |
1791 (buffer-local-variables))) | 1791 (buffer-local-variables))) |
1792 nil nil (buffer-name))) | 1792 nil nil (file-name-nondirectory (buffer-name)))) |
1793 (not current-prefix-arg))) | 1793 (not current-prefix-arg))) |
1794 (or (null filename) (string-equal filename "") | 1794 (or (null filename) (string-equal filename "") |
1795 (progn | 1795 (progn |
1796 ;; If arg is just a directory, | 1796 ;; If arg is just a directory, |
1797 ;; use same file name, but in that directory. | 1797 ;; use same file name, but in that directory. |