]> code.delx.au - gnu-emacs/blobdiff - lisp/files.el
(revert-buffer): Fix previous change.
[gnu-emacs] / lisp / files.el
index 1589e2c5998f74077b3f5f3cd7322be63c95bdac..9228e5476423b5e1d629e0bd5a21276987d11b89 100644 (file)
@@ -514,6 +514,9 @@ using \\[toggle-read-only]."
   :type 'boolean
   :group 'view)
 
+(defvar file-name-history nil
+  "History list of file names entered in the minibuffer.")
+\f
 (put 'ange-ftp-completion-hook-function 'safe-magic t)
 (defun ange-ftp-completion-hook-function (op &rest args)
   "Provides support for ange-ftp host name completion.
@@ -1906,7 +1909,7 @@ in that case, this function acts as if `enable-local-variables' were t."
      ("\\.[sS]\\'" . asm-mode)
      ("\\.asm\\'" . asm-mode)
      ("[cC]hange\\.?[lL]og?\\'" . change-log-mode)
-     ("[cC]hange[lL]og\\.[0-9]+\\'" . change-log-mode)
+     ("[cC]hange[lL]og[-.][0-9]+\\'" . change-log-mode)
      ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode)
      ("\\.scm\\.[0-9]*\\'" . scheme-mode)
      ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)
@@ -3730,7 +3733,7 @@ This requires the external program `diff' to be in your `exec-path'."
        (recursive-edit)
        ;; Return nil to ask about BUF again.
        nil)
-     "view this file")
+     "view this buffer")
     (?d (lambda (buf)
          (save-window-excursion
            (diff-buffer-with-file buf))
@@ -3738,7 +3741,7 @@ This requires the external program `diff' to be in your `exec-path'."
                       (lambda (ignore) (exit-recursive-edit)))
          (recursive-edit)
          nil)
-       "view changes in file"))
+       "view changes in this buffer"))
   "ACTION-ALIST argument used in call to `map-y-or-n-p'.")
 
 (defvar buffer-save-without-query nil
@@ -4091,6 +4094,16 @@ non-nil, it is called instead of rereading visited file contents."
                          (if auto-save-p 'auto-save-coding
                            (or coding-system-for-read
                                buffer-file-coding-system-explicit))))
+                    (if (and (not enable-multibyte-characters)
+                             coding-system-for-read
+                             (not (memq (coding-system-base
+                                         coding-system-for-read)
+                                        '(no-conversion raw-text))))
+                        ;; As a coding system suitable for multibyte
+                        ;; buffer is specified, make the current
+                        ;; buffer multibyte.
+                        (set-buffer-multibyte t))
+
                     ;; This force after-insert-file-set-coding
                     ;; (called from insert-file-contents) to set
                     ;; buffer-file-coding-system to a proper value.