aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog67
-rw-r--r--lisp/dired-aux.el17
-rw-r--r--lisp/dired.el2
-rw-r--r--lisp/emacs-lisp/package.el116
-rw-r--r--lisp/gnus/ChangeLog9
-rw-r--r--lisp/gnus/gnus-sum.el2
-rw-r--r--lisp/gnus/message.el6
-rw-r--r--lisp/help.el58
-rw-r--r--lisp/isearch.el51
-rw-r--r--lisp/mail/smtpmail.el7
-rw-r--r--lisp/mpc.el14
-rw-r--r--lisp/newcomment.el6
-rw-r--r--lisp/replace.el2
-rw-r--r--lisp/textmodes/bibtex.el50
-rw-r--r--lisp/window.el49
15 files changed, 288 insertions, 168 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 53ef2a1bbcd..91ffbcff96b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,70 @@
12011-09-15 Chong Yidong <cyd@stupidchicken.com>
2
3 * emacs-lisp/package.el (package-alist): Fix risky-local-variable
4 declaration.
5 (package--add-to-archive-contents): If there is a duplicate entry
6 with an older version, remove it.
7 (package-menu-mark-delete, package-menu-mark-install)
8 (package-menu-mark-unmark): Make unused args optional.
9 (package-menu-mark-obsolete-for-deletion): Use
10 package-menu-get-status instead of a regexp search.
11 (package-menu-get-status): Use tabulated-list-entry.
12 (package-menu-mark-upgrades): New command.
13 (package-menu-mode-map): Bind it to U. Add it to menu bar.
14 (package-menu-execute): Do installation before deletion.
15 (package-menu-refresh, package-menu-execute): Use derived-mode-p
16 instead of checking major-mode.
17 (package-menu--find-upgrades): New function.
18
192011-09-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
20
21 * mail/smtpmail.el (smtpmail-send-command): Don't include AUTH
22 passwords in the log buffer.
23 (smtpmail-process-filter): Update the process marker so that the
24 "broken by peer" status message is inserted in the right place.
25
262011-09-14 Stefan Monnier <monnier@iro.umontreal.ca>
27
28 * textmodes/bibtex.el (bibtex-complete-string-cleanup)
29 (bibtex-complete-crossref-cleanup): Adjust to accommodate needs of
30 bibtex-completion-at-point-function.
31 (bibtex-completion-at-point-function): Use them.
32
33 * newcomment.el (comment-add, comment-valid-prefix-p): Docfix.
34
35 * mpc.el (mpc-constraints-tag-lookup): New function.
36 (mpc-constraints-restore): Use it to make jumping to "album=Foo" apply
37 also to browser "album|playlist".
38
392011-09-14 Juri Linkov <juri@jurta.org>
40
41 * isearch.el (isearch-fail-pos): Add new arg `msg'. Doc fix.
42 (isearch-edit-string): Use length of `isearch-string' when
43 `isearch-fail-pos' returns nil.
44 (isearch-message): Remove duplicate code and call
45 `isearch-fail-pos' with arg `t'.
46
472011-09-14 Chong Yidong <cyd@stupidchicken.com>
48
49 * replace.el (occur-mode-goto-occurrence): Don't force using other
50 window (Bug#9499).
51
52 * dired-aux.el (dired-do-chmod): Don't provide initial input.
53
542011-09-14 Martin Rudalics <rudalics@gmx.at>
55
56 * window.el (display-buffer-window): Remove.
57 (display-buffer-record-window): Use help-setup window parameter
58 instead of variable display-buffer-window.
59 (display-buffer-function, special-display-buffer-names)
60 (special-display-function): Mention help-setup parameter instead
61 of display-buffer-window in doc-string.
62 * help.el (help-window-setup): New argument help-window.
63 Use help-window-setup parameter instead of display-buffer-window.
64 Reword some messages.
65 (with-help-window): Pass window used for displaying the buffer
66 to help-window-setup. Don't set display-buffer-window.
67
12011-09-13 Glenn Morris <rgm@gnu.org> 682011-09-13 Glenn Morris <rgm@gnu.org>
2 69
3 * emacs-lisp/debug.el (debugger-make-xrefs): 70 * emacs-lisp/debug.el (debugger-make-xrefs):
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 2f2d28e596c..b09096978fd 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -285,11 +285,8 @@ Symbolic modes like `g+w' are allowed."
285 (match-string 3 modestr))))) 285 (match-string 3 modestr)))))
286 (modes (dired-mark-read-string 286 (modes (dired-mark-read-string
287 "Change mode of %s to: " 287 "Change mode of %s to: "
288 ;; Insert initial input if there's only one file. 288 nil 'chmod arg files default))
289 (unless (cadr files) default)
290 'chmod arg files default))
291 num-modes) 289 num-modes)
292
293 (cond ((equal modes "") 290 (cond ((equal modes "")
294 ;; We used to treat empty input as DEFAULT, but that is not 291 ;; We used to treat empty input as DEFAULT, but that is not
295 ;; such a good idea (Bug#9361). 292 ;; such a good idea (Bug#9361).
@@ -388,7 +385,7 @@ Uses the shell command coming from variables `lpr-command' and
388 (dired-run-shell-command (dired-shell-stuff-it command file-list nil)))) 385 (dired-run-shell-command (dired-shell-stuff-it command file-list nil))))
389 386
390(defun dired-mark-read-string (prompt initial op-symbol arg files 387(defun dired-mark-read-string (prompt initial op-symbol arg files
391 &optional standard-value) 388 &optional default-value)
392 "Read args for a Dired marked-files command, prompting with PROMPT. 389 "Read args for a Dired marked-files command, prompting with PROMPT.
393Return the user input (a string). 390Return the user input (a string).
394 391
@@ -397,14 +394,14 @@ OP-SYMBOL is an operation symbol (see `dired-no-confirm').
397ARG is normally the prefix argument for the calling command. 394ARG is normally the prefix argument for the calling command.
398FILES should be a list of file names. 395FILES should be a list of file names.
399 396
400STANDARD-VALUE, if non-nil, should be a \"standard\" value or 397DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list
401list of such values, available via history commands. Note that 398of such values, available via history commands. Note that if the
402if the user enters empty input, this function returns the empty 399user enters empty input, this function returns the empty string,
403string, not STANDARD-VALUE." 400not DEFAULT-VALUE."
404 (dired-mark-pop-up nil op-symbol files 401 (dired-mark-pop-up nil op-symbol files
405 'read-from-minibuffer 402 'read-from-minibuffer
406 (format prompt (dired-mark-prompt arg files)) 403 (format prompt (dired-mark-prompt arg files))
407 initial nil nil nil standard-value)) 404 initial nil nil nil default-value))
408 405
409;;; Cleaning a directory: flagging some backups for deletion. 406;;; Cleaning a directory: flagging some backups for deletion.
410 407
diff --git a/lisp/dired.el b/lisp/dired.el
index 3428f5bef8b..f01e195f9ec 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3663,7 +3663,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
3663;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command 3663;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
3664;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown 3664;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
3665;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff 3665;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
3666;;;;;; dired-diff) "dired-aux" "dired-aux.el" "bbc9babe193843cad535d73492326c48") 3666;;;;;; dired-diff) "dired-aux" "dired-aux.el" "0ffe89ae728efb341dfacff6c85e2ba4")
3667;;; Generated autoloads from dired-aux.el 3667;;; Generated autoloads from dired-aux.el
3668 3668
3669(autoload 'dired-diff "dired-aux" "\ 3669(autoload 'dired-diff "dired-aux" "\
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index caf0ec2e8b8..f0b1537e2b3 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -309,7 +309,7 @@ The vector DESC has the form [VERSION-LIST REQS DOCSTRING].
309This variable is set automatically by `package-load-descriptor', 309This variable is set automatically by `package-load-descriptor',
310called via `package-initialize'. To change which packages are 310called via `package-initialize'. To change which packages are
311loaded and/or activated, customize `package-load-list'.") 311loaded and/or activated, customize `package-load-list'.")
312(put 'package-archive-contents 'risky-local-variable t) 312(put 'package-alist 'risky-local-variable t)
313 313
314(defvar package-activated-list nil 314(defvar package-activated-list nil
315 "List of the names of currently activated packages.") 315 "List of the names of currently activated packages.")
@@ -820,13 +820,19 @@ If the archive version is too new, signal an error."
820 "Add the PACKAGE from the given ARCHIVE if necessary. 820 "Add the PACKAGE from the given ARCHIVE if necessary.
821Also, add the originating archive to the end of the package vector." 821Also, add the originating archive to the end of the package vector."
822 (let* ((name (car package)) 822 (let* ((name (car package))
823 (version (aref (cdr package) 0)) 823 (version (package-desc-vers (cdr package)))
824 (entry (cons (car package) 824 (entry (cons name
825 (vconcat (cdr package) (vector archive)))) 825 (vconcat (cdr package) (vector archive))))
826 (existing-package (cdr (assq name package-archive-contents)))) 826 (existing-package (assq name package-archive-contents)))
827 (when (or (not existing-package) 827 (cond ((not existing-package)
828 (version-list-< (aref existing-package 0) version)) 828 (add-to-list 'package-archive-contents entry))
829 (add-to-list 'package-archive-contents entry)))) 829 ((version-list-< (package-desc-vers (cdr existing-package))
830 version)
831 ;; Replace the entry with this one.
832 (setq package-archive-contents
833 (cons entry
834 (delq existing-package
835 package-archive-contents)))))))
830 836
831(defun package-download-transaction (package-list) 837(defun package-download-transaction (package-list)
832 "Download and install all the packages in PACKAGE-LIST. 838 "Download and install all the packages in PACKAGE-LIST.
@@ -1269,6 +1275,7 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages."
1269 (define-key map "\177" 'package-menu-backup-unmark) 1275 (define-key map "\177" 'package-menu-backup-unmark)
1270 (define-key map "d" 'package-menu-mark-delete) 1276 (define-key map "d" 'package-menu-mark-delete)
1271 (define-key map "i" 'package-menu-mark-install) 1277 (define-key map "i" 'package-menu-mark-install)
1278 (define-key map "U" 'package-menu-mark-upgrades)
1272 (define-key map "r" 'package-menu-refresh) 1279 (define-key map "r" 'package-menu-refresh)
1273 (define-key map "~" 'package-menu-mark-obsolete-for-deletion) 1280 (define-key map "~" 'package-menu-mark-obsolete-for-deletion)
1274 (define-key map "x" 'package-menu-execute) 1281 (define-key map "x" 'package-menu-execute)
@@ -1298,6 +1305,9 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages."
1298 (define-key menu-map [mi] 1305 (define-key menu-map [mi]
1299 '(menu-item "Mark for install" package-menu-mark-install 1306 '(menu-item "Mark for install" package-menu-mark-install
1300 :help "Mark a package for installation and move to the next line")) 1307 :help "Mark a package for installation and move to the next line"))
1308 (define-key menu-map [mupgrades]
1309 '(menu-item "Mark upgradable packages" package-menu-mark-upgrades
1310 :help "Mark packages that have a newer version for upgrading"))
1301 (define-key menu-map [s3] '("--")) 1311 (define-key menu-map [s3] '("--"))
1302 (define-key menu-map [mg] 1312 (define-key menu-map [mg]
1303 '(menu-item "Update package list" revert-buffer 1313 '(menu-item "Update package list" revert-buffer
@@ -1422,7 +1432,7 @@ identifier (NAME . VERSION-LIST)."
1422This fetches the contents of each archive specified in 1432This fetches the contents of each archive specified in
1423`package-archives', and then refreshes the package menu." 1433`package-archives', and then refreshes the package menu."
1424 (interactive) 1434 (interactive)
1425 (unless (eq major-mode 'package-menu-mode) 1435 (unless (derived-mode-p 'package-menu-mode)
1426 (error "The current buffer is not a Package Menu")) 1436 (error "The current buffer is not a Package Menu"))
1427 (package-refresh-contents) 1437 (package-refresh-contents)
1428 (package-menu--generate t t)) 1438 (package-menu--generate t t))
@@ -1437,21 +1447,21 @@ If optional arg BUTTON is non-nil, describe its associated package."
1437 (describe-package package)))) 1447 (describe-package package))))
1438 1448
1439;; fixme numeric argument 1449;; fixme numeric argument
1440(defun package-menu-mark-delete (num) 1450(defun package-menu-mark-delete (&optional num)
1441 "Mark a package for deletion and move to the next line." 1451 "Mark a package for deletion and move to the next line."
1442 (interactive "p") 1452 (interactive "p")
1443 (if (member (package-menu-get-status) '("installed" "obsolete")) 1453 (if (member (package-menu-get-status) '("installed" "obsolete"))
1444 (tabulated-list-put-tag "D" t) 1454 (tabulated-list-put-tag "D" t)
1445 (forward-line))) 1455 (forward-line)))
1446 1456
1447(defun package-menu-mark-install (num) 1457(defun package-menu-mark-install (&optional num)
1448 "Mark a package for installation and move to the next line." 1458 "Mark a package for installation and move to the next line."
1449 (interactive "p") 1459 (interactive "p")
1450 (if (string-equal (package-menu-get-status) "available") 1460 (if (string-equal (package-menu-get-status) "available")
1451 (tabulated-list-put-tag "I" t) 1461 (tabulated-list-put-tag "I" t)
1452 (forward-line))) 1462 (forward-line)))
1453 1463
1454(defun package-menu-mark-unmark (num) 1464(defun package-menu-mark-unmark (&optional num)
1455 "Clear any marks on a package and move to the next line." 1465 "Clear any marks on a package and move to the next line."
1456 (interactive "p") 1466 (interactive "p")
1457 (tabulated-list-put-tag " " t)) 1467 (tabulated-list-put-tag " " t))
@@ -1467,9 +1477,8 @@ If optional arg BUTTON is non-nil, describe its associated package."
1467 (interactive) 1477 (interactive)
1468 (save-excursion 1478 (save-excursion
1469 (goto-char (point-min)) 1479 (goto-char (point-min))
1470 (forward-line 2)
1471 (while (not (eobp)) 1480 (while (not (eobp))
1472 (if (looking-at ".*\\s obsolete\\s ") 1481 (if (equal (package-menu-get-status) "obsolete")
1473 (tabulated-list-put-tag "D" t) 1482 (tabulated-list-put-tag "D" t)
1474 (forward-line 1))))) 1483 (forward-line 1)))))
1475 1484
@@ -1482,17 +1491,66 @@ If optional arg BUTTON is non-nil, describe its associated package."
1482 'package-menu-view-commentary 'package-menu-describe-package "24.1") 1491 'package-menu-view-commentary 'package-menu-describe-package "24.1")
1483 1492
1484(defun package-menu-get-status () 1493(defun package-menu-get-status ()
1485 (save-excursion 1494 (let* ((pkg (tabulated-list-get-id))
1486 (if (looking-at ". [^ \t]*[ \t]*[^ \t]*[ \t]*\\([^ \t]*\\)") 1495 (entry (and pkg (assq pkg tabulated-list-entries))))
1487 (match-string 1) 1496 (if entry
1497 (aref (cadr entry) 2)
1488 ""))) 1498 "")))
1489 1499
1500(defun package-menu--find-upgrades ()
1501 (let (installed available upgrades)
1502 ;; Build list of installed/available packages in this buffer.
1503 (dolist (entry tabulated-list-entries)
1504 ;; ENTRY is ((NAME . VERSION) [NAME VERSION STATUS DOC])
1505 (let ((pkg (car entry))
1506 (status (aref (cadr entry) 2))
1507 old)
1508 (cond ((equal status "installed")
1509 (push pkg installed))
1510 ((equal status "available")
1511 (push pkg available)))))
1512 ;; Loop through list of installed packages, finding upgrades
1513 (dolist (pkg installed)
1514 (let ((avail-pkg (assq (car pkg) available)))
1515 (and avail-pkg
1516 (version-list-< (cdr pkg) (cdr avail-pkg))
1517 (push avail-pkg upgrades))))
1518 upgrades))
1519
1520(defun package-menu-mark-upgrades ()
1521 "Mark all upgradable packages in the Package Menu.
1522For each installed package with a newer version available, place
1523an (I)nstall flag on the available version and a (D)elete flag on
1524the installed version. A subsequent \\[package-menu-execute]
1525call will upgrade the package."
1526 (interactive)
1527 (unless (derived-mode-p 'package-menu-mode)
1528 (error "The current buffer is not a Package Menu"))
1529 (let ((upgrades (package-menu--find-upgrades)))
1530 (if (null upgrades)
1531 (message "No packages to upgrade.")
1532 (widen)
1533 (save-excursion
1534 (goto-char (point-min))
1535 (while (not (eobp))
1536 (let* ((pkg (tabulated-list-get-id))
1537 (upgrade (assq (car pkg) upgrades)))
1538 (cond ((null upgrade)
1539 (forward-line 1))
1540 ((equal pkg upgrade)
1541 (package-menu-mark-install))
1542 (t
1543 (package-menu-mark-delete))))))
1544 (message "%d package%s marked for upgrading."
1545 (length upgrades)
1546 (if (= (length upgrades) 1) "" "s")))))
1547
1490(defun package-menu-execute () 1548(defun package-menu-execute ()
1491 "Perform marked Package Menu actions. 1549 "Perform marked Package Menu actions.
1492Packages marked for installation are downloaded and installed; 1550Packages marked for installation are downloaded and installed;
1493packages marked for deletion are removed." 1551packages marked for deletion are removed."
1494 (interactive) 1552 (interactive)
1495 (unless (eq major-mode 'package-menu-mode) 1553 (unless (derived-mode-p 'package-menu-mode)
1496 (error "The current buffer is not in Package Menu mode")) 1554 (error "The current buffer is not in Package Menu mode"))
1497 (let (install-list delete-list cmd id) 1555 (let (install-list delete-list cmd id)
1498 (save-excursion 1556 (save-excursion
@@ -1509,6 +1567,14 @@ packages marked for deletion are removed."
1509 ((eq cmd ?I) 1567 ((eq cmd ?I)
1510 (push (car id) install-list)))) 1568 (push (car id) install-list))))
1511 (forward-line))) 1569 (forward-line)))
1570 (when install-list
1571 (if (yes-or-no-p
1572 (if (= (length install-list) 1)
1573 (format "Install package `%s'? " (car install-list))
1574 (format "Install these %d packages (%s)? "
1575 (length install-list)
1576 (mapconcat 'symbol-name install-list ", "))))
1577 (mapc 'package-install install-list)))
1512 ;; Delete packages, prompting if necessary. 1578 ;; Delete packages, prompting if necessary.
1513 (when delete-list 1579 (when delete-list
1514 (if (yes-or-no-p 1580 (if (yes-or-no-p
@@ -1527,14 +1593,6 @@ packages marked for deletion are removed."
1527 (package-delete (car elt) (cdr elt)) 1593 (package-delete (car elt) (cdr elt))
1528 (error (message (cadr err))))) 1594 (error (message (cadr err)))))
1529 (error "Aborted"))) 1595 (error "Aborted")))
1530 (when install-list
1531 (if (yes-or-no-p
1532 (if (= (length install-list) 1)
1533 (format "Install package `%s'? " (car install-list))
1534 (format "Install these %d packages (%s)? "
1535 (length install-list)
1536 (mapconcat 'symbol-name install-list ", "))))
1537 (mapc 'package-install install-list)))
1538 ;; If we deleted anything, regenerate `package-alist'. This is done 1596 ;; If we deleted anything, regenerate `package-alist'. This is done
1539 ;; automatically if we installed a package. 1597 ;; automatically if we installed a package.
1540 (and delete-list (null install-list) 1598 (and delete-list (null install-list)
@@ -1597,7 +1655,13 @@ The list is displayed in a buffer named `*Packages*'."
1597 (package-menu--generate nil t)) 1655 (package-menu--generate nil t))
1598 ;; The package menu buffer has keybindings. If the user types 1656 ;; The package menu buffer has keybindings. If the user types
1599 ;; `M-x list-packages', that suggests it should become current. 1657 ;; `M-x list-packages', that suggests it should become current.
1600 (switch-to-buffer buf))) 1658 (switch-to-buffer buf))
1659 (let ((upgrades (package-menu--find-upgrades)))
1660 (if upgrades
1661 (message "%d package%s can be upgraded; type `%s' to mark them for upgrading."
1662 (length upgrades)
1663 (if (= (length upgrades) 1) "" "s")
1664 (substitute-command-keys "\\[package-menu-mark-upgrades]")))))
1601 1665
1602;;;###autoload 1666;;;###autoload
1603(defalias 'package-list-packages 'list-packages) 1667(defalias 'package-list-packages 'list-packages)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index a89dc713dd8..211c4455717 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,12 @@
12011-09-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * gnus-sum.el (gnus-summary-read-group-1): Bump the "Retrieving"
4 message level.
5
62011-09-15 Katsumi Yamaoka <yamaoka@jpl.org>
7
8 * message.el (message-read-from-minibuffer): Make abbrev expansion work.
9
12011-09-12 Lars Magne Ingebrigtsen <larsi@gnus.org> 102011-09-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 11
3 * gnus.el (gnus-interactive-exit): Update defcustom spec. 12 * gnus.el (gnus-interactive-exit): Update defcustom spec.
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 8651b583757..423de352453 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -3961,7 +3961,7 @@ If NO-DISPLAY, don't generate a summary buffer."
3961 ;; (when (and (not (gnus-group-native-p group)) 3961 ;; (when (and (not (gnus-group-native-p group))
3962 ;; (not (gnus-gethash group gnus-newsrc-hashtb))) 3962 ;; (not (gnus-gethash group gnus-newsrc-hashtb)))
3963 ;; (error "Dead non-native groups can't be entered")) 3963 ;; (error "Dead non-native groups can't be entered"))
3964 (gnus-message 5 "Retrieving newsgroup: %s..." 3964 (gnus-message 7 "Retrieving newsgroup: %s..."
3965 (gnus-group-decoded-name group)) 3965 (gnus-group-decoded-name group))
3966 (let* ((new-group (gnus-summary-setup-buffer group)) 3966 (let* ((new-group (gnus-summary-setup-buffer group))
3967 (quit-config (gnus-group-quit-config group)) 3967 (quit-config (gnus-group-quit-config group))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index f78e2b0339d..8dac0fd7afe 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -8068,10 +8068,10 @@ regexp VARSTR."
8068(defun message-read-from-minibuffer (prompt &optional initial-contents) 8068(defun message-read-from-minibuffer (prompt &optional initial-contents)
8069 "Read from the minibuffer while providing abbrev expansion." 8069 "Read from the minibuffer while providing abbrev expansion."
8070 (if (fboundp 'mail-abbrevs-setup) 8070 (if (fboundp 'mail-abbrevs-setup)
8071 (let ((mail-abbrev-mode-regexp "") 8071 (let ((minibuffer-setup-hook 'mail-abbrevs-setup)
8072 (minibuffer-setup-hook 'mail-abbrevs-setup)
8073 (minibuffer-local-map message-minibuffer-local-map)) 8072 (minibuffer-local-map message-minibuffer-local-map))
8074 (read-from-minibuffer prompt initial-contents)) 8073 (flet ((mail-abbrev-in-expansion-header-p nil t))
8074 (read-from-minibuffer prompt initial-contents)))
8075 (let ((minibuffer-setup-hook 'mail-abbrev-minibuffer-setup-hook) 8075 (let ((minibuffer-setup-hook 'mail-abbrev-minibuffer-setup-hook)
8076 (minibuffer-local-map message-minibuffer-local-map)) 8076 (minibuffer-local-map message-minibuffer-local-map))
8077 (read-string prompt initial-contents)))) 8077 (read-string prompt initial-contents))))
diff --git a/lisp/help.el b/lisp/help.el
index ca8f76515cf..0c8d67106d3 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1060,14 +1060,13 @@ window."
1060 (message "%s" 1060 (message "%s"
1061 (substitute-command-keys (concat quit-part scroll-part))))) 1061 (substitute-command-keys (concat quit-part scroll-part)))))
1062 1062
1063(defun help-window-setup () 1063(defun help-window-setup (help-window)
1064 "Set up help window for `with-help-window'. 1064 "Set up help window for `with-help-window'.
1065This relies on `display-buffer-window' being correctly set up by 1065HELP-WINDOW is the window used for displaying the help buffer."
1066`display-buffer'." 1066 (let* ((help-buffer (when (window-live-p help-window)
1067 (let* ((help-window (car-safe display-buffer-window))
1068 (help-buffer (when (window-live-p help-window)
1069 (window-buffer help-window))) 1067 (window-buffer help-window)))
1070 (help-value (cdr-safe display-buffer-window))) 1068 (help-setup (when (window-live-p help-window)
1069 (window-parameter help-window 'help-setup))))
1071 (when help-buffer 1070 (when help-buffer
1072 ;; Handle `help-window-point-marker'. 1071 ;; Handle `help-window-point-marker'.
1073 (when (eq (marker-buffer help-window-point-marker) help-buffer) 1072 (when (eq (marker-buffer help-window-point-marker) help-buffer)
@@ -1078,6 +1077,7 @@ This relies on `display-buffer-window' being correctly set up by
1078 (cond 1077 (cond
1079 ((or (eq help-window (selected-window)) 1078 ((or (eq help-window (selected-window))
1080 (and (or (eq help-window-select t) 1079 (and (or (eq help-window-select t)
1080 (eq help-setup 'new-frame)
1081 (and (eq help-window-select 'other) 1081 (and (eq help-window-select 'other)
1082 (eq (window-frame help-window) (selected-frame)) 1082 (eq (window-frame help-window) (selected-frame))
1083 (> (length (window-list nil 'no-mini)) 2))) 1083 (> (length (window-list nil 'no-mini)) 2)))
@@ -1085,13 +1085,12 @@ This relies on `display-buffer-window' being correctly set up by
1085 ;; The help window is or gets selected ... 1085 ;; The help window is or gets selected ...
1086 (help-window-display-message 1086 (help-window-display-message
1087 (cond 1087 (cond
1088 ((eq help-value 'new-window) 1088 ((eq help-setup 'new-window)
1089 ;; ... and is new, ... 1089 ;; ... and is new, ...
1090 "Type \"q\" to delete this window") 1090 "Type \"q\" to delete help window")
1091 ((eq help-value 'new-frame) 1091 ((eq help-setup 'new-frame)
1092 ;; ... is on a new frame ... 1092 "Type \"q\" to delete help frame")
1093 "Type \"q\" to delete this frame") 1093 ((eq help-setup 'reuse-other)
1094 ((eq help-value 'reuse-other-window)
1095 ;; ... or displayed some other buffer before. 1094 ;; ... or displayed some other buffer before.
1096 "Type \"q\" to restore previous buffer")) 1095 "Type \"q\" to restore previous buffer"))
1097 help-window t)) 1096 help-window t))
@@ -1101,15 +1100,22 @@ This relies on `display-buffer-window' being correctly set up by
1101 ;; other one is the selected one. 1100 ;; other one is the selected one.
1102 (help-window-display-message 1101 (help-window-display-message
1103 (cond 1102 (cond
1104 ((eq help-value 'new-window) 1103 ((eq help-setup 'new-window)
1105 "Type \\[delete-other-windows] to delete the help window") 1104 "Type \\[delete-other-windows] to delete the help window")
1106 ((eq help-value 'reuse-other-window) 1105 ((eq help-setup 'reuse-other)
1107 "Type \"q\" in other window to quit")) 1106 "Type \"q\" in help window to restore its previous buffer"))
1108 help-window 'other)) 1107 help-window 'other))
1109 (t 1108 (t
1110 ;; Not much to say here. 1109 ;; The help window is not selected ...
1111 (help-window-display-message 1110 (help-window-display-message
1112 "Type \"q\" in help window to quit" help-window)))))) 1111 (cond
1112 ((eq help-setup 'new-window)
1113 ;; ... and is new, ...
1114 "Type \"q\" in help window to delete it")
1115 ((eq help-setup 'reuse-other)
1116 ;; ... or displayed some other buffer before.
1117 "Type \"q\" in help window to restore previous buffer"))
1118 help-window))))))
1113 1119
1114;; `with-help-window' is a wrapper for `with-output-to-temp-buffer' 1120;; `with-help-window' is a wrapper for `with-output-to-temp-buffer'
1115;; providing the following additional twists: 1121;; providing the following additional twists:
@@ -1134,18 +1140,18 @@ You can specify where and how to show the buffer by binding the
1134variable `temp-buffer-show-specifiers' to an appropriate value." 1140variable `temp-buffer-show-specifiers' to an appropriate value."
1135 (declare (indent 1) (debug t)) 1141 (declare (indent 1) (debug t))
1136 `(progn 1142 `(progn
1137 ;; Reset `display-buffer-window': `display-buffer' is
1138 ;; supposed to set this to the window displaying the buffer plus
1139 ;; some additional information.
1140 (setq display-buffer-window nil)
1141 ;; Make `help-window-point-marker' point nowhere. The only place 1143 ;; Make `help-window-point-marker' point nowhere. The only place
1142 ;; where this should be set to a buffer position is within BODY. 1144 ;; where this should be set to a buffer position is within BODY.
1143 (set-marker help-window-point-marker nil) 1145 (set-marker help-window-point-marker nil)
1144 (prog1 1146 (let* (help-window
1145 ;; Return value returned by `with-output-to-temp-buffer'. 1147 (temp-buffer-show-hook
1146 (with-output-to-temp-buffer ,buffer-name 1148 (cons (lambda () (setq help-window (selected-window)))
1147 (progn ,@body)) 1149 temp-buffer-show-hook)))
1148 (when display-buffer-window (help-window-setup))))) 1150 ;; Return value returned by `with-output-to-temp-buffer'.
1151 (prog1
1152 (with-output-to-temp-buffer ,buffer-name
1153 (progn ,@body))
1154 (help-window-setup help-window)))))
1149 1155
1150;; Called from C, on encountering `help-char' when reading a char. 1156;; Called from C, on encountering `help-char' when reading a char.
1151;; Don't print to *Help*; that would clobber Help history. 1157;; Don't print to *Help*; that would clobber Help history.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 00ed9b4aed2..e07f1429119 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1063,21 +1063,24 @@ nonincremental search instead via `isearch-edit-string'."
1063 1063
1064(defvar minibuffer-history-symbol) ;; from external package gmhist.el 1064(defvar minibuffer-history-symbol) ;; from external package gmhist.el
1065 1065
1066(defun isearch-fail-pos () 1066(defun isearch-fail-pos (&optional msg)
1067 "Position of first mismatch in search string, or its length if none." 1067 "Return position of first mismatch in search string, or nil if none.
1068 (let ((cmds isearch-cmds)) 1068If MSG is non-nil, use `isearch-message', otherwise `isearch-string'."
1069 (if (and isearch-success (not isearch-error)) 1069 (let ((cmds isearch-cmds)
1070 (length isearch-message) 1070 (curr-msg (if msg isearch-message isearch-string))
1071 succ-msg)
1072 (when (or (not isearch-success) isearch-error)
1071 (while (or (not (isearch-success-state (car cmds))) 1073 (while (or (not (isearch-success-state (car cmds)))
1072 (isearch-error-state (car cmds))) 1074 (isearch-error-state (car cmds)))
1073 (pop cmds)) 1075 (pop cmds))
1074 (let ((succ-msg (and cmds (isearch-message-state (car cmds))))) 1076 (setq succ-msg (and cmds (if msg (isearch-message-state (car cmds))
1075 (if (and (stringp succ-msg) 1077 (isearch-string-state (car cmds)))))
1076 (< (length succ-msg) (length isearch-message)) 1078 (if (and (stringp succ-msg)
1077 (equal succ-msg 1079 (< (length succ-msg) (length curr-msg))
1078 (substring isearch-message 0 (length succ-msg)))) 1080 (equal succ-msg
1079 (length succ-msg) 1081 (substring curr-msg 0 (length succ-msg))))
1080 0))))) 1082 (length succ-msg)
1083 0))))
1081 1084
1082(defun isearch-edit-string () 1085(defun isearch-edit-string ()
1083 "Edit the search string in the minibuffer. 1086 "Edit the search string in the minibuffer.
@@ -1169,7 +1172,8 @@ The following additional command keys are active while editing.
1169 (setq isearch-new-string 1172 (setq isearch-new-string
1170 (read-from-minibuffer 1173 (read-from-minibuffer
1171 (isearch-message-prefix nil nil isearch-nonincremental) 1174 (isearch-message-prefix nil nil isearch-nonincremental)
1172 (cons isearch-string (1+ (isearch-fail-pos))) 1175 (cons isearch-string (1+ (or (isearch-fail-pos)
1176 (length isearch-string))))
1173 minibuffer-local-isearch-map nil 1177 minibuffer-local-isearch-map nil
1174 (if isearch-regexp 1178 (if isearch-regexp
1175 (cons 'regexp-search-ring 1179 (cons 'regexp-search-ring
@@ -2174,22 +2178,11 @@ If there is no completion possible, say so and continue searching."
2174 ;; Generate and print the message string. 2178 ;; Generate and print the message string.
2175 (let ((cursor-in-echo-area ellipsis) 2179 (let ((cursor-in-echo-area ellipsis)
2176 (m isearch-message) 2180 (m isearch-message)
2177 (cmds isearch-cmds) 2181 (fail-pos (isearch-fail-pos t)))
2178 succ-msg) 2182 ;; Highlight failed part
2179 (when (or (not isearch-success) isearch-error) 2183 (when fail-pos
2180 ;; Highlight failed part 2184 (setq m (copy-sequence m))
2181 (while (or (not (isearch-success-state (car cmds))) 2185 (add-text-properties fail-pos (length m) '(face isearch-fail) m)
2182 (isearch-error-state (car cmds)))
2183 (pop cmds))
2184 (setq succ-msg (and cmds (isearch-message-state (car cmds)))
2185 m (copy-sequence m))
2186 (add-text-properties
2187 (if (and (stringp succ-msg)
2188 (< (length succ-msg) (length m))
2189 (equal succ-msg (substring m 0 (length succ-msg))))
2190 (length succ-msg)
2191 0)
2192 (length m) '(face isearch-fail) m)
2193 ;; Highlight failed trailing whitespace 2186 ;; Highlight failed trailing whitespace
2194 (when (string-match " +$" m) 2187 (when (string-match " +$" m)
2195 (add-text-properties (match-beginning 0) (match-end 0) 2188 (add-text-properties (match-beginning 0) (match-end 0)
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 544570a1bc3..9fe19581e81 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -835,7 +835,8 @@ The list is in preference order.")
835(defun smtpmail-process-filter (process output) 835(defun smtpmail-process-filter (process output)
836 (with-current-buffer (process-buffer process) 836 (with-current-buffer (process-buffer process)
837 (goto-char (point-max)) 837 (goto-char (point-max))
838 (insert output))) 838 (insert output)
839 (set-marker (process-mark process) (point))))
839 840
840(defun smtpmail-read-response (process) 841(defun smtpmail-read-response (process)
841 (let ((case-fold-search nil) 842 (let ((case-fold-search nil)
@@ -891,8 +892,8 @@ The list is in preference order.")
891 892
892(defun smtpmail-send-command (process command) 893(defun smtpmail-send-command (process command)
893 (goto-char (point-max)) 894 (goto-char (point-max))
894 (if (= (aref command 0) ?P) 895 (if (string-match "\\`AUTH [A-Z]+ " command)
895 (insert "PASS <omitted>\r\n") 896 (insert (match-string 0 command) "<omitted>\r\n")
896 (insert command "\r\n")) 897 (insert command "\r\n"))
897 (setq smtpmail-read-point (point)) 898 (setq smtpmail-read-point (point))
898 (process-send-string process command) 899 (process-send-string process command)
diff --git a/lisp/mpc.el b/lisp/mpc.el
index 932fb5926fd..8854d4e908f 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -1349,6 +1349,16 @@ when constructing the set of constraints."
1349 (push (cons tag select) constraints))) 1349 (push (cons tag select) constraints)))
1350 constraints)) 1350 constraints))
1351 1351
1352(defun mpc-constraints-tag-lookup (buffer-tag constraints)
1353 (let (res)
1354 (dolist (constraint constraints)
1355 (when (or (eq (car constraint) buffer-tag)
1356 (and (string-match "|" (symbol-name buffer-tag))
1357 (member (symbol-name (car constraint))
1358 (split-string (symbol-name buffer-tag) "|"))))
1359 (setq res (cdr constraint))))
1360 res))
1361
1352(defun mpc-constraints-restore (constraints) 1362(defun mpc-constraints-restore (constraints)
1353 (let ((search (assq 'Search constraints))) 1363 (let ((search (assq 'Search constraints)))
1354 (setq mpc--song-search (cadr search)) 1364 (setq mpc--song-search (cadr search))
@@ -1357,10 +1367,10 @@ when constructing the set of constraints."
1357 (setq buf (cdr buf)) 1367 (setq buf (cdr buf))
1358 (when (buffer-live-p buf) 1368 (when (buffer-live-p buf)
1359 (let* ((tag (buffer-local-value 'mpc-tag buf)) 1369 (let* ((tag (buffer-local-value 'mpc-tag buf))
1360 (constraint (assq tag constraints))) 1370 (constraint (mpc-constraints-tag-lookup tag constraints)))
1361 (when tag 1371 (when tag
1362 (with-current-buffer buf 1372 (with-current-buffer buf
1363 (mpc-select-restore (cdr constraint))))))) 1373 (mpc-select-restore constraint))))))
1364 (mpc-selection-refresh)) 1374 (mpc-selection-refresh))
1365 1375
1366;; I don't get the ring.el code. I think it doesn't do what I need, but 1376;; I don't get the ring.el code. I think it doesn't do what I need, but
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index a1d77ccc6e0..8c0d7b25939 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -987,8 +987,8 @@ indentation to be kept as it was before narrowing."
987 (setq ,bindent (- ,bindent n))))))))))) 987 (setq ,bindent (- ,bindent n)))))))))))
988 988
989(defun comment-add (arg) 989(defun comment-add (arg)
990 "Compute the number of extra comment starter characters 990 "Compute the number of extra comment starter characters.
991\(extra semicolons in Lisp mode, extra stars in C mode, etc.) 991\(Extra semicolons in Lisp mode, extra stars in C mode, etc.)
992If ARG is non-nil, just follow ARG. 992If ARG is non-nil, just follow ARG.
993If the comment starter is multi-char, just follow ARG. 993If the comment starter is multi-char, just follow ARG.
994Otherwise obey `comment-add'." 994Otherwise obey `comment-add'."
@@ -1243,7 +1243,7 @@ This has no effect in modes that do not define a comment syntax."
1243 :group 'comment) 1243 :group 'comment)
1244 1244
1245(defun comment-valid-prefix-p (prefix compos) 1245(defun comment-valid-prefix-p (prefix compos)
1246 "Check that the adaptive-fill-prefix is consistent with the context. 1246 "Check that the adaptive fill prefix is consistent with the context.
1247PREFIX is the prefix (presumably guessed by `adaptive-fill-mode'). 1247PREFIX is the prefix (presumably guessed by `adaptive-fill-mode').
1248COMPOS is the position of the beginning of the comment we're in, or nil 1248COMPOS is the position of the beginning of the comment we're in, or nil
1249if we're not inside a comment." 1249if we're not inside a comment."
diff --git a/lisp/replace.el b/lisp/replace.el
index ee430fd9855..70175cf205c 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -940,7 +940,7 @@ To return to ordinary Occur mode, use \\[occur-mode]."
940 (save-excursion 940 (save-excursion
941 (goto-char (posn-point (event-end event))) 941 (goto-char (posn-point (event-end event)))
942 (occur-mode-find-occurrence)))))) 942 (occur-mode-find-occurrence))))))
943 (pop-to-buffer (marker-buffer pos) t) 943 (pop-to-buffer (marker-buffer pos))
944 (goto-char pos) 944 (goto-char pos)
945 (run-hooks 'occur-mode-find-occurrence-hook))) 945 (run-hooks 'occur-mode-find-occurrence-hook)))
946 946
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 3efb2f158c0..741b6cd904c 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -3068,24 +3068,28 @@ When called interactively, FORCE is t, CURRENT is t if current buffer uses
3068 (message "No BibTeX buffers defined"))) 3068 (message "No BibTeX buffers defined")))
3069 buffer-list)) 3069 buffer-list))
3070 3070
3071(defun bibtex-complete-string-cleanup (str compl) 3071(defun bibtex-complete-string-cleanup (compl) (lambda (str status) ;Curried.
3072 "Cleanup after inserting string STR. 3072 "Cleanup after inserting string STR.
3073Remove enclosing field delimiters for STR. Display message with 3073Remove enclosing field delimiters for STR. Display message with
3074expansion of STR using expansion list COMPL." 3074expansion of STR using expansion list COMPL."
3075 ;; point is at position inside field where completion was requested 3075 (when (memq status '(exact finished sole))
3076 (save-excursion 3076 (let ((abbr (cdr (assoc-string str compl t))))
3077 (let ((abbr (cdr (if (stringp str) 3077 (when abbr
3078 (assoc-string str compl t))))) 3078 (message "%s = abbreviation for `%s'" str abbr)))
3079 (if abbr (message "Abbreviation for `%s'" abbr)) 3079 (when (eq status 'finished)
3080 (bibtex-remove-delimiters)))) 3080 (save-excursion (bibtex-remove-delimiters))))))
3081 3081
3082(defun bibtex-complete-crossref-cleanup (key) 3082(defun bibtex-complete-crossref-cleanup (buf) (lambda (key status) ;Curried.
3083 "Display summary message on entry KEY after completion of a crossref key. 3083 "Display summary message on entry KEY after completion of a crossref key.
3084Use `bibtex-summary-function' to generate summary." 3084Use `bibtex-summary-function' to generate summary."
3085 (save-excursion 3085 (when (memq status '(exact sole finished))
3086 (if (and (stringp key) 3086 (let ((summary
3087 (bibtex-search-entry key t)) 3087 (with-current-buffer buf
3088 (message "Ref: %s" (funcall bibtex-summary-function))))) 3088 (save-excursion
3089 (if (bibtex-search-entry key t)
3090 (funcall bibtex-summary-function))))))
3091 (when summary
3092 (message "%s %s" key summary))))))
3089 3093
3090(defun bibtex-copy-summary-as-kill (&optional arg) 3094(defun bibtex-copy-summary-as-kill (&optional arg)
3091 "Push summery of current BibTeX entry to kill ring. 3095 "Push summery of current BibTeX entry to kill ring.
@@ -4985,16 +4989,7 @@ entries from minibuffer."
4985 (t (let ((completion-ignore-case nil)) 4989 (t (let ((completion-ignore-case nil))
4986 (complete-with-action 4990 (complete-with-action
4987 a (bibtex-global-key-alist) s p))))) 4991 a (bibtex-global-key-alist) s p)))))
4988 :exit-function 4992 :exit-function (bibtex-complete-crossref-cleanup buf))))
4989 (lambda (string status)
4990 (when (memq status '(exact sole finished))
4991 (let ((summary
4992 (with-current-buffer buf
4993 (save-excursion
4994 (if (bibtex-search-entry string)
4995 (funcall bibtex-summary-function))))))
4996 (when summary
4997 (message "%s %s" string summary))))))))
4998 4993
4999 ((eq compl 'string) 4994 ((eq compl 'string)
5000 ;; String key completion: no cleanup needed. 4995 ;; String key completion: no cleanup needed.
@@ -5011,14 +5006,7 @@ entries from minibuffer."
5011 ((eq a 'metadata) `(metadata (category . bibtex-string))) 5006 ((eq a 'metadata) `(metadata (category . bibtex-string)))
5012 (t (let ((completion-ignore-case t)) 5007 (t (let ((completion-ignore-case t))
5013 (complete-with-action a compl s p))))) 5008 (complete-with-action a compl s p)))))
5014 :exit-function 5009 :exit-function (bibtex-complete-string-cleanup compl))))))
5015 (lambda (string status)
5016 (when (memq status '(exact finished sole))
5017 (let ((abbr (cdr (assoc-string string compl t))))
5018 (when abbr
5019 (message "%s = abbreviation for `%s'" string abbr))))
5020 (when (eq status 'finished)
5021 (save-excursion (bibtex-remove-delimiters)))))))))
5022 5010
5023(defun bibtex-String (&optional key) 5011(defun bibtex-String (&optional key)
5024 "Insert a new BibTeX @String entry with key KEY." 5012 "Insert a new BibTeX @String entry with key KEY."
diff --git a/lisp/window.el b/lisp/window.el
index 3a229a4e447..24d95f367e4 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -3785,17 +3785,6 @@ subwindows can get as small as `window-safe-min-height' and
3785 (window-state-put-2 ignore)) 3785 (window-state-put-2 ignore))
3786 (window-check frame)))) 3786 (window-check frame))))
3787 3787
3788(defvar display-buffer-window nil
3789 "Window used by `display-buffer' and related information.
3790After `display-buffer' displays a buffer in some window this
3791variable is a cons cell whose car denotes the window used to
3792display the buffer. The cdr is supposed to be one of the symbols
3793`reuse-buffer-window', `reuse-other-window', `new-window' or
3794`new-frame'.
3795
3796See the function `display-buffer-record-window' for how this
3797variable can be assigned a value.")
3798
3799(defun display-buffer-record-window (type window buffer) 3788(defun display-buffer-record-window (type window buffer)
3800 "Record information for window used by `display-buffer'. 3789 "Record information for window used by `display-buffer'.
3801TYPE must be one of the symbols reuse-window, pop-up-window, or 3790TYPE must be one of the symbols reuse-window, pop-up-window, or
@@ -3804,15 +3793,13 @@ pop-up-frame. WINDOW is the window used for or created by the
3804displayed." 3793displayed."
3805 (cond 3794 (cond
3806 ((eq type 'reuse-window) 3795 ((eq type 'reuse-window)
3807 ;; In `display-buffer-window' record whether we used a window on the 3796 ;; In `help-setup' window parameter record whether we used a window
3808 ;; same buffer or another one. 3797 ;; on the same buffer or another one.
3809 (if (eq (window-buffer window) buffer) 3798 (set-window-parameter
3810 (setq display-buffer-window 3799 window 'help-setup
3811 (cons window 'reuse-buffer-window)) 3800 (if (eq (window-buffer window) buffer) 'reuse-same 'reuse-other))
3812 (setq display-buffer-window 3801 ;; In `quit-restore' parameter record information about the old
3813 (cons window 'reuse-other-window))) 3802 ;; buffer unless such information exists already.
3814 ;; In quit-restore parameter record information about the old buffer
3815 ;; unless such information exists already.
3816 (unless (window-parameter window 'quit-restore) 3803 (unless (window-parameter window 'quit-restore)
3817 (set-window-parameter 3804 (set-window-parameter
3818 window 'quit-restore 3805 window 'quit-restore
@@ -3820,15 +3807,15 @@ displayed."
3820 (window-point window) buffer 3807 (window-point window) buffer
3821 (window-total-size window) (selected-window))))) 3808 (window-total-size window) (selected-window)))))
3822 ((eq type 'pop-up-window) 3809 ((eq type 'pop-up-window)
3823 ;; In `display-buffer-window' record window as new. 3810 ;; In `help-setup' window parameter record window as new.
3824 (setq display-buffer-window (cons window 'new-window)) 3811 (set-window-parameter window 'help-setup 'new-window)
3825 ;; In `quit-restore' parameter record that we popped up this window, 3812 ;; In `quit-restore' parameter record that we popped up this window,
3826 ;; its buffer, and which window was selected before. 3813 ;; its buffer, and which window was selected before.
3827 (set-window-parameter 3814 (set-window-parameter
3828 window 'quit-restore (list 'new-window buffer (selected-window)))) 3815 window 'quit-restore (list 'new-window buffer (selected-window))))
3829 ((eq type 'pop-up-frame) 3816 ((eq type 'pop-up-frame)
3830 ;; In `display-buffer-window' record window as on new frame. 3817 ;; In `help-setup' window parameter record window as on new frame.
3831 (setq display-buffer-window (cons window 'new-frame)) 3818 (set-window-parameter window 'help-setup 'new-frame)
3832 ;; In `quit-restore' parameter record that we popped up this window 3819 ;; In `quit-restore' parameter record that we popped up this window
3833 ;; on a new frame, the buffer, and which window was selected before. 3820 ;; on a new frame, the buffer, and which window was selected before.
3834 (set-window-parameter 3821 (set-window-parameter
@@ -3841,9 +3828,8 @@ means that the currently selected window is not acceptable. It
3841should choose or create a window, display the specified buffer in 3828should choose or create a window, display the specified buffer in
3842it, and return the window. 3829it, and return the window.
3843 3830
3844The function specified here is responsible for setting the value 3831The function specified here is responsible for setting the
3845of `display-buffer-window' and the quit-restore parameter of the 3832quit-restore and help-setup parameters of the window used."
3846window used."
3847 :type '(choice 3833 :type '(choice
3848 (const nil) 3834 (const nil)
3849 (function :tag "function")) 3835 (function :tag "function"))
@@ -3913,8 +3899,8 @@ second. If `special-display-function' specifies some other
3913function, that function is called with the buffer named 3899function, that function is called with the buffer named
3914BUFFER-NAME as first, and the element's cdr as second argument. 3900BUFFER-NAME as first, and the element's cdr as second argument.
3915In any case, that function is responsible for setting the value 3901In any case, that function is responsible for setting the value
3916of `display-buffer-window' and the quit-restore parameter of the 3902The function specified here is responsible for setting the
3917window used. 3903quit-restore and help-setup parameters of the window used.
3918 3904
3919If this variable appears \"not to work\", because you added a 3905If this variable appears \"not to work\", because you added a
3920name to it but the corresponding buffer is displayed in the 3906name to it but the corresponding buffer is displayed in the
@@ -4115,9 +4101,8 @@ A buffer is special when its name is either listed in
4115`special-display-buffer-names' or matches a regexp in 4101`special-display-buffer-names' or matches a regexp in
4116`special-display-regexps'. 4102`special-display-regexps'.
4117 4103
4118The function specified here is responsible for setting the value 4104The function specified here is responsible for setting the
4119of `display-buffer-window' and the quit-restore parameter of the 4105quit-restore and help-setup parameters of the window used."
4120window used."
4121 :type 'function 4106 :type 'function
4122 :group 'frames) 4107 :group 'frames)
4123 4108