Mercurial > emacs
changeset 14469:713f9bf02e20
(auto-mode-alist): .ksh suffix means sh-mode.
(write-file): Interactively, prefix arg means don't confirm.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 02 Feb 1996 18:47:34 +0000 |
parents | e41a60d26291 |
children | eb7a9a73cc06 |
files | lisp/files.el |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Fri Feb 02 10:37:39 1996 +0000 +++ b/lisp/files.el Fri Feb 02 18:47:34 1996 +0000 @@ -955,7 +955,7 @@ ("ChangeLog.[0-9]+\\'" . change-log-mode) ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) ("\\.scm\\.[0-9]*\\'" . scheme-mode) - ("\\.c?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) + ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) ("/\\.\\(bash_profile\\|z?login\\|bash_login\\|z?logout\\)\\'" . sh-mode) ("/\\.\\(bash_logout\\|[kz]shrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode) ("/\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode) @@ -1487,8 +1487,10 @@ If the buffer is already visiting a file, you can specify a directory name as FILENAME, to write a file of the same old name in that directory. + If optional second arg CONFIRM is non-nil, -ask for confirmation for overwriting an existing file." +ask for confirmation for overwriting an existing file. +Interactively, confirmation is required unless you supply a prefix argument." ;; (interactive "FWrite file: ") (interactive (list (if buffer-file-name @@ -1498,7 +1500,7 @@ (cdr (assq 'default-directory (buffer-local-variables))) nil nil (buffer-name))) - t)) + (not current-prefix-arg))) (or (null filename) (string-equal filename "") (progn ;; If arg is just a directory,