diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 41 | ||||
| -rw-r--r-- | lisp/allout.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/re-builder.el | 3 | ||||
| -rw-r--r-- | lisp/loadhist.el | 17 | ||||
| -rw-r--r-- | lisp/mail/rmail.el | 2 | ||||
| -rw-r--r-- | lisp/net/ange-ftp.el | 1 | ||||
| -rw-r--r-- | lisp/net/browse-url.el | 2 | ||||
| -rw-r--r-- | lisp/proced.el | 10 | ||||
| -rw-r--r-- | lisp/progmodes/cperl-mode.el | 12 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 11 | ||||
| -rw-r--r-- | lisp/server.el | 20 | ||||
| -rw-r--r-- | lisp/ses.el | 5 |
12 files changed, 91 insertions, 35 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index efb5e0ffad7..2a8188f8f5e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,44 @@ +2011-06-25 Eli Zaretskii <eliz@gnu.org> + + * net/ange-ftp.el (ange-ftp-insert-file-contents): Let-bind + buffer-file-type before setting its value, to avoid disastrous + global effects on decoding files for DOS/Windows systems. + (Bug#8780) + +2011-06-25 Juanma Barranquero <lekktu@gmail.com> + + * allout.el (allout-unload-function): Pass -1 to `allout-mode'. + + * ses.el (ses-unload-function): + * emacs-lisp/re-builder.el (re-builder-unload-function): Simplify. + + * proced.el (proced-unload-function): + * progmodes/cperl-mode.el (cperl-mode-unload-function): Remove. + +2011-06-25 Andreas Rottmann <a.rottmann@gmx.at> + + * server.el (server-create-window-system-frame): Add parameters arg. + (server-process-filter): Doc fix. Handle frame-parameters. + +2011-06-25 Juanma Barranquero <lekktu@gmail.com> + + Fix bug#8730, bug#8781. + + * loadhist.el (unload--set-major-mode): New function. + (unload-feature): Use it. + + * progmodes/python.el (python-after-info-look): Add autoload cookie. + (python-unload-function): New function. + +2011-06-25 Stefan Monnier <monnier@iro.umontreal.ca> + + * mail/rmail.el (rmail-show-message-1): Use restore-buffer-modified-p. + +2011-06-25 Giuseppe Scrivano <gscrivano@gnu.org> + + * net/browse-url.el (browse-url-firefox-program): Add icecat to + the candidates list. + 2011-06-24 Juanma Barranquero <lekktu@gmail.com> * progmodes/verilog-mode.el (verilog-mode): Fix test for bound variable. diff --git a/lisp/allout.el b/lisp/allout.el index 8cdf24176b0..1d4d4a20e11 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -2085,7 +2085,7 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be." (save-current-buffer (dolist (buffer (buffer-list)) (set-buffer buffer) - (when (allout-mode-p) (allout-mode)))) + (when (allout-mode-p) (allout-mode -1)))) ;; continue standard unloading nil) diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index 5ce18d020c9..ebbd6ff1fdf 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -714,8 +714,7 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions." (remove-hook 'after-change-functions 'reb-auto-update t) (remove-hook 'kill-buffer-hook 'reb-kill-buffer t) (when (reb-mode-buffer-p) - (reb-delete-overlays) - (funcall (or (default-value 'major-mode) 'fundamental-mode))))) + (reb-delete-overlays)))) ;; continue standard unloading nil) diff --git a/lisp/loadhist.el b/lisp/loadhist.el index 8e00c33cd81..943eac42b02 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -143,6 +143,19 @@ documentation of `unload-feature' for details.") (define-obsolete-variable-alias 'unload-hook-features-list 'unload-function-defs-list "22.2") +(defun unload--set-major-mode () + (save-current-buffer + (dolist (buffer (buffer-list)) + (set-buffer buffer) + (let ((proposed major-mode)) + ;; Look for an antecessor mode not defined in the feature we're processing + (while (and proposed (rassq proposed unload-function-defs-list)) + (setq proposed (get proposed 'derived-mode-parent))) + (unless (eq proposed major-mode) + ;; Two cases: either proposed is nil, and we want to switch to fundamental + ;; mode, or proposed is not nil and not major-mode, and so we use it. + (funcall (or proposed 'fundamental-mode))))))) + ;;;###autoload (defun unload-feature (feature &optional force) "Unload the library that provided FEATURE. @@ -222,6 +235,10 @@ something strange, such as redefining an Emacs function." (not (get (cdr y) 'autoload))) (setq auto-mode-alist (rassq-delete-all (cdr y) auto-mode-alist))))) + + ;; Change major mode in all buffers using one defined in the feature being unloaded. + (unload--set-major-mode) + (when (fboundp 'elp-restore-function) ; remove ELP stuff first (dolist (elt unload-function-defs-list) (when (symbolp elt) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 04ff457dcfb..640f1dfff29 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2674,7 +2674,7 @@ The current mail message becomes the message displayed." (let ((modiff (buffer-modified-p))) (rmail-set-attribute rmail-unseen-attr-index nil) (unless modiff - (set-buffer-modified-p nil))) + (restore-buffer-modified-p modiff))) ;; bracket the message in the mail ;; buffer and determine the coding system the transfer encoding. (rmail-swap-buffers-maybe) diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 0493ead7bbf..1282f86d503 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -3278,6 +3278,7 @@ system TYPE.") (name (ange-ftp-quote-string (nth 2 parsed))) (temp (ange-ftp-make-tmp-name host)) (binary (ange-ftp-binary-file filename)) + (buffer-file-type buffer-file-type) (abbr (ange-ftp-abbreviate-filename filename)) (coding-system-used last-coding-system-used) size) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index d9e6827d2df..ac12030471e 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -322,7 +322,7 @@ Defaults to the value of `browse-url-mozilla-arguments' at the time :group 'browse-url) (defcustom browse-url-firefox-program - (let ((candidates '("firefox" "iceweasel"))) + (let ((candidates '("firefox" "iceweasel" "icecat"))) (while (and candidates (not (executable-find (car candidates)))) (setq candidates (cdr candidates))) (or (car candidates) "firefox")) diff --git a/lisp/proced.el b/lisp/proced.el index 4436129ce16..11598d7350f 100644 --- a/lisp/proced.el +++ b/lisp/proced.el @@ -1869,16 +1869,6 @@ buffer. You can use it to recover marks." (message "Change in Proced buffer undone. Killed processes cannot be recovered by Emacs.")) -(defun proced-unload-function () - "Unload the Proced library." - (save-current-buffer - (dolist (buf (buffer-list)) - (set-buffer buf) - (when (eq major-mode 'proced-mode) - (funcall (or (default-value 'major-mode) 'fundamental-mode))))) - ;; continue standard unloading - nil) - (provide 'proced) ;;; proced.el ends here diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 2cce5e13fb0..8eb2d01c097 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -8971,18 +8971,6 @@ do extra unwind via `cperl-unwind-to-safe'." (substring v (match-beginning 1) (match-end 1))) "Version of IZ-supported CPerl package this file is based on.") -(defun cperl-mode-unload-function () - "Unload the Cperl mode library." - (let ((new-mode (if (eq (symbol-function 'perl-mode) 'cperl-mode) - 'fundamental-mode - 'perl-mode))) - (dolist (buf (buffer-list)) - (with-current-buffer buf - (when (eq major-mode 'cperl-mode) - (funcall new-mode))))) - ;; continue standard unloading - nil) - (provide 'cperl-mode) ;;; cperl-mode.el ends here diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 3d243f14f07..4d2f15c69d8 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1868,6 +1868,7 @@ instance. Assumes an inferior Python is running." (declare-function info-lookup-maybe-add-help "info-look" (&rest arg)) +;;;###autoload (defun python-after-info-look () "Set up info-look for Python. Used with `eval-after-load'." @@ -2731,6 +2732,16 @@ comint believe the user typed this string so that (defun python-sentinel (_proc _msg) (setq overlay-arrow-position nil)) +(defun python-unload-function () + "Unload the Python library." + (remove-hook 'comint-output-filter-functions 'python-pdbtrack-track-stack-file) + (setq minor-mode-alist (assq-delete-all 'python-pdbtrack-is-tracking-p + minor-mode-alist)) + (dolist (error '("^No symbol" "^Can't shift all lines enough")) + (setq debug-ignored-errors (delete error debug-ignored-errors))) + ;; continue standard unloading + nil) + (provide 'python) (provide 'python-21) diff --git a/lisp/server.el b/lisp/server.el index 04d35695c57..42da7a210c5 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -736,7 +736,8 @@ Server mode runs a process that accepts commands from the frame)) -(defun server-create-window-system-frame (display nowait proc parent-id) +(defun server-create-window-system-frame (display nowait proc parent-id + &optional parameters) (add-to-list 'frame-inherited-parameters 'client) (if (not (fboundp 'make-frame-on-display)) (progn @@ -751,7 +752,8 @@ Server mode runs a process that accepts commands from the ;; killing emacs on that frame. (let* ((params `((client . ,(if nowait 'nowait proc)) ;; This is a leftover, see above. - (environment . ,(process-get proc 'env)))) + (environment . ,(process-get proc 'env)) + ,@parameters)) (display (or display (frame-parameter nil 'display) (getenv "DISPLAY") @@ -832,6 +834,9 @@ The following commands are accepted by the server: `-current-frame' Forbid the creation of new frames. +`-frame-parameters ALIST' + Set the parameters of the created frame. + `-nowait' Request that the next frame created should not be associated with this client. @@ -940,6 +945,7 @@ The following commands are accepted by the client: commands dir use-current-frame + frame-parameters ;parameters for newly created frame tty-name ; nil, `window-system', or the tty name. tty-type ; string. files @@ -960,6 +966,13 @@ The following commands are accepted by the client: ;; -current-frame: Don't create frames. (`"-current-frame" (setq use-current-frame t)) + ;; -frame-parameters: Set frame parameters + (`"-frame-parameters" + (let ((alist (pop args-left))) + (if coding-system + (setq alist (decode-coding-string alist coding-system))) + (setq frame-parameters (car (read-from-string alist))))) + ;; -display DISPLAY: ;; Open X frames on the given display instead of the default. (`"-display" @@ -1075,7 +1088,8 @@ The following commands are accepted by the client: (if display (server-select-display display))) ((eq tty-name 'window-system) (server-create-window-system-frame display nowait proc - parent-id)) + parent-id + frame-parameters)) ;; When resuming on a tty, tty-name is nil. (tty-name (server-create-tty-frame tty-name tty-type proc)))) diff --git a/lisp/ses.el b/lisp/ses.el index 2fc85d27df9..b52d3e23c73 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -3006,11 +3006,6 @@ current column and continues until the next nonblank column." (dolist (fun '(copy-region-as-kill yank)) (ad-remove-advice fun 'around (intern (concat "ses-" (symbol-name fun)))) (ad-update fun)) - (save-current-buffer - (dolist (buf (buffer-list)) - (set-buffer buf) - (when (eq major-mode 'ses-mode) - (funcall (or (default-value 'major-mode) 'fundamental-mode))))) ;; continue standard unloading nil) |
