aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2009-08-28 17:02:53 +0000
committerStefan Monnier2009-08-28 17:02:53 +0000
commit14acf2f55e96b3d01cd4f42508313a87d01c65cf (patch)
tree70cd72663c338877f2071ce88c562a17968afb20
parent72f16325c1807f5e822c2eb76e10392630842d39 (diff)
downloademacs-14acf2f55e96b3d01cd4f42508313a87d01c65cf.tar.gz
emacs-14acf2f55e96b3d01cd4f42508313a87d01c65cf.zip
* gnus/nnheader.el (nnheader-find-file-noselect):
* gnus/mm-util.el (mm-insert-file-contents): * org/org-html.el (org-export-as-html): * org/org-docbook.el (org-export-as-docbook): * textmodes/reftex.el (reftex-get-file-buffer-force): * progmodes/verilog-mode.el (verilog-batch-execute-func): * emulation/viper.el (viper-go-away, viper-set-hooks): * emacs-lisp/re-builder.el (re-builder-unload-function): * emacs-lisp/bytecomp.el (byte-compile-file): * ses.el (ses-unload-function): * hexl.el (hexl-find-file): * files.el (normal-mode): * ehelp.el (with-electric-help): * autoinsert.el (auto-insert-alist): * arc-mode.el (archive-mode): Use (default-value 'major-mode) instead of default-major-mode.
-rw-r--r--lisp/ChangeLog13
-rw-r--r--lisp/arc-mode.el2
-rw-r--r--lisp/autoinsert.el2
-rw-r--r--lisp/ehelp.el9
-rw-r--r--lisp/emacs-lisp/bytecomp.el13
-rw-r--r--lisp/emacs-lisp/re-builder.el2
-rw-r--r--lisp/emulation/viper.el11
-rw-r--r--lisp/files.el2
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/gnus/mm-util.el36
-rw-r--r--lisp/gnus/nnheader.el24
-rw-r--r--lisp/hexl.el5
-rw-r--r--lisp/mh-e/mh-folder.el2
-rw-r--r--lisp/mh-e/mh-letter.el2
-rw-r--r--lisp/mh-e/mh-show.el2
-rw-r--r--lisp/org/ChangeLog6
-rw-r--r--lisp/org/org-docbook.el4
-rw-r--r--lisp/org/org-html.el2
-rw-r--r--lisp/progmodes/verilog-mode.el6
-rw-r--r--lisp/ses.el2
-rw-r--r--lisp/textmodes/reftex.el10
21 files changed, 94 insertions, 67 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fb1dde90099..522852fdf5f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,18 @@
12009-08-28 Stefan Monnier <monnier@iro.umontreal.ca> 12009-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * textmodes/reftex.el (reftex-get-file-buffer-force):
4 * progmodes/verilog-mode.el (verilog-batch-execute-func):
5 * emulation/viper.el (viper-go-away, viper-set-hooks):
6 * emacs-lisp/re-builder.el (re-builder-unload-function):
7 * emacs-lisp/bytecomp.el (byte-compile-file):
8 * ses.el (ses-unload-function):
9 * hexl.el (hexl-find-file):
10 * files.el (normal-mode):
11 * ehelp.el (with-electric-help):
12 * autoinsert.el (auto-insert-alist):
13 * arc-mode.el (archive-mode):
14 Use (default-value 'major-mode) instead of default-major-mode.
15
3 * textmodes/ispell.el (ispell-check-version, ispell-send-string): 16 * textmodes/ispell.el (ispell-check-version, ispell-send-string):
4 * international/mule.el (load-with-code-conversion): 17 * international/mule.el (load-with-code-conversion):
5 * emacs-lisp/debug.el (debug): 18 * emacs-lisp/debug.el (debug):
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index e812a47ddc6..6e65d64bb81 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -638,7 +638,7 @@ archive.
638 ;; mode on and off. You can corrupt things that way. 638 ;; mode on and off. You can corrupt things that way.
639 (if (zerop (buffer-size)) 639 (if (zerop (buffer-size))
640 ;; At present we cannot create archives from scratch 640 ;; At present we cannot create archives from scratch
641 (funcall default-major-mode) 641 (funcall (default-value 'major-mode))
642 (if (and (not force) archive-files) nil 642 (if (and (not force) archive-files) nil
643 (let* ((type (archive-find-type)) 643 (let* ((type (archive-find-type))
644 (typename (capitalize (symbol-name type)))) 644 (typename (capitalize (symbol-name type))))
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el
index 17a9e4258a2..0fbc3d66c79 100644
--- a/lisp/autoinsert.el
+++ b/lisp/autoinsert.el
@@ -128,7 +128,7 @@ If this contains a %s, that will be replaced by the matching rule."
128 128
129 (("/bin/.*[^/]\\'" . "Shell-Script mode magic number") 129 (("/bin/.*[^/]\\'" . "Shell-Script mode magic number")
130 lambda () 130 lambda ()
131 (if (eq major-mode default-major-mode) 131 (if (eq major-mode (default-value 'major-mode))
132 (sh-mode))) 132 (sh-mode)))
133 133
134 (ada-mode . ada-header) 134 (ada-mode . ada-header)
diff --git a/lisp/ehelp.el b/lisp/ehelp.el
index d8e7ea57deb..8f1eeefa95a 100644
--- a/lisp/ehelp.el
+++ b/lisp/ehelp.el
@@ -96,7 +96,7 @@
96 96
97(defun electric-help-mode () 97(defun electric-help-mode ()
98 "`with-electric-help' temporarily places its buffer in this mode. 98 "`with-electric-help' temporarily places its buffer in this mode.
99\(On exit from `with-electric-help', the buffer is put in `default-major-mode'.)" 99\(On exit from `with-electric-help', the buffer is put in default `major-mode'.)"
100 (setq buffer-read-only t) 100 (setq buffer-read-only t)
101 (setq mode-name "Help") 101 (setq mode-name "Help")
102 (setq major-mode 'help) 102 (setq major-mode 'help)
@@ -131,7 +131,7 @@ If THUNK returns non-nil, we don't do those things.
131 131
132When the user exits (with `electric-help-exit', or otherwise), the help 132When the user exits (with `electric-help-exit', or otherwise), the help
133buffer's window disappears (i.e., we use `save-window-excursion'), and 133buffer's window disappears (i.e., we use `save-window-excursion'), and
134BUFFER is put into `default-major-mode' (or `fundamental-mode')." 134BUFFER is put into default `major-mode' (or `fundamental-mode')."
135 (setq buffer (get-buffer-create (or buffer "*Help*"))) 135 (setq buffer (get-buffer-create (or buffer "*Help*")))
136 (let ((one (one-window-p t)) 136 (let ((one (one-window-p t))
137 (config (current-window-configuration)) 137 (config (current-window-configuration))
@@ -143,8 +143,7 @@ BUFFER is put into `default-major-mode' (or `fundamental-mode')."
143 (goto-char (window-start (selected-window)))) 143 (goto-char (window-start (selected-window))))
144 (let ((pop-up-windows t)) 144 (let ((pop-up-windows t))
145 (pop-to-buffer buffer)) 145 (pop-to-buffer buffer))
146 (save-excursion 146 (with-current-buffer buffer
147 (set-buffer buffer)
148 (when (and minheight (< (window-height) minheight)) 147 (when (and minheight (< (window-height) minheight))
149 (enlarge-window (- minheight (window-height)))) 148 (enlarge-window (- minheight (window-height))))
150 (electric-help-mode) 149 (electric-help-mode)
@@ -177,7 +176,7 @@ BUFFER is put into `default-major-mode' (or `fundamental-mode')."
177 ;; afterwards. It's also not clear that `help-mode' is always 176 ;; afterwards. It's also not clear that `help-mode' is always
178 ;; the right thing, maybe we should add an optional parameter. 177 ;; the right thing, maybe we should add an optional parameter.
179 (condition-case () 178 (condition-case ()
180 (funcall (or default-major-mode 'fundamental-mode)) 179 (funcall (or (default-value 'major-mode) 'fundamental-mode))
181 (error nil)) 180 (error nil))
182 181
183 (set-window-configuration config) 182 (set-window-configuration config)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 01d1e270f36..c234fd70a43 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -156,6 +156,7 @@
156;; Some versions of `file' can be customized to recognize that. 156;; Some versions of `file' can be customized to recognize that.
157 157
158(require 'backquote) 158(require 'backquote)
159(eval-when-compile (require 'cl))
159 160
160(or (fboundp 'defsubst) 161(or (fboundp 'defsubst)
161 ;; This really ought to be loaded already! 162 ;; This really ought to be loaded already!
@@ -1747,12 +1748,12 @@ The value is non-nil if there were no errors, nil if errors."
1747 (set-buffer-multibyte nil)) 1748 (set-buffer-multibyte nil))
1748 ;; Run hooks including the uncompression hook. 1749 ;; Run hooks including the uncompression hook.
1749 ;; If they change the file name, then change it for the output also. 1750 ;; If they change the file name, then change it for the output also.
1750 (let ((buffer-file-name bytecomp-filename) 1751 (letf ((buffer-file-name bytecomp-filename)
1751 (default-major-mode 'emacs-lisp-mode) 1752 ((default-value 'major-mode) 'emacs-lisp-mode)
1752 ;; Ignore unsafe local variables. 1753 ;; Ignore unsafe local variables.
1753 ;; We only care about a few of them for our purposes. 1754 ;; We only care about a few of them for our purposes.
1754 (enable-local-variables :safe) 1755 (enable-local-variables :safe)
1755 (enable-local-eval nil)) 1756 (enable-local-eval nil))
1756 ;; Arg of t means don't alter enable-local-variables. 1757 ;; Arg of t means don't alter enable-local-variables.
1757 (normal-mode t) 1758 (normal-mode t)
1758 (setq bytecomp-filename buffer-file-name)) 1759 (setq bytecomp-filename buffer-file-name))
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 97aba431c0f..ed45bd65304 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -720,7 +720,7 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions."
720 (remove-hook 'kill-buffer-hook 'reb-kill-buffer t) 720 (remove-hook 'kill-buffer-hook 'reb-kill-buffer t)
721 (when (reb-mode-buffer-p) 721 (when (reb-mode-buffer-p)
722 (reb-delete-overlays) 722 (reb-delete-overlays)
723 (funcall default-major-mode)))) 723 (funcall (default-value 'major-mode)))))
724 ;; continue standard unloading 724 ;; continue standard unloading
725 nil) 725 nil)
726 726
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index 1631b1aa6ba..2d65f5c4a06 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -678,8 +678,9 @@ It also can't undo some Viper settings."
678 global-mode-string 678 global-mode-string
679 (delq 'viper-mode-string global-mode-string)) 679 (delq 'viper-mode-string global-mode-string))
680 680
681 (setq default-major-mode 681 (setq-default major-mode
682 (viper-standard-value 'default-major-mode viper-saved-non-viper-variables)) 682 (viper-standard-value 'default-major-mode
683 viper-saved-non-viper-variables))
683 684
684 (if (featurep 'emacs) 685 (if (featurep 'emacs)
685 (setq-default 686 (setq-default
@@ -834,8 +835,8 @@ It also can't undo some Viper settings."
834 ;; in Fundamental Mode and Vi state. 835 ;; in Fundamental Mode and Vi state.
835 ;; When viper-mode is executed in such a case, it will set the major mode 836 ;; When viper-mode is executed in such a case, it will set the major mode
836 ;; back to fundamental-mode. 837 ;; back to fundamental-mode.
837 (if (eq default-major-mode 'fundamental-mode) 838 (if (eq (default-value 'major-mode) 'fundamental-mode)
838 (setq default-major-mode 'viper-mode)) 839 (setq-default major-mode 'viper-mode))
839 840
840 (add-hook 'change-major-mode-hook 'viper-major-mode-change-sentinel) 841 (add-hook 'change-major-mode-hook 'viper-major-mode-change-sentinel)
841 (add-hook 'find-file-hooks 'set-viper-state-in-major-mode) 842 (add-hook 'find-file-hooks 'set-viper-state-in-major-mode)
@@ -1214,7 +1215,7 @@ These two lines must come in the order given.
1214(if (null viper-saved-non-viper-variables) 1215(if (null viper-saved-non-viper-variables)
1215 (setq viper-saved-non-viper-variables 1216 (setq viper-saved-non-viper-variables
1216 (list 1217 (list
1217 (cons 'default-major-mode (list default-major-mode)) 1218 (cons 'default-major-mode (list (default-value 'major-mode)))
1218 (cons 'next-line-add-newlines (list next-line-add-newlines)) 1219 (cons 'next-line-add-newlines (list next-line-add-newlines))
1219 (cons 'require-final-newline (list require-final-newline)) 1220 (cons 'require-final-newline (list require-final-newline))
1220 (cons 'scroll-step (list scroll-step)) 1221 (cons 'scroll-step (list scroll-step))
diff --git a/lisp/files.el b/lisp/files.el
index 3ff6c5c9f26..2c695c1d4bd 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2100,7 +2100,7 @@ not set local variables (though we do notice a mode specified with -*-.)
2100or from Lisp without specifying the optional argument FIND-FILE; 2100or from Lisp without specifying the optional argument FIND-FILE;
2101in that case, this function acts as if `enable-local-variables' were t." 2101in that case, this function acts as if `enable-local-variables' were t."
2102 (interactive) 2102 (interactive)
2103 (funcall (or default-major-mode 'fundamental-mode)) 2103 (funcall (or (default-value 'major-mode) 'fundamental-mode))
2104 (let ((enable-local-variables (or (not find-file) enable-local-variables))) 2104 (let ((enable-local-variables (or (not find-file) enable-local-variables)))
2105 (report-errors "File mode specification error: %s" 2105 (report-errors "File mode specification error: %s"
2106 (set-auto-mode)) 2106 (set-auto-mode))
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index afd0c19c7eb..2bdd3dfa91a 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
12009-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * nnheader.el (nnheader-find-file-noselect):
4 * mm-util.el (mm-insert-file-contents):
5 Use (default-value 'major-mode) instead of default-major-mode.
6
12009-08-27 Stefan Monnier <monnier@iro.umontreal.ca> 72009-08-27 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * nnrss.el (nnrss-request-article): Avoid default-fill-column. 9 * nnrss.el (nnrss-request-article): Avoid default-fill-column.
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index 403d967f8e4..8866befb4f9 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -1308,24 +1308,24 @@ to advanced Emacs features, such as file-name-handlers, format decoding,
1308`find-file-hooks', etc. 1308`find-file-hooks', etc.
1309If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'. 1309If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'.
1310 This function ensures that none of these modifications will take place." 1310 This function ensures that none of these modifications will take place."
1311 (let* ((format-alist nil) 1311 (letf* ((format-alist nil)
1312 (auto-mode-alist (if inhibit nil (mm-auto-mode-alist))) 1312 (auto-mode-alist (if inhibit nil (mm-auto-mode-alist)))
1313 (default-major-mode 'fundamental-mode) 1313 ((default-value 'major-mode) 'fundamental-mode)
1314 (enable-local-variables nil) 1314 (enable-local-variables nil)
1315 (after-insert-file-functions nil) 1315 (after-insert-file-functions nil)
1316 (enable-local-eval nil) 1316 (enable-local-eval nil)
1317 (inhibit-file-name-operation (if inhibit 1317 (inhibit-file-name-operation (if inhibit
1318 'insert-file-contents 1318 'insert-file-contents
1319 inhibit-file-name-operation)) 1319 inhibit-file-name-operation))
1320 (inhibit-file-name-handlers 1320 (inhibit-file-name-handlers
1321 (if inhibit 1321 (if inhibit
1322 (append mm-inhibit-file-name-handlers 1322 (append mm-inhibit-file-name-handlers
1323 inhibit-file-name-handlers) 1323 inhibit-file-name-handlers)
1324 inhibit-file-name-handlers)) 1324 inhibit-file-name-handlers))
1325 (ffh (if (boundp 'find-file-hook) 1325 (ffh (if (boundp 'find-file-hook)
1326 'find-file-hook 1326 'find-file-hook
1327 'find-file-hooks)) 1327 'find-file-hooks))
1328 (val (symbol-value ffh))) 1328 (val (symbol-value ffh)))
1329 (set ffh nil) 1329 (set ffh nil)
1330 (unwind-protect 1330 (unwind-protect
1331 (insert-file-contents filename visit beg end replace) 1331 (insert-file-contents filename visit beg end replace)
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index 572f80bea9d..ce52ac96564 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -992,18 +992,18 @@ find-file-hooks, etc.
992(defun nnheader-find-file-noselect (&rest args) 992(defun nnheader-find-file-noselect (&rest args)
993 "Open a file with some variables bound. 993 "Open a file with some variables bound.
994See `find-file-noselect' for the arguments." 994See `find-file-noselect' for the arguments."
995 (let* ((format-alist nil) 995 (letf* ((format-alist nil)
996 (auto-mode-alist (mm-auto-mode-alist)) 996 (auto-mode-alist (mm-auto-mode-alist))
997 (default-major-mode 'fundamental-mode) 997 ((default-value 'major-mode) 'fundamental-mode)
998 (enable-local-variables nil) 998 (enable-local-variables nil)
999 (after-insert-file-functions nil) 999 (after-insert-file-functions nil)
1000 (enable-local-eval nil) 1000 (enable-local-eval nil)
1001 (coding-system-for-read nnheader-file-coding-system) 1001 (coding-system-for-read nnheader-file-coding-system)
1002 (version-control 'never) 1002 (version-control 'never)
1003 (ffh (if (boundp 'find-file-hook) 1003 (ffh (if (boundp 'find-file-hook)
1004 'find-file-hook 1004 'find-file-hook
1005 'find-file-hooks)) 1005 'find-file-hooks))
1006 (val (symbol-value ffh))) 1006 (val (symbol-value ffh)))
1007 (set ffh nil) 1007 (set ffh nil)
1008 (unwind-protect 1008 (unwind-protect
1009 (apply 'find-file-noselect args) 1009 (apply 'find-file-noselect args)
diff --git a/lisp/hexl.el b/lisp/hexl.el
index d4aec1484ba..19c1b996b16 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -42,6 +42,7 @@
42;;; Code: 42;;; Code:
43 43
44(require 'eldoc) 44(require 'eldoc)
45(eval-when-compile (require 'cl))
45 46
46;; 47;;
47;; vars here 48;; vars here
@@ -365,8 +366,8 @@ and edit the file in `hexl-mode'."
365 (list 366 (list
366 (let ((completion-ignored-extensions nil)) 367 (let ((completion-ignored-extensions nil))
367 (read-file-name "Filename: " nil nil 'ret-must-match)))) 368 (read-file-name "Filename: " nil nil 'ret-must-match))))
368 ;; Ignore the user's setting of default-major-mode. 369 ;; Ignore the user's setting of default major-mode.
369 (let ((default-major-mode 'fundamental-mode)) 370 (letf (((default-value 'major-mode) 'fundamental-mode))
370 (find-file-literally filename)) 371 (find-file-literally filename))
371 (if (not (eq major-mode 'hexl-mode)) 372 (if (not (eq major-mode 'hexl-mode))
372 (hexl-mode))) 373 (hexl-mode)))
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index e43c56ba68f..52a6d787cae 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -529,7 +529,7 @@ font-lock is done highlighting.")
529(defvar font-lock-auto-fontify) 529(defvar font-lock-auto-fontify)
530(defvar font-lock-defaults) ; XEmacs 530(defvar font-lock-defaults) ; XEmacs
531 531
532;; Ensure new buffers won't get this mode if default-major-mode is nil. 532;; Ensure new buffers won't get this mode if default major-mode is nil.
533(put 'mh-folder-mode 'mode-class 'special) 533(put 'mh-folder-mode 'mode-class 'special)
534 534
535;; Autoload cookie needed by desktop.el 535;; Autoload cookie needed by desktop.el
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el
index dcb8d8588e2..051a98de89a 100644
--- a/lisp/mh-e/mh-letter.el
+++ b/lisp/mh-e/mh-letter.el
@@ -277,7 +277,7 @@ searching for `mh-mail-header-separator' in the buffer."
277;; Shush compiler. 277;; Shush compiler.
278(defvar font-lock-defaults) ; XEmacs 278(defvar font-lock-defaults) ; XEmacs
279 279
280;; Ensure new buffers won't get this mode if default-major-mode is nil. 280;; Ensure new buffers won't get this mode if default major-mode is nil.
281(put 'mh-letter-mode 'mode-class 'special) 281(put 'mh-letter-mode 'mode-class 'special)
282 282
283;;;###mh-autoload 283;;;###mh-autoload
diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el
index 97a9883d558..70852f0bb05 100644
--- a/lisp/mh-e/mh-show.el
+++ b/lisp/mh-e/mh-show.el
@@ -825,7 +825,7 @@ operation."
825 825
826;;; MH-Show Mode 826;;; MH-Show Mode
827 827
828;; Ensure new buffers won't get this mode if default-major-mode is nil. 828;; Ensure new buffers won't get this mode if default major-mode is nil.
829(put 'mh-show-mode 'mode-class 'special) 829(put 'mh-show-mode 'mode-class 'special)
830 830
831;; Shush compiler. 831;; Shush compiler.
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 82010dc1493..f5efef377cf 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -1,3 +1,9 @@
12009-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * org-html.el (org-export-as-html):
4 * org-docbook.el (org-export-as-docbook):
5 Use (default-value 'major-mode) instead of default-major-mode.
6
12009-08-08 Carsten Dominik <carsten.dominik@gmail.com> 72009-08-08 Carsten Dominik <carsten.dominik@gmail.com>
2 8
3 * org-docbook.el: Add arch-tag. 9 * org-docbook.el: Add arch-tag.
diff --git a/lisp/org/org-docbook.el b/lisp/org/org-docbook.el
index 8d47b552e5d..38af0803434 100644
--- a/lisp/org/org-docbook.el
+++ b/lisp/org/org-docbook.el
@@ -9,7 +9,7 @@
9;; Maintainer: Baoqiu Cui <cbaoqiu AT yahoo DOT com> 9;; Maintainer: Baoqiu Cui <cbaoqiu AT yahoo DOT com>
10;; Keywords: org, wp, docbook 10;; Keywords: org, wp, docbook
11;; Description: Converts an org-mode buffer into DocBook 11;; Description: Converts an org-mode buffer into DocBook
12;; $Id: org-docbook.el,v 1.2 2009/08/08 02:33:22 gm Exp $ 12;; $Id: org-docbook.el,v 1.3 2009/08/08 12:18:56 cdominik Exp $
13;; URL: 13;; URL:
14 14
15;; This file is part of GNU Emacs. 15;; This file is part of GNU Emacs.
@@ -1102,7 +1102,7 @@ publishing directory."
1102 1102
1103 (unless (plist-get opt-plist :buffer-will-be-killed) 1103 (unless (plist-get opt-plist :buffer-will-be-killed)
1104 (normal-mode) 1104 (normal-mode)
1105 (if (eq major-mode default-major-mode) 1105 (if (eq major-mode (default-value 'major-mode))
1106 (nxml-mode))) 1106 (nxml-mode)))
1107 1107
1108 ;; Remove empty paragraphs and lists. Replace them with a 1108 ;; Remove empty paragraphs and lists. Replace them with a
diff --git a/lisp/org/org-html.el b/lisp/org/org-html.el
index 35eb45ab179..3170f3ae07c 100644
--- a/lisp/org/org-html.el
+++ b/lisp/org/org-html.el
@@ -1419,7 +1419,7 @@ lang=\"%s\" xml:lang=\"%s\">
1419 1419
1420 (unless (plist-get opt-plist :buffer-will-be-killed) 1420 (unless (plist-get opt-plist :buffer-will-be-killed)
1421 (normal-mode) 1421 (normal-mode)
1422 (if (eq major-mode default-major-mode) (html-mode))) 1422 (if (eq major-mode (default-value 'major-mode)) (html-mode)))
1423 1423
1424 ;; insert the table of contents 1424 ;; insert the table of contents
1425 (goto-char (point-min)) 1425 (goto-char (point-min))
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 4c5a21f4b2a..57a51fd2187 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -4136,18 +4136,18 @@ This lets programs calling batch mode to easily extract error messages."
4136(defun verilog-batch-execute-func (funref) 4136(defun verilog-batch-execute-func (funref)
4137 "Internal processing of a batch command, running FUNREF on all command arguments." 4137 "Internal processing of a batch command, running FUNREF on all command arguments."
4138 (verilog-batch-error-wrapper 4138 (verilog-batch-error-wrapper
4139 ;; !!! FIXME: Setting global variables like that is *VERY NASTY* !!! --Stef
4139 ;; General globals needed 4140 ;; General globals needed
4140 (setq make-backup-files nil) 4141 (setq make-backup-files nil)
4141 (setq-default make-backup-files nil) 4142 (setq-default make-backup-files nil)
4142 (setq enable-local-variables t) 4143 (setq enable-local-variables t)
4143 (setq enable-local-eval t) 4144 (setq enable-local-eval t)
4144 ;; Make sure any sub-files we read get proper mode 4145 ;; Make sure any sub-files we read get proper mode
4145 (setq default-major-mode `verilog-mode) 4146 (setq-default major-mode 'verilog-mode)
4146 ;; Ditto files already read in 4147 ;; Ditto files already read in
4147 (mapc (lambda (buf) 4148 (mapc (lambda (buf)
4148 (when (buffer-file-name buf) 4149 (when (buffer-file-name buf)
4149 (save-excursion 4150 (with-current-buffer buf
4150 (set-buffer buf)
4151 (verilog-mode)))) 4151 (verilog-mode))))
4152 (buffer-list)) 4152 (buffer-list))
4153 ;; Process the files 4153 ;; Process the files
diff --git a/lisp/ses.el b/lisp/ses.el
index 95685e7d7e3..86239022ed6 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -3011,7 +3011,7 @@ current column and continues until the next nonblank column."
3011 (dolist (buf (buffer-list)) 3011 (dolist (buf (buffer-list))
3012 (set-buffer buf) 3012 (set-buffer buf)
3013 (when (eq major-mode 'ses-mode) 3013 (when (eq major-mode 'ses-mode)
3014 (funcall (or default-major-mode 'fundamental-mode))))) 3014 (funcall (or (default-value 'major-mode) 'fundamental-mode)))))
3015 ;; continue standard unloading 3015 ;; continue standard unloading
3016 nil) 3016 nil)
3017 3017
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 23cf167dc93..d905ce66905 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -2063,11 +2063,11 @@ When DIE is non-nil, throw an error if file not found."
2063 ;; with limited Magic 2063 ;; with limited Magic
2064 2064
2065 ;; The magic goes away 2065 ;; The magic goes away
2066 (let ((format-alist nil) 2066 (letf ((format-alist nil)
2067 (auto-mode-alist (reftex-auto-mode-alist)) 2067 (auto-mode-alist (reftex-auto-mode-alist))
2068 (default-major-mode 'fundamental-mode) 2068 ((default-value 'major-mode) 'fundamental-mode)
2069 (enable-local-variables nil) 2069 (enable-local-variables nil)
2070 (after-insert-file-functions nil)) 2070 (after-insert-file-functions nil))
2071 (setq buf (find-file-noselect file))) 2071 (setq buf (find-file-noselect file)))
2072 2072
2073 ;; Is there a hook to run? 2073 ;; Is there a hook to run?