# HG changeset patch # User Richard M. Stallman # Date 1123594503 0 # Node ID a471e69ed043bb034cf5e8249902b4661a83b27c # Parent a2d841662b3d238ef6709fc05f1ad554c9d3ea63 (find-file-noselect): Don't call set-buffer-major-mode. (find-file-noselect-1): Call it here, only if RAWFILE. (normal-mode): Always set some major mode. (save-some-buffers-action-alist): Change some explanation strings. (file-name-non-special): In the `quote' method, use unwind-protect. diff -r a2d841662b3d -r a471e69ed043 lisp/files.el --- a/lisp/files.el Tue Aug 09 12:11:00 2005 +0000 +++ b/lisp/files.el Tue Aug 09 13:35:03 2005 +0000 @@ -1464,7 +1464,6 @@ buf) ;; Create a new buffer. (setq buf (create-file-buffer filename)) - (set-buffer-major-mode buf) ;; find-file-noselect-1 may use a different buffer. (find-file-noselect-1 buf filename nowarn rawfile truename number)))))) @@ -1538,6 +1537,7 @@ (progn (set-buffer-multibyte nil) (setq buffer-file-coding-system 'no-conversion) + (set-buffer-major-mode buf) (make-local-variable 'find-file-literally) (setq find-file-literally t)) (after-find-file error (not nowarn))) @@ -1727,7 +1727,7 @@ or from Lisp without specifying the optional argument FIND-FILE; in that case, this function acts as if `enable-local-variables' were t." (interactive) - (or find-file (funcall (or default-major-mode 'fundamental-mode))) + (funcall (or default-major-mode 'fundamental-mode)) (let ((enable-local-variables (or (not find-file) enable-local-variables))) (report-errors "File mode specification error: %s" (set-auto-mode)) @@ -3450,9 +3450,9 @@ (recursive-edit) ;; Return nil to ask about BUF again. nil) - "display the current buffer") + "view this file") (?d diff-buffer-with-file - "show difference to last saved version")) + "view changes in file")) "ACTION-ALIST argument used in call to `map-y-or-n-p'.") (put 'save-some-buffers-action-alist 'risky-local-variable t) @@ -4844,7 +4844,8 @@ ((eq method 'add) (concat "/:" (apply operation arguments))) ((eq method 'quote) - (prog1 (apply operation arguments) + (unwind-protect + (apply operation arguments) (setq buffer-file-name (concat "/:" buffer-file-name)))) ((eq method 'unquote-then-quote) (let (res)