[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112282: * lisp/files.el (normal-mode
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112282: * lisp/files.el (normal-mode): Only use default major-mode if no other mode |
Date: |
Sat, 13 Apr 2013 22:55:21 -0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 112282
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14089
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Sat 2013-04-13 22:55:21 -0400
message:
* lisp/files.el (normal-mode): Only use default major-mode if no other mode
was specified.
modified:
lisp/ChangeLog
lisp/files.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-04-14 01:02:29 +0000
+++ b/lisp/ChangeLog 2013-04-14 02:55:21 +0000
@@ -1,5 +1,8 @@
2013-04-14 Stefan Monnier <address@hidden>
+ * files.el (normal-mode): Only use default major-mode if no other mode
+ was specified.
+
* emacs-lisp/trace.el (trace-values): New function.
* files.el: Allow : in local variables (bug#14089).
=== modified file 'lisp/files.el'
--- a/lisp/files.el 2013-04-14 00:59:48 +0000
+++ b/lisp/files.el 2013-04-14 02:55:21 +0000
@@ -1986,8 +1986,7 @@
(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))
+ (setq-local find-file-literally t))
(after-find-file error (not nowarn)))
(current-buffer))))
@@ -2175,7 +2174,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)
- (funcall (or (default-value 'major-mode) 'fundamental-mode))
+ (fundamental-mode)
(let ((enable-local-variables (or (not find-file) enable-local-variables)))
;; FIXME this is less efficient than it could be, since both
;; s-a-m and h-l-v may parse the same regions, looking for "mode:".
@@ -2759,7 +2758,9 @@
(if (functionp re)
(funcall re)
(looking-at re)))))))
- (set-auto-mode-0 done keep-mode-if-same)))))
+ (set-auto-mode-0 done keep-mode-if-same)))
+ (unless done
+ (set-buffer-major-mode (current-buffer)))))
;; When `keep-mode-if-same' is set, we are working on behalf of
;; set-visited-file-name. In that case, if the major mode specified is the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112282: * lisp/files.el (normal-mode): Only use default major-mode if no other mode,
Stefan Monnier <=