aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2011-06-25 11:31:36 -0700
committerPaul Eggert2011-06-25 11:31:36 -0700
commit948b98fd3c17e56b5fa606eedbe6487091f2b66d (patch)
tree470d98f5aa36d512902da3db4d9f35b3c0fe6f07 /lisp
parent7a7ef429182915745380c3074771d9f747dab964 (diff)
parent11fdef7d0cf3ef1ce30d1cd09ca9ca9a2b099d20 (diff)
downloademacs-948b98fd3c17e56b5fa606eedbe6487091f2b66d.tar.gz
emacs-948b98fd3c17e56b5fa606eedbe6487091f2b66d.zip
Merge from trunk.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog41
-rw-r--r--lisp/allout.el2
-rw-r--r--lisp/emacs-lisp/re-builder.el3
-rw-r--r--lisp/loadhist.el17
-rw-r--r--lisp/mail/rmail.el2
-rw-r--r--lisp/net/ange-ftp.el1
-rw-r--r--lisp/net/browse-url.el2
-rw-r--r--lisp/proced.el10
-rw-r--r--lisp/progmodes/cperl-mode.el12
-rw-r--r--lisp/progmodes/python.el11
-rw-r--r--lisp/server.el20
-rw-r--r--lisp/ses.el5
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 @@
12011-06-25 Eli Zaretskii <eliz@gnu.org>
2
3 * net/ange-ftp.el (ange-ftp-insert-file-contents): Let-bind
4 buffer-file-type before setting its value, to avoid disastrous
5 global effects on decoding files for DOS/Windows systems.
6 (Bug#8780)
7
82011-06-25 Juanma Barranquero <lekktu@gmail.com>
9
10 * allout.el (allout-unload-function): Pass -1 to `allout-mode'.
11
12 * ses.el (ses-unload-function):
13 * emacs-lisp/re-builder.el (re-builder-unload-function): Simplify.
14
15 * proced.el (proced-unload-function):
16 * progmodes/cperl-mode.el (cperl-mode-unload-function): Remove.
17
182011-06-25 Andreas Rottmann <a.rottmann@gmx.at>
19
20 * server.el (server-create-window-system-frame): Add parameters arg.
21 (server-process-filter): Doc fix. Handle frame-parameters.
22
232011-06-25 Juanma Barranquero <lekktu@gmail.com>
24
25 Fix bug#8730, bug#8781.
26
27 * loadhist.el (unload--set-major-mode): New function.
28 (unload-feature): Use it.
29
30 * progmodes/python.el (python-after-info-look): Add autoload cookie.
31 (python-unload-function): New function.
32
332011-06-25 Stefan Monnier <monnier@iro.umontreal.ca>
34
35 * mail/rmail.el (rmail-show-message-1): Use restore-buffer-modified-p.
36
372011-06-25 Giuseppe Scrivano <gscrivano@gnu.org>
38
39 * net/browse-url.el (browse-url-firefox-program): Add icecat to
40 the candidates list.
41
12011-06-24 Juanma Barranquero <lekktu@gmail.com> 422011-06-24 Juanma Barranquero <lekktu@gmail.com>
2 43
3 * progmodes/verilog-mode.el (verilog-mode): Fix test for bound variable. 44 * 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."
2085 (save-current-buffer 2085 (save-current-buffer
2086 (dolist (buffer (buffer-list)) 2086 (dolist (buffer (buffer-list))
2087 (set-buffer buffer) 2087 (set-buffer buffer)
2088 (when (allout-mode-p) (allout-mode)))) 2088 (when (allout-mode-p) (allout-mode -1))))
2089 ;; continue standard unloading 2089 ;; continue standard unloading
2090 nil) 2090 nil)
2091 2091
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."
714 (remove-hook 'after-change-functions 'reb-auto-update t) 714 (remove-hook 'after-change-functions 'reb-auto-update t)
715 (remove-hook 'kill-buffer-hook 'reb-kill-buffer t) 715 (remove-hook 'kill-buffer-hook 'reb-kill-buffer t)
716 (when (reb-mode-buffer-p) 716 (when (reb-mode-buffer-p)
717 (reb-delete-overlays) 717 (reb-delete-overlays))))
718 (funcall (or (default-value 'major-mode) 'fundamental-mode)))))
719 ;; continue standard unloading 718 ;; continue standard unloading
720 nil) 719 nil)
721 720
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.")
143(define-obsolete-variable-alias 'unload-hook-features-list 143(define-obsolete-variable-alias 'unload-hook-features-list
144 'unload-function-defs-list "22.2") 144 'unload-function-defs-list "22.2")
145 145
146(defun unload--set-major-mode ()
147 (save-current-buffer
148 (dolist (buffer (buffer-list))
149 (set-buffer buffer)
150 (let ((proposed major-mode))
151 ;; Look for an antecessor mode not defined in the feature we're processing
152 (while (and proposed (rassq proposed unload-function-defs-list))
153 (setq proposed (get proposed 'derived-mode-parent)))
154 (unless (eq proposed major-mode)
155 ;; Two cases: either proposed is nil, and we want to switch to fundamental
156 ;; mode, or proposed is not nil and not major-mode, and so we use it.
157 (funcall (or proposed 'fundamental-mode)))))))
158
146;;;###autoload 159;;;###autoload
147(defun unload-feature (feature &optional force) 160(defun unload-feature (feature &optional force)
148 "Unload the library that provided FEATURE. 161 "Unload the library that provided FEATURE.
@@ -222,6 +235,10 @@ something strange, such as redefining an Emacs function."
222 (not (get (cdr y) 'autoload))) 235 (not (get (cdr y) 'autoload)))
223 (setq auto-mode-alist 236 (setq auto-mode-alist
224 (rassq-delete-all (cdr y) auto-mode-alist))))) 237 (rassq-delete-all (cdr y) auto-mode-alist)))))
238
239 ;; Change major mode in all buffers using one defined in the feature being unloaded.
240 (unload--set-major-mode)
241
225 (when (fboundp 'elp-restore-function) ; remove ELP stuff first 242 (when (fboundp 'elp-restore-function) ; remove ELP stuff first
226 (dolist (elt unload-function-defs-list) 243 (dolist (elt unload-function-defs-list)
227 (when (symbolp elt) 244 (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."
2674 (let ((modiff (buffer-modified-p))) 2674 (let ((modiff (buffer-modified-p)))
2675 (rmail-set-attribute rmail-unseen-attr-index nil) 2675 (rmail-set-attribute rmail-unseen-attr-index nil)
2676 (unless modiff 2676 (unless modiff
2677 (set-buffer-modified-p nil))) 2677 (restore-buffer-modified-p modiff)))
2678 ;; bracket the message in the mail 2678 ;; bracket the message in the mail
2679 ;; buffer and determine the coding system the transfer encoding. 2679 ;; buffer and determine the coding system the transfer encoding.
2680 (rmail-swap-buffers-maybe) 2680 (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.")
3278 (name (ange-ftp-quote-string (nth 2 parsed))) 3278 (name (ange-ftp-quote-string (nth 2 parsed)))
3279 (temp (ange-ftp-make-tmp-name host)) 3279 (temp (ange-ftp-make-tmp-name host))
3280 (binary (ange-ftp-binary-file filename)) 3280 (binary (ange-ftp-binary-file filename))
3281 (buffer-file-type buffer-file-type)
3281 (abbr (ange-ftp-abbreviate-filename filename)) 3282 (abbr (ange-ftp-abbreviate-filename filename))
3282 (coding-system-used last-coding-system-used) 3283 (coding-system-used last-coding-system-used)
3283 size) 3284 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
322 :group 'browse-url) 322 :group 'browse-url)
323 323
324(defcustom browse-url-firefox-program 324(defcustom browse-url-firefox-program
325 (let ((candidates '("firefox" "iceweasel"))) 325 (let ((candidates '("firefox" "iceweasel" "icecat")))
326 (while (and candidates (not (executable-find (car candidates)))) 326 (while (and candidates (not (executable-find (car candidates))))
327 (setq candidates (cdr candidates))) 327 (setq candidates (cdr candidates)))
328 (or (car candidates) "firefox")) 328 (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."
1869 (message "Change in Proced buffer undone. 1869 (message "Change in Proced buffer undone.
1870Killed processes cannot be recovered by Emacs.")) 1870Killed processes cannot be recovered by Emacs."))
1871 1871
1872(defun proced-unload-function ()
1873 "Unload the Proced library."
1874 (save-current-buffer
1875 (dolist (buf (buffer-list))
1876 (set-buffer buf)
1877 (when (eq major-mode 'proced-mode)
1878 (funcall (or (default-value 'major-mode) 'fundamental-mode)))))
1879 ;; continue standard unloading
1880 nil)
1881
1882(provide 'proced) 1872(provide 'proced)
1883 1873
1884;;; proced.el ends here 1874;;; 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'."
8971 (substring v (match-beginning 1) (match-end 1))) 8971 (substring v (match-beginning 1) (match-end 1)))
8972 "Version of IZ-supported CPerl package this file is based on.") 8972 "Version of IZ-supported CPerl package this file is based on.")
8973 8973
8974(defun cperl-mode-unload-function ()
8975 "Unload the Cperl mode library."
8976 (let ((new-mode (if (eq (symbol-function 'perl-mode) 'cperl-mode)
8977 'fundamental-mode
8978 'perl-mode)))
8979 (dolist (buf (buffer-list))
8980 (with-current-buffer buf
8981 (when (eq major-mode 'cperl-mode)
8982 (funcall new-mode)))))
8983 ;; continue standard unloading
8984 nil)
8985
8986(provide 'cperl-mode) 8974(provide 'cperl-mode)
8987 8975
8988;;; cperl-mode.el ends here 8976;;; 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."
1868 1868
1869(declare-function info-lookup-maybe-add-help "info-look" (&rest arg)) 1869(declare-function info-lookup-maybe-add-help "info-look" (&rest arg))
1870 1870
1871;;;###autoload
1871(defun python-after-info-look () 1872(defun python-after-info-look ()
1872 "Set up info-look for Python. 1873 "Set up info-look for Python.
1873Used with `eval-after-load'." 1874Used with `eval-after-load'."
@@ -2731,6 +2732,16 @@ comint believe the user typed this string so that
2731(defun python-sentinel (_proc _msg) 2732(defun python-sentinel (_proc _msg)
2732 (setq overlay-arrow-position nil)) 2733 (setq overlay-arrow-position nil))
2733 2734
2735(defun python-unload-function ()
2736 "Unload the Python library."
2737 (remove-hook 'comint-output-filter-functions 'python-pdbtrack-track-stack-file)
2738 (setq minor-mode-alist (assq-delete-all 'python-pdbtrack-is-tracking-p
2739 minor-mode-alist))
2740 (dolist (error '("^No symbol" "^Can't shift all lines enough"))
2741 (setq debug-ignored-errors (delete error debug-ignored-errors)))
2742 ;; continue standard unloading
2743 nil)
2744
2734(provide 'python) 2745(provide 'python)
2735(provide 'python-21) 2746(provide 'python-21)
2736 2747
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
736 736
737 frame)) 737 frame))
738 738
739(defun server-create-window-system-frame (display nowait proc parent-id) 739(defun server-create-window-system-frame (display nowait proc parent-id
740 &optional parameters)
740 (add-to-list 'frame-inherited-parameters 'client) 741 (add-to-list 'frame-inherited-parameters 'client)
741 (if (not (fboundp 'make-frame-on-display)) 742 (if (not (fboundp 'make-frame-on-display))
742 (progn 743 (progn
@@ -751,7 +752,8 @@ Server mode runs a process that accepts commands from the
751 ;; killing emacs on that frame. 752 ;; killing emacs on that frame.
752 (let* ((params `((client . ,(if nowait 'nowait proc)) 753 (let* ((params `((client . ,(if nowait 'nowait proc))
753 ;; This is a leftover, see above. 754 ;; This is a leftover, see above.
754 (environment . ,(process-get proc 'env)))) 755 (environment . ,(process-get proc 'env))
756 ,@parameters))
755 (display (or display 757 (display (or display
756 (frame-parameter nil 'display) 758 (frame-parameter nil 'display)
757 (getenv "DISPLAY") 759 (getenv "DISPLAY")
@@ -832,6 +834,9 @@ The following commands are accepted by the server:
832`-current-frame' 834`-current-frame'
833 Forbid the creation of new frames. 835 Forbid the creation of new frames.
834 836
837`-frame-parameters ALIST'
838 Set the parameters of the created frame.
839
835`-nowait' 840`-nowait'
836 Request that the next frame created should not be 841 Request that the next frame created should not be
837 associated with this client. 842 associated with this client.
@@ -940,6 +945,7 @@ The following commands are accepted by the client:
940 commands 945 commands
941 dir 946 dir
942 use-current-frame 947 use-current-frame
948 frame-parameters ;parameters for newly created frame
943 tty-name ; nil, `window-system', or the tty name. 949 tty-name ; nil, `window-system', or the tty name.
944 tty-type ; string. 950 tty-type ; string.
945 files 951 files
@@ -960,6 +966,13 @@ The following commands are accepted by the client:
960 ;; -current-frame: Don't create frames. 966 ;; -current-frame: Don't create frames.
961 (`"-current-frame" (setq use-current-frame t)) 967 (`"-current-frame" (setq use-current-frame t))
962 968
969 ;; -frame-parameters: Set frame parameters
970 (`"-frame-parameters"
971 (let ((alist (pop args-left)))
972 (if coding-system
973 (setq alist (decode-coding-string alist coding-system)))
974 (setq frame-parameters (car (read-from-string alist)))))
975
963 ;; -display DISPLAY: 976 ;; -display DISPLAY:
964 ;; Open X frames on the given display instead of the default. 977 ;; Open X frames on the given display instead of the default.
965 (`"-display" 978 (`"-display"
@@ -1075,7 +1088,8 @@ The following commands are accepted by the client:
1075 (if display (server-select-display display))) 1088 (if display (server-select-display display)))
1076 ((eq tty-name 'window-system) 1089 ((eq tty-name 'window-system)
1077 (server-create-window-system-frame display nowait proc 1090 (server-create-window-system-frame display nowait proc
1078 parent-id)) 1091 parent-id
1092 frame-parameters))
1079 ;; When resuming on a tty, tty-name is nil. 1093 ;; When resuming on a tty, tty-name is nil.
1080 (tty-name 1094 (tty-name
1081 (server-create-tty-frame tty-name tty-type proc)))) 1095 (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."
3006 (dolist (fun '(copy-region-as-kill yank)) 3006 (dolist (fun '(copy-region-as-kill yank))
3007 (ad-remove-advice fun 'around (intern (concat "ses-" (symbol-name fun)))) 3007 (ad-remove-advice fun 'around (intern (concat "ses-" (symbol-name fun))))
3008 (ad-update fun)) 3008 (ad-update fun))
3009 (save-current-buffer
3010 (dolist (buf (buffer-list))
3011 (set-buffer buf)
3012 (when (eq major-mode 'ses-mode)
3013 (funcall (or (default-value 'major-mode) 'fundamental-mode)))))
3014 ;; continue standard unloading 3009 ;; continue standard unloading
3015 nil) 3010 nil)
3016 3011