aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2011-10-12 09:48:12 -0700
committerPaul Eggert2011-10-12 09:48:12 -0700
commit682432fc544c2bb4e0531c2931d43bce085eb16a (patch)
tree4bc9e4d78f34e19254382246b89a3462a0186311 /lisp
parentd44287d4adc1e268ef9974ea72010f0186f40197 (diff)
parent79beb1785aac3f8326f58710462e4b6be7f0449a (diff)
downloademacs-682432fc544c2bb4e0531c2931d43bce085eb16a.tar.gz
emacs-682432fc544c2bb4e0531c2931d43bce085eb16a.zip
Merge from trunk.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog85
-rw-r--r--lisp/bindings.el2
-rw-r--r--lisp/eshell/eshell.el8
-rw-r--r--lisp/gnus/ChangeLog20
-rw-r--r--lisp/gnus/html2text.el7
-rw-r--r--lisp/gnus/message.el8
-rw-r--r--lisp/gnus/spam.el24
-rw-r--r--lisp/isearch.el9
-rw-r--r--lisp/mail/sendmail.el71
-rw-r--r--lisp/mail/smtpmail.el2
-rw-r--r--lisp/minibuffer.el103
-rw-r--r--lisp/net/tramp.el11
-rw-r--r--lisp/progmodes/f90.el23
-rw-r--r--lisp/simple.el50
-rw-r--r--lisp/textmodes/flyspell.el97
-rw-r--r--lisp/vc/vc-dispatcher.el21
-rw-r--r--lisp/vc/vc.el6
-rw-r--r--lisp/window.el53
18 files changed, 365 insertions, 235 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fdc61721a13..58a038676e7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,88 @@
12011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * textmodes/flyspell.el (flyspell-word): Move with-local-quit
4 from here...
5 (flyspell-post-command-hook): ...to here.
6
72011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
8
9 * mail/sendmail.el (send-mail-function): Don't use sendmail-query-once
10 if not needed.
11 (sendmail-query-once): Remove OS dependencies. Make it a 3-way choice
12 using completion. Protect against "slow" callers.
13 Remove the "message hack".
14
152011-10-11 Juri Linkov <juri@jurta.org>
16
17 * isearch.el (isearch-lazy-highlight-word): New variable.
18 (isearch-lazy-highlight-new-loop, isearch-lazy-highlight-search):
19 Use it. (Bug#9727)
20
212011-10-11 Glenn Morris <rgm@gnu.org>
22
23 * progmodes/f90.el (f90-next-statement): Ignore preprocessor lines,
24 like f90-previous-statement does.
25
262011-10-11 Thierry Volpiatto <thierry.volpiatto@gmail.com>
27
28 * eshell/eshell.el (eshell-command): History should be saved
29 only in interactive use, to avoid error.
30
312011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
32
33 * minibuffer.el (completion-file-name-table): Fix last change,
34 i.e. ignore normal errors but not the other ones.
35
362011-10-10 Martin Rudalics <rudalics@gmx.at>
37
38 * window.el (special-display-buffer-names)
39 (special-display-regexps): Remove some remnants of earlier
40 changes from doc-strings.
41 (quit-windows-on): New function.
42
43 * vc/vc.el (vc-revert, vc-rollback):
44 * vc/vc-dispatcher.el (vc-finish-logentry): Call quit-windows-on
45 instead of deleting windows. (Bug#4557) (Bug#5310) (Bug#5556)
46 (Bug#6183) (Bug#7074) (Bug#7447)
47
482011-10-09 Martin Rudalics <rudalics@gmx.at>
49
50 * window.el (frame-auto-hide-function): Add version tag.
51 (Bug#9699)
52
532011-10-09 Michael Albinus <michael.albinus@gmx.de>
54
55 * net/tramp.el (tramp-file-name-handler): Add 'debug to the error
56 condition.
57
582011-10-09 Leo Liu <sdl.web@gmail.com>
59
60 * mail/smtpmail.el (smtpmail-send-data): Add a missing space.
61 (Bug#9701)
62
632011-10-08 Glenn Morris <rgm@gnu.org>
64
65 * progmodes/f90.el (f90-calculate-indent): Give preprocessor lines
66 before the first code statement zero indent. (Bug#9690)
67
682011-10-08 Chong Yidong <cyd@stupidchicken.com>
69
70 * simple.el (count-words-region): Always count in the region.
71 Report the number of lines and characters too.
72 (count-words): New command, which counts in the buffer if the
73 region is inactive, as count-words-region used to.
74 (count-words--message): New function. Handle plurals.
75 (count-lines-region): Make it an alias for count-words-region.
76
77 * bindings.el (esc-map): Replace count-lines-region with
78 count-words-region.
79
802011-10-08 Martin Rudalics <rudalics@gmx.at>
81
82 * window.el (window--delete): Delete dedicated frame
83 unconditionally when argument KILL is non-nil. (Bug#9699)
84 (switch-to-buffer): Fix doc-string typo.
85
12011-10-08 Thierry Volpiatto <thierry.volpiatto@gmail.com> 862011-10-08 Thierry Volpiatto <thierry.volpiatto@gmail.com>
2 87
3 * lisp/eshell/eshell.el (eshell-command): Avoid using hooks. 88 * lisp/eshell/eshell.el (eshell-command): Avoid using hooks.
diff --git a/lisp/bindings.el b/lisp/bindings.el
index c056fce1e60..1a10d117987 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -773,7 +773,7 @@ if `inhibit-field-text-motion' is non-nil."
773(define-key ctl-x-map "\C-o" 'delete-blank-lines) 773(define-key ctl-x-map "\C-o" 'delete-blank-lines)
774(define-key esc-map " " 'just-one-space) 774(define-key esc-map " " 'just-one-space)
775(define-key esc-map "z" 'zap-to-char) 775(define-key esc-map "z" 'zap-to-char)
776(define-key esc-map "=" 'count-lines-region) 776(define-key esc-map "=" 'count-words-region)
777(define-key ctl-x-map "=" 'what-cursor-position) 777(define-key ctl-x-map "=" 'what-cursor-position)
778(define-key esc-map ":" 'eval-expression) 778(define-key esc-map ":" 'eval-expression)
779;; Define ESC ESC : like ESC : for people who type ESC ESC out of habit. 779;; Define ESC ESC : like ESC : for people who type ESC ESC out of habit.
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el
index c33c2ccf9d1..0c1c03941e5 100644
--- a/lisp/eshell/eshell.el
+++ b/lisp/eshell/eshell.el
@@ -349,11 +349,9 @@ With prefix ARG, insert output into the current buffer at point."
349 (minibuffer-with-setup-hook #'(lambda () 349 (minibuffer-with-setup-hook #'(lambda ()
350 (eshell-mode) 350 (eshell-mode)
351 (eshell-return-exits-minibuffer)) 351 (eshell-return-exits-minibuffer))
352 (unwind-protect 352 (unless command
353 (unless command 353 (setq command (read-from-minibuffer "Emacs shell command: "))
354 (setq command (read-from-minibuffer "Emacs shell command: "))) 354 (eshell-add-input-to-history command))))
355 (when command
356 (eshell-add-input-to-history command)))))
357 (unless command 355 (unless command
358 (error "No command specified!")) 356 (error "No command specified!"))
359 ;; redirection into the current buffer is achieved by adding an 357 ;; redirection into the current buffer is achieved by adding an
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 69041ccbbd0..2fd624e819b 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,23 @@
12011-10-11 Andreas Schwab <schwab@linux-m68k.org>
2
3 * html2text.el (html2text-clean-anchor): Check for quotes around
4 `href' value.
5
62011-10-11 Teodor Zlatanov <tzz@lifelogs.com>
7
8 * spam.el (spam-check-BBDB): Simplify and support BBDB 3.x when
9 searching. Drop `bbdb-cache'.
10
112011-10-11 Katsumi Yamaoka <yamaoka@jpl.org>
12
13 * message.el (message-signed-or-encrypted-p): Exclude header when
14 checking if there is signed or encrypted body in text/plain message.
15
162011-10-09 Andreas Schwab <schwab@linux-m68k.org>
17
18 * html2text.el (html2text-get-attr): Correctly handle attribute values
19 containing "=".
20
12011-09-22 Kan-Ru Chen <kanru@kanru.info> 212011-09-22 Kan-Ru Chen <kanru@kanru.info>
2 22
3 * ecomplete.el (ecomplete-display-matches): Use a local keymap to 23 * ecomplete.el (ecomplete-display-matches): Use a local keymap to
diff --git a/lisp/gnus/html2text.el b/lisp/gnus/html2text.el
index 0635ab0afc6..8cfd9b9f903 100644
--- a/lisp/gnus/html2text.el
+++ b/lisp/gnus/html2text.el
@@ -193,7 +193,7 @@ formatting, and then moved afterward.")
193 ;; size=3 193 ;; size=3
194 ((string-match "[^ ]=[^ ]" prev) 194 ((string-match "[^ ]=[^ ]" prev)
195 (let ((attr (nth 0 (split-string prev "="))) 195 (let ((attr (nth 0 (split-string prev "=")))
196 (value (nth 1 (split-string prev "=")))) 196 (value (substring prev (1+ (string-match "=" prev)))))
197 (setq attr-list (cons (list attr value) attr-list)))) 197 (setq attr-list (cons (list attr value) attr-list))))
198 ;; size= 3 198 ;; size= 3
199 ((string-match "[^ ]=\\'" prev) 199 ((string-match "[^ ]=\\'" prev)
@@ -204,7 +204,7 @@ formatting, and then moved afterward.")
204 ;; size=3 204 ;; size=3
205 ((string-match "[^ ]=[^ ]" this) 205 ((string-match "[^ ]=[^ ]" this)
206 (let ((attr (nth 0 (split-string this "="))) 206 (let ((attr (nth 0 (split-string this "=")))
207 (value (nth 1 (split-string this "=")))) 207 (value (substring prev (1+ (string-match "=" this)))))
208 (setq attr-list (cons (list attr value) attr-list)))) 208 (setq attr-list (cons (list attr value) attr-list))))
209 ;; size =3 209 ;; size =3
210 ((string-match "\\`=[^ ]" this) 210 ((string-match "\\`=[^ ]" this)
@@ -358,7 +358,8 @@ formatting, and then moved afterward.")
358 (delete-region p1 p4) 358 (delete-region p1 p4)
359 (when href 359 (when href
360 (goto-char p1) 360 (goto-char p1)
361 (insert (substring href 1 -1 )) 361 (insert (if (string-match "\\`['\"].*['\"]\\'" href)
362 (substring href 1 -1) href))
362 (put-text-property p1 (point) 'face 'bold)))) 363 (put-text-property p1 (point) 'face 'bold))))
363 364
364;; 365;;
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 7203ef69a14..948892d1e13 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -7429,14 +7429,16 @@ is for the internal use."
7429 (with-temp-buffer 7429 (with-temp-buffer
7430 (insert-buffer-substring cur) 7430 (insert-buffer-substring cur)
7431 (when (setq handles (mm-dissect-buffer t t)) 7431 (when (setq handles (mm-dissect-buffer t t))
7432 (if (and (prog1 7432 (if (and (bufferp (car handles))
7433 (bufferp (car handles))
7434 (mm-destroy-parts handles))
7435 (equal (mm-handle-media-type handles) "text/plain")) 7433 (equal (mm-handle-media-type handles) "text/plain"))
7436 (progn 7434 (progn
7435 (erase-buffer)
7436 (insert-buffer-substring (car handles))
7437 (mm-decode-content-transfer-encoding 7437 (mm-decode-content-transfer-encoding
7438 (mm-handle-encoding handles)) 7438 (mm-handle-encoding handles))
7439 (mm-destroy-parts handles)
7439 (setq handles (mm-uu-dissect))) 7440 (setq handles (mm-uu-dissect)))
7441 (mm-destroy-parts handles)
7440 (setq handles nil)))))) 7442 (setq handles nil))))))
7441 (when handles 7443 (when handles
7442 (prog1 7444 (prog1
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index c7f993d7293..fa152f688c4 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -2150,29 +2150,13 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
2150 2150
2151 (defun spam-check-BBDB () 2151 (defun spam-check-BBDB ()
2152 "Mail from people in the BBDB is classified as ham or non-spam" 2152 "Mail from people in the BBDB is classified as ham or non-spam"
2153 (let ((who (message-fetch-field "from")) 2153 (let ((who (message-fetch-field "from")))
2154 bbdb-cache bbdb-hashtable)
2155 (when spam-cache-lookups
2156 (setq bbdb-cache (gethash 'spam-use-BBDB spam-caches))
2157 (unless bbdb-cache
2158 (setq bbdb-cache (make-vector 17 0)) ; a good starting hash value
2159 ;; this is based on the expanded (bbdb-hashtable) macro
2160 ;; without the debugging support
2161 (with-current-buffer (bbdb-buffer)
2162 (save-excursion
2163 (save-window-excursion
2164 (bbdb-records nil t)
2165 (mapatoms
2166 (lambda (symbol)
2167 (intern (downcase (symbol-name symbol)) bbdb-cache))
2168 bbdb-hashtable))))
2169 (puthash 'spam-use-BBDB bbdb-cache spam-caches)))
2170 (when who 2154 (when who
2171 (setq who (nth 1 (gnus-extract-address-components who))) 2155 (setq who (nth 1 (gnus-extract-address-components who)))
2172 (if 2156 (if
2173 (if spam-cache-lookups 2157 (if (fboundp 'bbdb-search)
2174 (intern-soft (downcase who) bbdb-cache) 2158 (bbdb-search (bbdb-records) who) ;; v3
2175 (bbdb-search-simple nil who)) 2159 (bbdb-search-simple nil who)) ;; v2
2176 t 2160 t
2177 (if spam-use-BBDB-exclusive 2161 (if spam-use-BBDB-exclusive
2178 spam-split-group 2162 spam-split-group
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 81e0b4bf3b7..6cfcce59672 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2617,6 +2617,7 @@ since they have special meaning in a regexp."
2617(defvar isearch-lazy-highlight-case-fold-search nil) 2617(defvar isearch-lazy-highlight-case-fold-search nil)
2618(defvar isearch-lazy-highlight-regexp nil) 2618(defvar isearch-lazy-highlight-regexp nil)
2619(defvar isearch-lazy-highlight-space-regexp nil) 2619(defvar isearch-lazy-highlight-space-regexp nil)
2620(defvar isearch-lazy-highlight-word nil)
2620(defvar isearch-lazy-highlight-forward nil) 2621(defvar isearch-lazy-highlight-forward nil)
2621(defvar isearch-lazy-highlight-error nil) 2622(defvar isearch-lazy-highlight-error nil)
2622 2623
@@ -2655,6 +2656,8 @@ by other Emacs features."
2655 isearch-case-fold-search)) 2656 isearch-case-fold-search))
2656 (not (eq isearch-lazy-highlight-regexp 2657 (not (eq isearch-lazy-highlight-regexp
2657 isearch-regexp)) 2658 isearch-regexp))
2659 (not (eq isearch-lazy-highlight-word
2660 isearch-word))
2658 (not (= (window-start) 2661 (not (= (window-start)
2659 isearch-lazy-highlight-window-start)) 2662 isearch-lazy-highlight-window-start))
2660 (not (= (window-end) ; Window may have been split/joined. 2663 (not (= (window-end) ; Window may have been split/joined.
@@ -2675,11 +2678,12 @@ by other Emacs features."
2675 isearch-lazy-highlight-window-end (window-end) 2678 isearch-lazy-highlight-window-end (window-end)
2676 isearch-lazy-highlight-start (point) 2679 isearch-lazy-highlight-start (point)
2677 isearch-lazy-highlight-end (point) 2680 isearch-lazy-highlight-end (point)
2681 isearch-lazy-highlight-wrapped nil
2678 isearch-lazy-highlight-last-string isearch-string 2682 isearch-lazy-highlight-last-string isearch-string
2679 isearch-lazy-highlight-case-fold-search isearch-case-fold-search 2683 isearch-lazy-highlight-case-fold-search isearch-case-fold-search
2680 isearch-lazy-highlight-regexp isearch-regexp 2684 isearch-lazy-highlight-regexp isearch-regexp
2681 isearch-lazy-highlight-wrapped nil
2682 isearch-lazy-highlight-space-regexp search-whitespace-regexp 2685 isearch-lazy-highlight-space-regexp search-whitespace-regexp
2686 isearch-lazy-highlight-word isearch-word
2683 isearch-lazy-highlight-forward isearch-forward) 2687 isearch-lazy-highlight-forward isearch-forward)
2684 (unless (equal isearch-string "") 2688 (unless (equal isearch-string "")
2685 (setq isearch-lazy-highlight-timer 2689 (setq isearch-lazy-highlight-timer
@@ -2693,6 +2697,7 @@ Attempt to do the search exactly the way the pending Isearch would."
2693 (let ((case-fold-search isearch-lazy-highlight-case-fold-search) 2697 (let ((case-fold-search isearch-lazy-highlight-case-fold-search)
2694 (isearch-regexp isearch-lazy-highlight-regexp) 2698 (isearch-regexp isearch-lazy-highlight-regexp)
2695 (search-spaces-regexp isearch-lazy-highlight-space-regexp) 2699 (search-spaces-regexp isearch-lazy-highlight-space-regexp)
2700 (isearch-word isearch-lazy-highlight-word)
2696 (search-invisible nil) ; don't match invisible text 2701 (search-invisible nil) ; don't match invisible text
2697 (retry t) 2702 (retry t)
2698 (success nil) 2703 (success nil)
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index dedb5719934..4557bf0fb3f 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -140,7 +140,11 @@ Otherwise, let mailer send back a message to report errors."
140 140
141;; Useful to set in site-init.el 141;; Useful to set in site-init.el
142;;;###autoload 142;;;###autoload
143(defcustom send-mail-function 'sendmail-query-once 143(defcustom send-mail-function
144 ;; Assume smtpmail is the preferred choice if it's already configured.
145 (if (and (boundp 'smtpmail-smtp-server)
146 smtpmail-smtp-server)
147 'smtpmail-send-it 'sendmail-query-once)
144 "Function to call to send the current buffer as mail. 148 "Function to call to send the current buffer as mail.
145The headers should be delimited by a line which is 149The headers should be delimited by a line which is
146not a valid RFC822 header or continuation line, 150not a valid RFC822 header or continuation line,
@@ -505,46 +509,33 @@ by Emacs.)")
505(defun sendmail-query-once () 509(defun sendmail-query-once ()
506 "Query for `send-mail-function' and send mail with it. 510 "Query for `send-mail-function' and send mail with it.
507This also saves the value of `send-mail-function' via Customize." 511This also saves the value of `send-mail-function' via Customize."
508 (let* ((mail-buffer (current-buffer)) 512 ;; If send-mail-function is already setup, we're incorrectly called
509 ;; Compute default mail sender, preferring smtpmail if it's 513 ;; a second time, probably because someone's using an old value
510 ;; already configured. 514 ;; of send-mail-function.
511 (default (cond 515 (when (eq send-mail-function 'sendmail-query-once)
512 ((and (boundp 'smtpmail-smtp-server) 516 (let* ((options `(("My favorite mail client" . mailclient-send-it)
513 smtpmail-smtp-server) 517 ("Configuring Emacs's SMTP variables" . smtpmail-send-it)
514 'smtpmail-send-it) 518 ,@(when (and sendmail-program
515 ((or (and window-system (eq system-type 'darwin)) 519 (executable-find sendmail-program))
516 (eq system-type 'windows-nt)) 520 '(("The system's mail transport agent"
517 'mailclient-send-it) 521 . sendmail-send-it)))))
518 ((and sendmail-program 522 (choice
519 (executable-find sendmail-program)) 523 ;; Query the user.
520 'sendmail-send-it))) 524 (with-temp-buffer
521 (send-function (if (eq default 'smtpmail-send-it) 525 (rename-buffer "*Mail Help*" t)
522 'smtpmail-send-it))) 526 (insert "Emacs has not been set up for sending mail.\n
523 (unless send-function 527It can be told to send mail either via your favorite mail client,
524 ;; Query the user. 528or via the system's mail transport agent (\"sendmail\"), if any,
525 (with-temp-buffer 529or it can send email on its own by configuring the SMTP parameters.\n
526 (rename-buffer "*Mail Help*" t)
527 (erase-buffer)
528 (insert "Emacs has not been set up for sending mail.\n
529Type `y' to configure and use Emacs as a mail client,
530or `n' to use your system's default mailer.\n
531To change your decision later, customize `send-mail-function'.\n") 530To change your decision later, customize `send-mail-function'.\n")
532 (goto-char (point-min)) 531 (goto-char (point-min))
533 (display-buffer (current-buffer)) 532 (display-buffer (current-buffer))
534 (if (y-or-n-p "Set up Emacs for sending SMTP mail? ") 533 (let ((completion-ignore-case t))
535 ;; FIXME: We should check and correct the From: field too. 534 (completing-read "Send mail via: "
536 (setq send-function 'smtpmail-send-it) 535 options nil 'require-match)))))
537 (setq send-function default)))) 536 (customize-save-variable 'send-mail-function
538 (when send-function 537 (cdr (assoc-string choice options t)))))
539 (customize-save-variable 'send-mail-function send-function) 538 (funcall send-mail-function))
540 ;; HACK: Message mode stupidly has `message-send-mail-function',
541 ;; so we must update it too or sending again in the current
542 ;; Emacs session will still call `sendmail-query-once'.
543 (and (boundp 'message-send-mail-function)
544 (eq message-send-mail-function 'sendmail-query-once)
545 (customize-set-variable 'message-send-mail-function
546 send-function))
547 (funcall send-function))))
548 539
549(defun sendmail-sync-aliases () 540(defun sendmail-sync-aliases ()
550 (when mail-personal-alias-file 541 (when mail-personal-alias-file
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index edcc82011af..026b03e350f 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -924,7 +924,7 @@ The list is in preference order.")
924(defun smtpmail-send-data (process buffer) 924(defun smtpmail-send-data (process buffer)
925 (let ((data-continue t) sending-data 925 (let ((data-continue t) sending-data
926 (pr (with-current-buffer buffer 926 (pr (with-current-buffer buffer
927 (make-progress-reporter "Sending email" 927 (make-progress-reporter "Sending email "
928 (point-min) (point-max))))) 928 (point-min) (point-max)))))
929 (with-current-buffer buffer 929 (with-current-buffer buffer
930 (goto-char (point-min))) 930 (goto-char (point-min)))
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index e2ed07f1ef1..acb71d115d1 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1789,59 +1789,60 @@ same as `substitute-in-file-name'."
1789 1789
1790(defun completion-file-name-table (string pred action) 1790(defun completion-file-name-table (string pred action)
1791 "Completion table for file names." 1791 "Completion table for file names."
1792 (with-demoted-errors 1792 (condition-case nil
1793 (cond 1793 (cond
1794 ((eq action 'metadata) '(metadata (category . file))) 1794 ((eq action 'metadata) '(metadata (category . file)))
1795 ((eq (car-safe action) 'boundaries) 1795 ((eq (car-safe action) 'boundaries)
1796 (let ((start (length (file-name-directory string))) 1796 (let ((start (length (file-name-directory string)))
1797 (end (string-match-p "/" (cdr action)))) 1797 (end (string-match-p "/" (cdr action))))
1798 (list* 'boundaries 1798 (list* 'boundaries
1799 ;; if `string' is "C:" in w32, (file-name-directory string) 1799 ;; if `string' is "C:" in w32, (file-name-directory string)
1800 ;; returns "C:/", so `start' is 3 rather than 2. 1800 ;; returns "C:/", so `start' is 3 rather than 2.
1801 ;; Not quite sure what is The Right Fix, but clipping it 1801 ;; Not quite sure what is The Right Fix, but clipping it
1802 ;; back to 2 will work for this particular case. We'll 1802 ;; back to 2 will work for this particular case. We'll
1803 ;; see if we can come up with a better fix when we bump 1803 ;; see if we can come up with a better fix when we bump
1804 ;; into more such problematic cases. 1804 ;; into more such problematic cases.
1805 (min start (length string)) end))) 1805 (min start (length string)) end)))
1806
1807 ((eq action 'lambda)
1808 (if (zerop (length string))
1809 nil ;Not sure why it's here, but it probably doesn't harm.
1810 (funcall (or pred 'file-exists-p) string)))
1811 1806
1812 (t 1807 ((eq action 'lambda)
1813 (let* ((name (file-name-nondirectory string)) 1808 (if (zerop (length string))
1814 (specdir (file-name-directory string)) 1809 nil ;Not sure why it's here, but it probably doesn't harm.
1815 (realdir (or specdir default-directory))) 1810 (funcall (or pred 'file-exists-p) string)))
1816 1811
1817 (cond 1812 (t
1818 ((null action) 1813 (let* ((name (file-name-nondirectory string))
1819 (let ((comp (file-name-completion name realdir pred))) 1814 (specdir (file-name-directory string))
1820 (if (stringp comp) 1815 (realdir (or specdir default-directory)))
1821 (concat specdir comp) 1816
1822 comp))) 1817 (cond
1823 1818 ((null action)
1824 ((eq action t) 1819 (let ((comp (file-name-completion name realdir pred)))
1825 (let ((all (file-name-all-completions name realdir))) 1820 (if (stringp comp)
1826 1821 (concat specdir comp)
1827 ;; Check the predicate, if necessary. 1822 comp)))
1828 (unless (memq pred '(nil file-exists-p)) 1823
1829 (let ((comp ()) 1824 ((eq action t)
1830 (pred 1825 (let ((all (file-name-all-completions name realdir)))
1831 (if (eq pred 'file-directory-p) 1826
1832 ;; Brute-force speed up for directory checking: 1827 ;; Check the predicate, if necessary.
1833 ;; Discard strings which don't end in a slash. 1828 (unless (memq pred '(nil file-exists-p))
1834 (lambda (s) 1829 (let ((comp ())
1835 (let ((len (length s))) 1830 (pred
1836 (and (> len 0) (eq (aref s (1- len)) ?/)))) 1831 (if (eq pred 'file-directory-p)
1837 ;; Must do it the hard (and slow) way. 1832 ;; Brute-force speed up for directory checking:
1838 pred))) 1833 ;; Discard strings which don't end in a slash.
1839 (let ((default-directory (expand-file-name realdir))) 1834 (lambda (s)
1840 (dolist (tem all) 1835 (let ((len (length s)))
1841 (if (funcall pred tem) (push tem comp)))) 1836 (and (> len 0) (eq (aref s (1- len)) ?/))))
1842 (setq all (nreverse comp)))) 1837 ;; Must do it the hard (and slow) way.
1843 1838 pred)))
1844 all)))))))) 1839 (let ((default-directory (expand-file-name realdir)))
1840 (dolist (tem all)
1841 (if (funcall pred tem) (push tem comp))))
1842 (setq all (nreverse comp))))
1843
1844 all))))))
1845 (file-error nil))) ;PCM often calls with invalid directories.
1845 1846
1846(defvar read-file-name-predicate nil 1847(defvar read-file-name-predicate nil
1847 "Current predicate used by `read-file-name-internal'.") 1848 "Current predicate used by `read-file-name-internal'.")
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 1381d33efa2..7ace2911501 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1886,7 +1886,7 @@ Falls back to normal file name handler if no Tramp file name handler exists."
1886 (apply foreign operation args)) 1886 (apply foreign operation args))
1887 1887
1888 ;; Trace that somebody has interrupted the operation. 1888 ;; Trace that somebody has interrupted the operation.
1889 (quit 1889 ((debug quit)
1890 (let (tramp-message-show-message) 1890 (let (tramp-message-show-message)
1891 (tramp-message 1891 (tramp-message
1892 v 1 "Interrupt received in operation %s" 1892 v 1 "Interrupt received in operation %s"
@@ -1898,6 +1898,9 @@ Falls back to normal file name handler if no Tramp file name handler exists."
1898 ;; operations shall return at least a default value 1898 ;; operations shall return at least a default value
1899 ;; in order to give the user a chance to correct the 1899 ;; in order to give the user a chance to correct the
1900 ;; file name in the minibuffer. 1900 ;; file name in the minibuffer.
1901 ;; We cannot use 'debug as error handler. In order
1902 ;; to get a full backtrace, one could apply
1903 ;; (setq debug-on-error t debug-on-signal t)
1901 (error 1904 (error
1902 (cond 1905 (cond
1903 ((and completion (zerop (length localname)) 1906 ((and completion (zerop (length localname))
@@ -3850,9 +3853,9 @@ Only works for Bourne-like shells."
3850;; * Run emerge on two remote files. Bug is described here: 3853;; * Run emerge on two remote files. Bug is described here:
3851;; <http://www.mail-archive.com/tramp-devel@nongnu.org/msg01041.html>. 3854;; <http://www.mail-archive.com/tramp-devel@nongnu.org/msg01041.html>.
3852;; (Bug#6850) 3855;; (Bug#6850)
3853 3856;; * It would be very useful if it were possible to load or save a
3854;; Functions for file-name-handler-alist: 3857;; buffer using Tramp in a non-blocking way so that use of Emacs on
3855;; diff-latest-backup-file -- in diff.el 3858;; other buffers could continue. (Bug#9617)
3856 3859
3857;;; tramp.el ends here 3860;;; tramp.el ends here
3858 3861
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index eb33822ce55..007203a8b21 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -1489,14 +1489,19 @@ Does not check type and subprogram indentation."
1489 (if (not (f90-previous-statement)) 1489 (if (not (f90-previous-statement))
1490 ;; If f90-previous-statement returns nil, we must have been 1490 ;; If f90-previous-statement returns nil, we must have been
1491 ;; called from on or before the first line of the first statement. 1491 ;; called from on or before the first line of the first statement.
1492 (setq icol (if (save-excursion 1492 (setq icol (if (or (save-excursion
1493 ;; f90-previous-statement has moved us over 1493 (goto-char pnt)
1494 ;; comment/blank lines, so we need to get 1494 (beginning-of-line)
1495 ;; back to the first code statement. 1495 ;; Preprocessor line before code statement.
1496 (when (looking-at "[ \t]*\\([!#]\\|$\\)") 1496 (looking-at "[ \t]*#"))
1497 (f90-next-statement)) 1497 (progn
1498 (skip-chars-forward " \t0-9") 1498 ;; f90-previous-statement has moved us over
1499 (f90-looking-at-program-block-start)) 1499 ;; comment/blank lines, so we need to get
1500 ;; back to the first code statement.
1501 (when (looking-at "[ \t]*\\([!#]\\|$\\)")
1502 (f90-next-statement))
1503 (skip-chars-forward " \t0-9")
1504 (f90-looking-at-program-block-start)))
1500 0 1505 0
1501 ;; No explicit PROGRAM start statement. 1506 ;; No explicit PROGRAM start statement.
1502 f90-program-indent)) 1507 f90-program-indent))
@@ -1573,7 +1578,7 @@ Return nil if no later statement is found."
1573 (while (and (setq not-last-statement 1578 (while (and (setq not-last-statement
1574 (and (zerop (forward-line 1)) 1579 (and (zerop (forward-line 1))
1575 (not (eobp)))) 1580 (not (eobp))))
1576 (looking-at "[ \t0-9]*\\(!\\|$\\)"))) 1581 (looking-at "[ \t0-9]*\\(!\\|$\\|#\\)")))
1577 not-last-statement)) 1582 not-last-statement))
1578 1583
1579(defun f90-beginning-of-subprogram () 1584(defun f90-beginning-of-subprogram ()
diff --git a/lisp/simple.el b/lisp/simple.el
index c81385680bf..af6d855d9c0 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -945,28 +945,46 @@ rather than line counts."
945 (forward-line (1- line))))) 945 (forward-line (1- line)))))
946 946
947(defun count-words-region (start end) 947(defun count-words-region (start end)
948 "Count the number of words in the active region. 948 "Return the number of words between START and END.
949If the region is not active, counts the number of words in the buffer." 949If called interactively, print a message reporting the number of
950 (interactive (if (use-region-p) (list (region-beginning) (region-end)) 950lines, words, and characters in the region."
951 (list (point-min) (point-max)))) 951 (interactive "r")
952 (let ((count 0)) 952 (let ((words 0))
953 (save-excursion 953 (save-excursion
954 (save-restriction 954 (save-restriction
955 (narrow-to-region start end) 955 (narrow-to-region start end)
956 (goto-char (point-min)) 956 (goto-char (point-min))
957 (while (forward-word 1) 957 (while (forward-word 1)
958 (setq count (1+ count))))) 958 (setq words (1+ words)))))
959 (when (called-interactively-p 'interactive) 959 (when (called-interactively-p 'interactive)
960 (message "%s has %d words" 960 (count-words--message "Region"
961 (if (use-region-p) "Region" "Buffer") 961 (count-lines start end)
962 count)) 962 words
963 count)) 963 (- end start)))
964 964 words))
965(defun count-lines-region (start end) 965
966 "Print number of lines and characters in the region." 966(defun count-words ()
967 (interactive "r") 967 "Display the number of lines, words, and characters in the buffer.
968 (message "Region has %d lines, %d characters" 968In Transient Mark mode when the mark is active, display the
969 (count-lines start end) (- end start))) 969number of lines, words, and characters in the region."
970 (interactive)
971 (if (use-region-p)
972 (call-interactively 'count-words-region)
973 (let* ((beg (point-min))
974 (end (point-max))
975 (lines (count-lines beg end))
976 (words (count-words-region beg end))
977 (chars (- end beg)))
978 (count-words--message "Buffer" lines words chars))))
979
980(defun count-words--message (str lines words chars)
981 (message "%s has %d line%s, %d word%s, and %d character%s."
982 str
983 lines (if (= lines 1) "" "s")
984 words (if (= words 1) "" "s")
985 chars (if (= chars 1) "" "s")))
986
987(defalias 'count-lines-region 'count-words-region)
970 988
971(defun what-line () 989(defun what-line ()
972 "Print the current buffer line number and narrowed line number of point." 990 "Print the current buffer line number and narrowed line number of point."
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 4eb4efc3766..c2af3f7be84 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -931,49 +931,52 @@ Mostly we check word delimiters."
931;;* previous word nor the current word */ 931;;* previous word nor the current word */
932;;*---------------------------------------------------------------------*/ 932;;*---------------------------------------------------------------------*/
933(defun flyspell-post-command-hook () 933(defun flyspell-post-command-hook ()
934 "The `post-command-hook' used by flyspell to check a word in-the-fly." 934 "The `post-command-hook' used by flyspell to check a word on-the-fly."
935 (interactive) 935 (interactive)
936 (when flyspell-mode 936 (when flyspell-mode
937 (let ((command this-command) 937 (with-local-quit
938 ;; Prevent anything we do from affecting the mark. 938 (let ((command this-command)
939 deactivate-mark) 939 ;; Prevent anything we do from affecting the mark.
940 (if (flyspell-check-pre-word-p) 940 deactivate-mark)
941 (with-current-buffer flyspell-pre-buffer 941 (if (flyspell-check-pre-word-p)
942 '(flyspell-debug-signal-pre-word-checked) 942 (with-current-buffer flyspell-pre-buffer
943 (save-excursion 943 '(flyspell-debug-signal-pre-word-checked)
944 (goto-char flyspell-pre-point) 944 (save-excursion
945 (flyspell-word)))) 945 (goto-char flyspell-pre-point)
946 (if (flyspell-check-word-p) 946 (flyspell-word))))
947 (progn 947 (if (flyspell-check-word-p)
948 '(flyspell-debug-signal-word-checked) 948 (progn
949 (flyspell-word) 949 '(flyspell-debug-signal-word-checked)
950 ;; we remember which word we have just checked. 950 ;; FIXME: This should be asynchronous!
951 ;; this will be used next time we will check a word 951 (flyspell-word)
952 ;; to compare the next current word with the word 952 ;; we remember which word we have just checked.
953 ;; that as been registered in the pre-command-hook 953 ;; this will be used next time we will check a word
954 ;; that is these variables are used within the predicate 954 ;; to compare the next current word with the word
955 ;; FLYSPELL-CHECK-PRE-WORD-P 955 ;; that as been registered in the pre-command-hook
956 (setq flyspell-pre-pre-buffer (current-buffer)) 956 ;; that is these variables are used within the predicate
957 (setq flyspell-pre-pre-point (point))) 957 ;; FLYSPELL-CHECK-PRE-WORD-P
958 (progn 958 (setq flyspell-pre-pre-buffer (current-buffer))
959 (setq flyspell-pre-pre-buffer nil) 959 (setq flyspell-pre-pre-point (point)))
960 (setq flyspell-pre-pre-point nil) 960 (progn
961 ;; when a word is not checked because of a delayed command 961 (setq flyspell-pre-pre-buffer nil)
962 ;; we do not disable the ispell cache. 962 (setq flyspell-pre-pre-point nil)
963 (if (and (symbolp this-command) (get this-command 'flyspell-delayed)) 963 ;; when a word is not checked because of a delayed command
964 (progn 964 ;; we do not disable the ispell cache.
965 (setq flyspell-word-cache-end -1) 965 (if (and (symbolp this-command)
966 (setq flyspell-word-cache-result '_))))) 966 (get this-command 'flyspell-delayed))
967 (while (and (not (input-pending-p)) (consp flyspell-changes)) 967 (progn
968 (let ((start (car (car flyspell-changes))) 968 (setq flyspell-word-cache-end -1)
969 (stop (cdr (car flyspell-changes)))) 969 (setq flyspell-word-cache-result '_)))))
970 (if (flyspell-check-changed-word-p start stop) 970 (while (and (not (input-pending-p)) (consp flyspell-changes))
971 (save-excursion 971 (let ((start (car (car flyspell-changes)))
972 '(flyspell-debug-signal-changed-checked) 972 (stop (cdr (car flyspell-changes))))
973 (goto-char start) 973 (if (flyspell-check-changed-word-p start stop)
974 (flyspell-word))) 974 (save-excursion
975 (setq flyspell-changes (cdr flyspell-changes)))) 975 '(flyspell-debug-signal-changed-checked)
976 (setq flyspell-previous-command command)))) 976 (goto-char start)
977 (flyspell-word)))
978 (setq flyspell-changes (cdr flyspell-changes))))
979 (setq flyspell-previous-command command)))))
977 980
978;;*---------------------------------------------------------------------*/ 981;;*---------------------------------------------------------------------*/
979;;* flyspell-notify-misspell ... */ 982;;* flyspell-notify-misspell ... */
@@ -1100,14 +1103,10 @@ misspelling and skips redundant spell-checking step."
1100 ;; we mark the ispell process so it can be killed 1103 ;; we mark the ispell process so it can be killed
1101 ;; when emacs is exited without query 1104 ;; when emacs is exited without query
1102 (set-process-query-on-exit-flag ispell-process nil) 1105 (set-process-query-on-exit-flag ispell-process nil)
1103 ;; Wait until ispell has processed word. Since this 1106 ;; Wait until ispell has processed word.
1104 ;; code is often executed from post-command-hook but 1107 (while (progn
1105 ;; the ispell process may not be responsive, it's 1108 (accept-process-output ispell-process)
1106 ;; important to make sure we re-enable C-g. 1109 (not (string= "" (car ispell-filter)))))
1107 (with-local-quit
1108 (while (progn
1109 (accept-process-output ispell-process)
1110 (not (string= "" (car ispell-filter))))))
1111 ;; (ispell-send-string "!\n") 1110 ;; (ispell-send-string "!\n")
1112 ;; back to terse mode. 1111 ;; back to terse mode.
1113 ;; Remove leading empty element 1112 ;; Remove leading empty element
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index 388d4c94a08..84c7f4a510b 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -666,18 +666,15 @@ the buffer contents as a comment."
666 (funcall log-operation 666 (funcall log-operation
667 log-fileset 667 log-fileset
668 log-entry)) 668 log-entry))
669 ;; Remove checkin window (after the checkin so that if that fails 669
670 ;; we don't zap the log buffer and the typing therein). 670 ;; Quit windows on logbuf.
671 ;; -- IMO this should be replaced with quit-window 671 (cond
672 (cond ((and logbuf vc-delete-logbuf-window) 672 ((not logbuf))
673 (delete-windows-on logbuf (selected-frame)) 673 (vc-delete-logbuf-window
674 ;; Kill buffer and delete any other dedicated windows/frames. 674 (quit-windows-on logbuf t (selected-frame)))
675 (kill-buffer logbuf)) 675 (t
676 (logbuf 676 (quit-windows-on logbuf nil 0)))
677 (with-selected-window (or (get-buffer-window logbuf 0) 677
678 (selected-window))
679 (with-current-buffer logbuf
680 (bury-buffer)))))
681 ;; Now make sure we see the expanded headers 678 ;; Now make sure we see the expanded headers
682 (when log-fileset 679 (when log-fileset
683 (mapc 680 (mapc
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 6704a43e59b..62536fd94be 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2302,8 +2302,7 @@ to the working revision (except for keyword expansion)."
2302 (if (= nfiles 1) "" "s")))))) 2302 (if (= nfiles 1) "" "s"))))))
2303 (error "Revert canceled"))) 2303 (error "Revert canceled")))
2304 (when diff-buffer 2304 (when diff-buffer
2305 (delete-windows-on diff-buffer) 2305 (quit-windows-on diff-buffer t)))
2306 (kill-buffer diff-buffer)))
2307 (dolist (file files) 2306 (dolist (file files)
2308 (message "Reverting %s..." (vc-delistify files)) 2307 (message "Reverting %s..." (vc-delistify files))
2309 (vc-revert-file file) 2308 (vc-revert-file file)
@@ -2349,8 +2348,7 @@ depending on the underlying version-control system."
2349 ;; Display changes 2348 ;; Display changes
2350 (unless (yes-or-no-p "Discard these revisions? ") 2349 (unless (yes-or-no-p "Discard these revisions? ")
2351 (error "Rollback canceled")) 2350 (error "Rollback canceled"))
2352 (delete-windows-on "*vc-diff*") 2351 (quit-windows-on "*vc-diff*" t)
2353 (kill-buffer"*vc-diff*")
2354 ;; Do the actual reversions 2352 ;; Do the actual reversions
2355 (message "Rolling back %s..." (vc-delistify files)) 2353 (message "Rolling back %s..." (vc-delistify files))
2356 (with-vc-properties 2354 (with-vc-properties
diff --git a/lisp/window.el b/lisp/window.el
index 74460ae6058..4d8b3c92b95 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2772,7 +2772,8 @@ shown in a separate frame like `quit-window' and `bury-buffer'."
2772 (const :tag "Do nothing" ignore) 2772 (const :tag "Do nothing" ignore)
2773 function) 2773 function)
2774 :group 'windows 2774 :group 'windows
2775 :group 'frames) 2775 :group 'frames
2776 :version "24.1")
2776 2777
2777(defun window--delete (&optional window dedicated-only kill) 2778(defun window--delete (&optional window dedicated-only kill)
2778 "Delete WINDOW if possible. 2779 "Delete WINDOW if possible.
@@ -2780,7 +2781,7 @@ WINDOW must be a live window and defaults to the selected one.
2780Optional argument DEDICATED-ONLY non-nil means to delete WINDOW 2781Optional argument DEDICATED-ONLY non-nil means to delete WINDOW
2781only if it's dedicated to its buffer. Optional argument KILL 2782only if it's dedicated to its buffer. Optional argument KILL
2782means the buffer shown in window will be killed. Return non-nil 2783means the buffer shown in window will be killed. Return non-nil
2783if WINDOW gets deleted." 2784if WINDOW gets deleted or its frame is auto-hidden."
2784 (setq window (window-normalize-live-window window)) 2785 (setq window (window-normalize-live-window window))
2785 (unless (and dedicated-only (not (window-dedicated-p window))) 2786 (unless (and dedicated-only (not (window-dedicated-p window)))
2786 (let* ((buffer (window-buffer window)) 2787 (let* ((buffer (window-buffer window))
@@ -2788,8 +2789,11 @@ if WINDOW gets deleted."
2788 (cond 2789 (cond
2789 ((eq deletable 'frame) 2790 ((eq deletable 'frame)
2790 (let ((frame (window-frame window))) 2791 (let ((frame (window-frame window)))
2791 (when (functionp frame-auto-hide-function) 2792 (cond
2792 (funcall frame-auto-hide-function frame))) 2793 (kill
2794 (delete-frame frame))
2795 ((functionp frame-auto-hide-function)
2796 (funcall frame-auto-hide-function frame))))
2793 'frame) 2797 'frame)
2794 (deletable 2798 (deletable
2795 (delete-window window) 2799 (delete-window window)
@@ -2980,6 +2984,27 @@ one. If non-nil, reset `quit-restore' parameter to nil."
2980 (if kill 2984 (if kill
2981 (kill-buffer buffer) 2985 (kill-buffer buffer)
2982 (bury-buffer-internal buffer)))) 2986 (bury-buffer-internal buffer))))
2987
2988(defun quit-windows-on (&optional buffer-or-name kill frame)
2989 "Quit all windows showing BUFFER-OR-NAME.
2990BUFFER-OR-NAME may be a buffer or the name of an existing buffer
2991and defaults to the current buffer. Optional argument KILL
2992non-nil means to kill BUFFER-OR-NAME. KILL nil means to bury
2993BUFFER-OR-NAME. Optional argument FRAME is handled as by
2994`delete-windows-on'.
2995
2996This function calls `quit-window' on all candidate windows
2997showing BUFFER-OR-NAME."
2998 (interactive "BQuit windows on (buffer):\nP")
2999 (let ((buffer (window-normalize-buffer buffer-or-name))
3000 ;; Handle the "inverted" meaning of the FRAME argument wrt other
3001 ;; `window-list-1' based function.
3002 (all-frames (cond ((not frame) t) ((eq frame t) nil) (t frame))))
3003 (dolist (window (window-list-1 nil nil all-frames))
3004 (if (eq (window-buffer window) buffer)
3005 (quit-window kill window)
3006 ;; If a window doesn't show BUFFER, unrecord BUFFER in it.
3007 (unrecord-window-buffer window buffer)))))
2983 3008
2984;;; Splitting windows. 3009;;; Splitting windows.
2985(defsubst window-split-min-size (&optional horizontal) 3010(defsubst window-split-min-size (&optional horizontal)
@@ -3955,12 +3980,10 @@ Finally, an element of this list can be also specified as
3955\(BUFFER-NAME FUNCTION OTHER-ARGS). In that case, 3980\(BUFFER-NAME FUNCTION OTHER-ARGS). In that case,
3956`special-display-popup-frame' will call FUNCTION with the buffer 3981`special-display-popup-frame' will call FUNCTION with the buffer
3957named BUFFER-NAME as first argument, and OTHER-ARGS as the 3982named BUFFER-NAME as first argument, and OTHER-ARGS as the
3958second. If `special-display-function' specifies some other 3983second.
3959function, that function is called with the buffer named 3984
3960BUFFER-NAME as first, and the element's cdr as second argument. 3985Any alternative function specified here is responsible for
3961In any case, that function is responsible for setting the value 3986setting up the quit-restore parameter of the window used.
3962The function specified here is responsible for setting the
3963quit-restore and help-setup parameters of the window used.
3964 3987
3965If this variable appears \"not to work\", because you added a 3988If this variable appears \"not to work\", because you added a
3966name to it but the corresponding buffer is displayed in the 3989name to it but the corresponding buffer is displayed in the
@@ -4025,10 +4048,10 @@ as second argument.
4025Finally, an element of this list can be also specified as 4048Finally, an element of this list can be also specified as
4026\(REGEXP FUNCTION OTHER-ARGS). `special-display-popup-frame' 4049\(REGEXP FUNCTION OTHER-ARGS). `special-display-popup-frame'
4027will then call FUNCTION with the buffer whose name matched 4050will then call FUNCTION with the buffer whose name matched
4028REGEXP as first, and OTHER-ARGS as second argument. If 4051REGEXP as first, and OTHER-ARGS as second argument.
4029`special-display-function' specifies some other function, that 4052
4030function is called with the buffer whose name matched REGEXP 4053Any alternative function specified here is responsible for
4031as first, and the element's cdr as second argument. 4054setting up the quit-restore parameter of the window used.
4032 4055
4033If this variable appears \"not to work\", because you added a 4056If this variable appears \"not to work\", because you added a
4034name to it but the corresponding buffer is displayed in the 4057name to it but the corresponding buffer is displayed in the
@@ -4974,7 +4997,7 @@ one.
4974If FORCE-SAME-WINDOW is non-nil, BUFFER-OR-NAME must be displayed 4997If FORCE-SAME-WINDOW is non-nil, BUFFER-OR-NAME must be displayed
4975in the selected window; signal an error if that is 4998in the selected window; signal an error if that is
4976impossible (e.g. if the selected window is minibuffer-only). If 4999impossible (e.g. if the selected window is minibuffer-only). If
4977non-nil, BUFFER-OR-NAME may be displayed in another window. 5000nil, BUFFER-OR-NAME may be displayed in another window.
4978 5001
4979Return the buffer switched to." 5002Return the buffer switched to."
4980 (interactive 5003 (interactive