Commit 72f16325 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* textmodes/ispell.el (ispell-check-version, ispell-send-string):

* international/mule.el (load-with-code-conversion):
* emacs-lisp/debug.el (debug):
* ediff-vers.el (ediff-rcs-get-output-buffer):
* dired.el (dired-internal-noselect): Don't let-bind
default-major-mode around code that doesn't use it.
E.g. buffer creation via get-buffer-create doesn't use it.
parent b59329e0
2009-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
* textmodes/ispell.el (ispell-check-version, ispell-send-string):
* international/mule.el (load-with-code-conversion):
* emacs-lisp/debug.el (debug):
* ediff-vers.el (ediff-rcs-get-output-buffer):
* dired.el (dired-internal-noselect): Don't let-bind
default-major-mode around code that doesn't use it.
E.g. buffer creation via get-buffer-create doesn't use it.
2009-08-28 Michael Albinus <michael.albinus@gmx.de> 2009-08-28 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (all): Replace "'(lambda" by "(lambda". * net/tramp.el (all): Replace "'(lambda" by "(lambda".
...@@ -13,19 +23,19 @@ ...@@ -13,19 +23,19 @@
(tramp-root-regexp, tramp-completion-file-name-regexp-unified) (tramp-root-regexp, tramp-completion-file-name-regexp-unified)
(tramp-completion-file-name-regexp-separate) (tramp-completion-file-name-regexp-separate)
(tramp-completion-file-name-regexp-url): Use \\` and \\'. (tramp-completion-file-name-regexp-url): Use \\` and \\'.
(tramp-handle-file-attributes, tramp-set-file-uid-gid): Don't (tramp-handle-file-attributes, tramp-set-file-uid-gid):
modify last-coding-system-used by accident. Don't modify last-coding-system-used by accident.
(tramp-completion-file-name-handler): Apply the checks here, (tramp-completion-file-name-handler): Apply the checks here,
instead during registration. instead during registration.
(tramp-register-file-name-handlers) Renamed from (tramp-register-file-name-handlers) Renamed from
`tramp-register-file-name-handler'. Register both `tramp-register-file-name-handler'. Register both
`tramp-file-name-handler' and `tramp-completion-file-name-handler'. `tramp-file-name-handler' and `tramp-completion-file-name-handler'.
(tramp-register-completion-file-name-handler): Removed. (Bug#4260) (tramp-register-completion-file-name-handler): Remove. (Bug#4260)
2009-08-28 Nick Roberts <nickrob@snap.net.nz> 2009-08-28 Nick Roberts <nickrob@snap.net.nz>
* progmodes/gdb-mi.el (gdb-use-separate-io-buffer): Remove * progmodes/gdb-mi.el (gdb-use-separate-io-buffer):
variable ... Remove variable ...
(gdb-init-1, gdb-display-separate-io-buffer) (gdb-init-1, gdb-display-separate-io-buffer)
(gdb-frame-separate-io-buffer, gdb-setup-windows): ... and (gdb-frame-separate-io-buffer, gdb-setup-windows): ... and
references to it. references to it.
...@@ -183,11 +193,12 @@ ...@@ -183,11 +193,12 @@
(vc-rcs-checkout, vc-rcs-rollback): Adjust for the vc-rcs-trunk-p (vc-rcs-checkout, vc-rcs-rollback): Adjust for the vc-rcs-trunk-p
renaming. renaming.
(vc-rcs-trunk-p, vc-rcs-minor-part, vc-rcs-previous-revision) (vc-rcs-trunk-p, vc-rcs-minor-part, vc-rcs-previous-revision)
(vc-rcs-next-revision, vc-rcs-update-changelog): Moved here from (vc-rcs-next-revision, vc-rcs-update-changelog): Move here from
vc.el, renamed to be RCS specific. vc.el, renamed to be RCS specific.
* vc-cvs.el (vc-cvs-previous-revision, vc-cvs-next-revision): New functions. * vc-cvs.el (vc-cvs-previous-revision, vc-cvs-next-revision):
(vc-cvs-update-changelog): Moved here from vc.el. New functions.
(vc-cvs-update-changelog): Move here from vc.el.
* vc-sccs.el (vc-sccs-previous-revision, vc-sccs-next-revision): * vc-sccs.el (vc-sccs-previous-revision, vc-sccs-next-revision):
New functions. New functions.
...@@ -231,8 +242,8 @@ ...@@ -231,8 +242,8 @@
(parse-time-rules, rmail-output-file-alist) (parse-time-rules, rmail-output-file-alist)
(special-display-buffer-names, vc-mode): (special-display-buffer-names, vc-mode):
Move risky declarations to the relevant files. Move risky declarations to the relevant files.
* bindings.el (mode-line-client, mode-line-mule-info, mode-line-process) * bindings.el (mode-line-client, mode-line-mule-info, mode-line-remote)
(mode-line-modified, mode-line-remote, mode-line-position) (mode-line-modified, mode-line-process, mode-line-position)
(mode-line-modes, mode-line-buffer-identification, minor-mode-alist) (mode-line-modes, mode-line-buffer-identification, minor-mode-alist)
* font-core.el (font-lock-defaults): * font-core.el (font-lock-defaults):
* format.el (format-alist): * format.el (format-alist):
...@@ -393,8 +404,8 @@ ...@@ -393,8 +404,8 @@
(decomposition-char-recursively, alist-list-to-vector, quick-check-list) (decomposition-char-recursively, alist-list-to-vector, quick-check-list)
(quick-check-list-to-regexp): Declare. (quick-check-list-to-regexp): Declare.
* progmodes/make-mode.el (makefile-browser-insert-selection): Use * progmodes/make-mode.el (makefile-browser-insert-selection):
goto-char rather than goto-line. Use goto-char rather than goto-line.
* progmodes/prolog.el (compilation-error-regexp-alist) * progmodes/prolog.el (compilation-error-regexp-alist)
(compilation-forget-errors): Declare. (compilation-forget-errors): Declare.
......
...@@ -765,23 +765,14 @@ for a remote directory. This feature is used by Auto Revert Mode." ...@@ -765,23 +765,14 @@ for a remote directory. This feature is used by Auto Revert Mode."
;; like find-file does. ;; like find-file does.
;; Optional argument MODE is passed to dired-find-buffer-nocreate, ;; Optional argument MODE is passed to dired-find-buffer-nocreate,
;; see there. ;; see there.
(let* (dirname (let* ((old-buf (current-buffer))
buffer (dirname (if (consp dir-or-list) (car dir-or-list) dir-or-list))
;; note that buffer already is in dired-mode, if found ;; Look for an existing buffer.
new-buffer-p (buffer (dired-find-buffer-nocreate dirname mode))
(old-buf (current-buffer))) ;; Note that buffer already is in dired-mode, if found.
(if (consp dir-or-list) (new-buffer-p (null buffer)))
(setq dirname (car dir-or-list))
(setq dirname dir-or-list))
;; Look for an existing buffer.
(setq buffer (dired-find-buffer-nocreate dirname mode)
new-buffer-p (null buffer))
(or buffer (or buffer
(let ((default-major-mode 'fundamental-mode)) (setq buffer (create-file-buffer (directory-file-name dirname))))
;; We don't want default-major-mode to run hooks and set auto-fill
;; or whatever, now that dired-mode does not
;; kill-all-local-variables any longer.
(setq buffer (create-file-buffer (directory-file-name dirname)))))
(set-buffer buffer) (set-buffer buffer)
(if (not new-buffer-p) ; existing buffer ... (if (not new-buffer-p) ; existing buffer ...
(cond (switches ; ... but new switches (cond (switches ; ... but new switches
......
...@@ -137,10 +137,8 @@ comparison or merge operations are being performed." ...@@ -137,10 +137,8 @@ comparison or merge operations are being performed."
;; Optional NAME is name to use instead of `*RCS-output*'. ;; Optional NAME is name to use instead of `*RCS-output*'.
;; This is a modified version from rcs.el v1.1. I use it here to make ;; This is a modified version from rcs.el v1.1. I use it here to make
;; Ediff immune to changes in rcs.el ;; Ediff immune to changes in rcs.el
(let* ((default-major-mode 'fundamental-mode) ; no frills! (let ((buf (get-buffer-create name)))
(buf (get-buffer-create name))) (with-current-buffer buf
(save-excursion
(set-buffer buf)
(setq buffer-read-only nil (setq buffer-read-only nil
default-directory (file-name-directory (expand-file-name file))) default-directory (file-name-directory (expand-file-name file)))
(erase-buffer)) (erase-buffer))
......
...@@ -119,8 +119,7 @@ first will be printed into the backtrace buffer." ...@@ -119,8 +119,7 @@ first will be printed into the backtrace buffer."
(let (debugger-value (let (debugger-value
(debug-on-error nil) (debug-on-error nil)
(debug-on-quit nil) (debug-on-quit nil)
(debugger-buffer (let ((default-major-mode 'fundamental-mode)) (debugger-buffer (get-buffer-create "*Backtrace*"))
(get-buffer-create "*Backtrace*")))
(debugger-old-buffer (current-buffer)) (debugger-old-buffer (current-buffer))
(debugger-step-after-exit nil) (debugger-step-after-exit nil)
(debugger-will-be-back nil) (debugger-will-be-back nil)
......
...@@ -307,12 +307,9 @@ Return t if file exists." ...@@ -307,12 +307,9 @@ Return t if file exists."
(signal 'file-error (list "Cannot open load file" file))) (signal 'file-error (list "Cannot open load file" file)))
;; Read file with code conversion, and then eval. ;; Read file with code conversion, and then eval.
(let* ((buffer (let* ((buffer
;; To avoid any autoloading, set default-major-mode to ;; We can't use `generate-new-buffer' because files.el
;; fundamental-mode. ;; is not yet loaded.
(let ((default-major-mode 'fundamental-mode)) (get-buffer-create (generate-new-buffer-name " *load*")))
;; We can't use `generate-new-buffer' because files.el
;; is not yet loaded.
(get-buffer-create (generate-new-buffer-name " *load*"))))
(load-in-progress t) (load-in-progress t)
(source (save-match-data (string-match "\\.el\\'" fullname)))) (source (save-match-data (string-match "\\.el\\'" fullname))))
(unless nomessage (unless nomessage
......
...@@ -785,9 +785,7 @@ Otherwise returns the library directory name, if that is defined." ...@@ -785,9 +785,7 @@ Otherwise returns the library directory name, if that is defined."
;; all versions, since versions earlier than 3.0.09 didn't identify ;; all versions, since versions earlier than 3.0.09 didn't identify
;; themselves on startup. ;; themselves on startup.
(interactive "p") (interactive "p")
(let (;; avoid bugs when syntax of `.' changes in various default modes (let ((default-directory (or (and (boundp 'temporary-file-directory)
(default-major-mode 'fundamental-mode)
(default-directory (or (and (boundp 'temporary-file-directory)
temporary-file-directory) temporary-file-directory)
default-directory)) default-directory))
result status ispell-program-version) result status ispell-program-version)
...@@ -814,7 +812,7 @@ Otherwise returns the library directory name, if that is defined." ...@@ -814,7 +812,7 @@ Otherwise returns the library directory name, if that is defined."
(message "%s" result)) (message "%s" result))
;; return library directory. ;; return library directory.
(if (re-search-forward "LIBDIR = \\\"\\([^ \t\n]*\\)\\\"" nil t) (if (re-search-forward "LIBDIR = \\\"\\([^ \t\n]*\\)\\\"" nil t)
(setq result (buffer-substring (match-beginning 1) (match-end 1))))) (setq result (match-string 1))))
(goto-char (point-min)) (goto-char (point-min))
(if (not (memq status '(0 nil))) (if (not (memq status '(0 nil)))
(error "%s exited with %s %s" ispell-program-name (error "%s exited with %s %s" ispell-program-name
...@@ -839,7 +837,8 @@ Otherwise returns the library directory name, if that is defined." ...@@ -839,7 +837,8 @@ Otherwise returns the library directory name, if that is defined."
(match-string 1))) (match-string 1)))
(setq ispell-really-hunspell (setq ispell-really-hunspell
(and (search-forward-regexp (and (search-forward-regexp
"(but really Hunspell \\([0-9]+\\.[0-9\\.-]+\\)?)" nil t) "(but really Hunspell \\([0-9]+\\.[0-9\\.-]+\\)?)"
nil t)
(match-string 1))))) (match-string 1)))))
(let ((aspell-minver "0.50") (let ((aspell-minver "0.50")
...@@ -887,10 +886,9 @@ Otherwise returns the library directory name, if that is defined." ...@@ -887,10 +886,9 @@ Otherwise returns the library directory name, if that is defined."
;;; The preparation of the menu bar menu must be autoloaded ;; The preparation of the menu bar menu must be autoloaded
;;; because otherwise this file gets autoloaded every time Emacs starts ;; because otherwise this file gets autoloaded every time Emacs starts
;;; so that it can set up the menus and determine keyboard equivalents. ;; so that it can set up the menus and determine keyboard equivalents.
;;;###autoload ;;;###autoload
(defvar ispell-menu-map nil "Key map for ispell menu.") (defvar ispell-menu-map nil "Key map for ispell menu.")
...@@ -1553,14 +1551,12 @@ This allows it to improve the suggestion list based on actual misspellings." ...@@ -1553,14 +1551,12 @@ This allows it to improve the suggestion list based on actual misspellings."
;; The following commands are not passed to Ispell until ;; The following commands are not passed to Ispell until
;; we have a *real* reason to invoke it. ;; we have a *real* reason to invoke it.
(cmds-to-defer '(?* ?@ ?~ ?+ ?- ?! ?%)) (cmds-to-defer '(?* ?@ ?~ ?+ ?- ?! ?%))
(default-major-mode 'fundamental-mode)
(session-buf ispell-session-buffer) (session-buf ispell-session-buffer)
(output-buf ispell-output-buffer) (output-buf ispell-output-buffer)
(ispell-args ispell-cmd-args) (ispell-args ispell-cmd-args)
(defdir ispell-process-directory) (defdir ispell-process-directory)
prev-pos) prev-pos)
(save-excursion (with-current-buffer session-buf
(set-buffer session-buf)
(setq prev-pos (point)) (setq prev-pos (point))
(setq default-directory defdir) (setq default-directory defdir)
(insert string) (insert string)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment