diff options
| author | Kenichi Handa | 2012-08-28 22:44:20 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2012-08-28 22:44:20 +0900 |
| commit | 4eb4de01df384be9b8d811f7ab476eeb37ece748 (patch) | |
| tree | d04f0dae31dd8b533a0c3cd738430841ce7ebb84 /lisp | |
| parent | fabc1281e9cde34ff9a19d843316d2ceca8647ad (diff) | |
| parent | 4f2daf31078e2cc059710e129dffe0beed8fc7c2 (diff) | |
| download | emacs-4eb4de01df384be9b8d811f7ab476eeb37ece748.tar.gz emacs-4eb4de01df384be9b8d811f7ab476eeb37ece748.zip | |
merge trunk
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 109 | ||||
| -rw-r--r-- | lisp/calc/calccomp.el | 2 | ||||
| -rw-r--r-- | lisp/calendar/cal-tex.el | 20 | ||||
| -rw-r--r-- | lisp/dired.el | 2 | ||||
| -rw-r--r-- | lisp/faces.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 15 | ||||
| -rw-r--r-- | lisp/gnus/gnus-cus.el | 24 | ||||
| -rw-r--r-- | lisp/gnus/gnus-msg.el | 7 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 24 | ||||
| -rw-r--r-- | lisp/help.el | 4 | ||||
| -rw-r--r-- | lisp/info.el | 18 | ||||
| -rw-r--r-- | lisp/isearch.el | 82 | ||||
| -rw-r--r-- | lisp/misc.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 5 | ||||
| -rw-r--r-- | lisp/progmodes/executable.el | 3 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 241 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 6 | ||||
| -rw-r--r-- | lisp/vc/vc-cvs.el | 6 | ||||
| -rw-r--r-- | lisp/window.el | 551 | ||||
| -rw-r--r-- | lisp/woman.el | 2 |
20 files changed, 813 insertions, 314 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4296280b22e..3dd2b7b1272 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,101 @@ | |||
| 1 | 2012-08-28 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * info.el (Info-fontify-node): Hide empty lines at the end of | ||
| 4 | the node. (Bug#12272) | ||
| 5 | |||
| 6 | 2012-08-27 Drew Adams <drew.adams@oracle.com> | ||
| 7 | |||
| 8 | * dired.el (dired-pop-to-buffer): Make window start at beginning | ||
| 9 | of buffer (Bug#12281). | ||
| 10 | |||
| 11 | 2012-08-26 Chong Yidong <cyd@gnu.org> | ||
| 12 | |||
| 13 | * window.el (special-display-regexps, special-display-frame-alist) | ||
| 14 | (special-display-buffer-names, special-display-function) | ||
| 15 | (display-buffer-reuse-frames): Mark as obsolete. | ||
| 16 | |||
| 17 | * progmodes/compile.el: Don't use display-buffer-reuse-frames. | ||
| 18 | |||
| 19 | * help.el (help-print-return-message): Don't treat | ||
| 20 | display-buffer-reuse-frames specially. | ||
| 21 | |||
| 22 | 2012-08-26 Chong Yidong <cyd@gnu.org> | ||
| 23 | |||
| 24 | * progmodes/gdb-mi.el (gdb-display-buffer-other-frame-action): New | ||
| 25 | variable, replacing gdb-frame-parameters. | ||
| 26 | (gdb-frame-io-buffer, gdb-frame-breakpoints-buffer) | ||
| 27 | (gdb-frame-threads-buffer, gdb-frame-memory-buffer) | ||
| 28 | (gdb-frame-disassembly-buffer, gdb-frame-stack-buffer) | ||
| 29 | (gdb-frame-locals-buffer, gdb-frame-registers-buffer): Use it. | ||
| 30 | (def-gdb-frame-for-buffer): Macro deleted. It is easier to define | ||
| 31 | the functions directly with gdb-display-buffer-other-frame-action. | ||
| 32 | (gdb-display-breakpoints-buffer, gdb-display-threads-buffer) | ||
| 33 | (gdb-display-memory-buffer, gdb-display-disassembly-buffer) | ||
| 34 | (gdb-display-stack-buffer, gdb-display-locals-buffer) | ||
| 35 | (gdb-display-registers-buffer): Define directly. | ||
| 36 | (def-gdb-display-buffer): Macro deleted. | ||
| 37 | (gdb-display-buffer): Remove second and third args, callers don't | ||
| 38 | use them. Defer to the default display-buffer behavior, apart | ||
| 39 | from making windows dedicated. | ||
| 40 | (gdb-setup-windows): Don't call display-buffer unnecessarily. | ||
| 41 | |||
| 42 | * progmodes/gud.el (gud-display-line): Just use display-buffer. | ||
| 43 | |||
| 44 | * window.el (display-buffer-pop-up-frame): Handle a | ||
| 45 | pop-up-frame-parameters alist entry. | ||
| 46 | (display-buffer): Document it. | ||
| 47 | |||
| 48 | 2012-08-26 Chong Yidong <cyd@gnu.org> | ||
| 49 | |||
| 50 | * isearch.el (search-whitespace-regexp): Make string and nil | ||
| 51 | values apply to both ordinary and regexp search. Allow a cons | ||
| 52 | cell value to distinguish between the two. | ||
| 53 | (isearch-whitespace-regexp, isearch-search-forward) | ||
| 54 | (isearch-search-backward): New functions. | ||
| 55 | (isearch-occur, isearch-search-fun-default, isearch-search) | ||
| 56 | (isearch-lazy-highlight-new-loop): Use them. | ||
| 57 | (isearch-forward, isearch-forward-regexp): Doc fix. | ||
| 58 | |||
| 59 | 2012-08-26 Chong Yidong <cyd@gnu.org> | ||
| 60 | |||
| 61 | * faces.el (help-argument-name): Always inherit from italic | ||
| 62 | (Bug#12213). | ||
| 63 | |||
| 64 | 2012-08-25 Martin Rudalics <rudalics@gmx.at> | ||
| 65 | |||
| 66 | * window.el (window--even-window-heights): Even heights when | ||
| 67 | WINDOW and the selected window form a vertical combination. | ||
| 68 | (display-buffer-use-some-window): Provide that window used gets | ||
| 69 | sized back by quit-window. (Bug#11880) and (Bug#12091) | ||
| 70 | |||
| 71 | 2012-08-24 Paul Eggert <eggert@cs.ucla.edu> | ||
| 72 | |||
| 73 | Fix file time stamp problem with bzr and CVS (Bug#12001). | ||
| 74 | * vc/vc-cvs.el (vc-cvs-parse-entry): Ignore subsecond information | ||
| 75 | in the file's time stamp, since the version control system loses | ||
| 76 | that information. | ||
| 77 | |||
| 78 | 2012-08-22 Juri Linkov <juri@jurta.org> | ||
| 79 | |||
| 80 | * info.el (Info-fontify-node): Hide the suffix of the | ||
| 81 | Info file name in the header line. (Bug#12187) | ||
| 82 | |||
| 83 | 2012-08-22 Glenn Morris <rgm@gnu.org> | ||
| 84 | |||
| 85 | * calendar/cal-tex.el (cal-tex-weekly-common): | ||
| 86 | Restore leading blank page. | ||
| 87 | |||
| 88 | 2012-08-22 Le Wang <l26wang@gmail.com> (tiny change) | ||
| 89 | |||
| 90 | * misc.el (forward-to-word, backward-to-word): Activate or extend | ||
| 91 | the region under `shift-select-mode'. (Bug#12231) | ||
| 92 | |||
| 93 | 2012-08-22 Bastien Guerry <bzg@gnu.org> | ||
| 94 | |||
| 95 | * progmodes/executable.el (executable-prefix): Set to "#!" instead | ||
| 96 | of "#! ". http://www.in-ulm.de/~mascheck/various/shebang/#details | ||
| 97 | gives details on why the space is never needed. | ||
| 98 | |||
| 1 | 2012-08-22 Martin Rudalics <rudalics@gmx.at> | 99 | 2012-08-22 Martin Rudalics <rudalics@gmx.at> |
| 2 | 100 | ||
| 3 | * window.el (walk-window-tree, window-with-parameter): New | 101 | * window.el (walk-window-tree, window-with-parameter): New |
| @@ -7,6 +105,15 @@ | |||
| 7 | (window-in-direction): Simplify and rewrite doc-string. | 105 | (window-in-direction): Simplify and rewrite doc-string. |
| 8 | (window--size-ignore): Rename to window--size-ignore-p. Update | 106 | (window--size-ignore): Rename to window--size-ignore-p. Update |
| 9 | callers. | 107 | callers. |
| 108 | (display-buffer-in-atom-window, window--major-non-side-window) | ||
| 109 | (window--major-side-window, display-buffer-in-major-side-window) | ||
| 110 | (delete-side-window, display-buffer-in-side-window): New | ||
| 111 | functions. | ||
| 112 | (window--side-check, window-deletable-p, delete-window) | ||
| 113 | (delete-other-windows, split-window): Handle side windows and | ||
| 114 | atomic windows appropriately. | ||
| 115 | (window--display-buffer): Call display-buffer-record-window also | ||
| 116 | when the window buffer did not change. | ||
| 10 | 117 | ||
| 11 | 2012-08-22 Christopher Schmidt <christopher@ch.ristopher.com> | 118 | 2012-08-22 Christopher Schmidt <christopher@ch.ristopher.com> |
| 12 | 119 | ||
| @@ -391,7 +498,7 @@ | |||
| 391 | 498 | ||
| 392 | 2012-08-13 Bastien Guerry <bzg@gnu.org> | 499 | 2012-08-13 Bastien Guerry <bzg@gnu.org> |
| 393 | 500 | ||
| 394 | * window.el (special-display-popup-frame): Small docstring | 501 | * window.el (special-display-popup-frame): Minor docstring |
| 395 | enhancement. (Bug#12172) | 502 | enhancement. (Bug#12172) |
| 396 | 503 | ||
| 397 | 2012-08-13 Andreas Schwab <schwab@linux-m68k.org> | 504 | 2012-08-13 Andreas Schwab <schwab@linux-m68k.org> |
diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el index 51ea8e7b7a3..2f1c95b7668 100644 --- a/lisp/calc/calccomp.el +++ b/lisp/calc/calccomp.el | |||
| @@ -86,7 +86,7 @@ | |||
| 86 | (setq sn (math-to-underscores sn))) | 86 | (setq sn (math-to-underscores sn))) |
| 87 | sn))) | 87 | sn))) |
| 88 | 88 | ||
| 89 | ;;; Give multiplication precendence when composing to avoid | 89 | ;;; Give multiplication precedence when composing to avoid |
| 90 | ;;; writing a*(b c) instead of a b c | 90 | ;;; writing a*(b c) instead of a b c |
| 91 | (defun math-compose-expr (a prec &optional div) | 91 | (defun math-compose-expr (a prec &optional div) |
| 92 | (let ((calc-multiplication-has-precedence t) | 92 | (let ((calc-multiplication-has-precedence t) |
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index d8d2a09c871..9c01ab40c0c 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el | |||
| @@ -1080,8 +1080,8 @@ shown are hard-coded to 8-12, 13-17." | |||
| 1080 | (cal-tex-longday "weekend" "0.8in") | 1080 | (cal-tex-longday "weekend" "0.8in") |
| 1081 | (insert cal-tex-lefthead) | 1081 | (insert cal-tex-lefthead) |
| 1082 | (cal-tex-longday "leftday" "1.85in")) | 1082 | (cal-tex-longday "leftday" "1.85in")) |
| 1083 | (cal-tex-preamble "twoside,12pt") | 1083 | (cal-tex-preamble "twoside,12pt") |
| 1084 | (insert "\\textwidth 7in | 1084 | (insert "\\textwidth 7in |
| 1085 | \\textheight 10.5in | 1085 | \\textheight 10.5in |
| 1086 | \\oddsidemargin 0in | 1086 | \\oddsidemargin 0in |
| 1087 | \\evensidemargin 0in | 1087 | \\evensidemargin 0in |
| @@ -1090,13 +1090,19 @@ shown are hard-coded to 8-12, 13-17." | |||
| 1090 | \\headsep 0.125in | 1090 | \\headsep 0.125in |
| 1091 | \\footskip .125in | 1091 | \\footskip .125in |
| 1092 | ") | 1092 | ") |
| 1093 | (insert cal-tex-righthead) | 1093 | (insert cal-tex-righthead) |
| 1094 | (cal-tex-longday "rightday" "2.75in") | 1094 | (cal-tex-longday "rightday" "2.75in") |
| 1095 | (cal-tex-longday "weekend" "1.8in") | 1095 | (cal-tex-longday "weekend" "1.8in") |
| 1096 | (insert cal-tex-lefthead) | 1096 | (insert cal-tex-lefthead) |
| 1097 | (cal-tex-longday "leftday" "2.75in")) | 1097 | (cal-tex-longday "leftday" "2.75in")) |
| 1098 | (cal-tex-b-document) | 1098 | (cal-tex-b-document) |
| 1099 | (cal-tex-cmd "\\pagestyle" "empty") | 1099 | (cal-tex-cmd "\\pagestyle" "empty") |
| 1100 | ;; Let's assume this is something to with twopage documents. | ||
| 1101 | ;; It has the downside that we start with a blank page. | ||
| 1102 | ;; It doesn't make obvious sense when oddside and evenside margins | ||
| 1103 | ;; are the same (non-filofax), but consider the left and right | ||
| 1104 | ;; versions of various functions as applicable to even and odd pages. | ||
| 1105 | (cal-tex-newpage) | ||
| 1100 | (dotimes (i n) | 1106 | (dotimes (i n) |
| 1101 | (insert "\\lefthead") | 1107 | (insert "\\lefthead") |
| 1102 | (cal-tex-arg | 1108 | (cal-tex-arg |
diff --git a/lisp/dired.el b/lisp/dired.el index 6182e133726..b82b7781e39 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -2950,6 +2950,8 @@ or \"* [3 files]\"." | |||
| 2950 | (split-window-sensibly window)))) | 2950 | (split-window-sensibly window)))) |
| 2951 | pop-up-frames) | 2951 | pop-up-frames) |
| 2952 | (pop-to-buffer (get-buffer-create buf))) | 2952 | (pop-to-buffer (get-buffer-create buf))) |
| 2953 | ;; See Bug#12281. | ||
| 2954 | (set-window-start nil (point-min)) | ||
| 2953 | ;; If dired-shrink-to-fit is t, make its window fit its contents. | 2955 | ;; If dired-shrink-to-fit is t, make its window fit its contents. |
| 2954 | (when dired-shrink-to-fit | 2956 | (when dired-shrink-to-fit |
| 2955 | ;; Try to not delete window when we want to display less than | 2957 | ;; Try to not delete window when we want to display less than |
diff --git a/lisp/faces.el b/lisp/faces.el index 2e1ba7798e9..6a477e172e1 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -2444,7 +2444,7 @@ Note: Other faces cannot inherit from the cursor face." | |||
| 2444 | :group 'menu | 2444 | :group 'menu |
| 2445 | :group 'basic-faces) | 2445 | :group 'basic-faces) |
| 2446 | 2446 | ||
| 2447 | (defface help-argument-name '((((supports :slant italic)) :inherit italic)) | 2447 | (defface help-argument-name '((t :inherit italic)) |
| 2448 | "Face to highlight argument names in *Help* buffers." | 2448 | "Face to highlight argument names in *Help* buffers." |
| 2449 | :group 'help) | 2449 | :group 'help) |
| 2450 | 2450 | ||
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7592c405076..4b56d351ac2 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2012-08-28 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-sum.el (gnus-summary-enter-digest-group): Decode content | ||
| 4 | transfer encoding first; bind gnus-newsgroup-charset to the charset | ||
| 5 | that the article specifies (Bug#12209). | ||
| 6 | |||
| 7 | 2012-08-22 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 8 | |||
| 9 | * gnus-cus.el (gnus-group-customize): Decode values posting-style holds. | ||
| 10 | (gnus-group-customize-done): Encode values posting-style holds. | ||
| 11 | |||
| 12 | * gnus-msg.el (gnus-summary-resend-message) | ||
| 13 | (gnus-configure-posting-styles): Decode values posting-style group | ||
| 14 | parameter holds. | ||
| 15 | |||
| 1 | 2012-08-21 Katsumi Yamaoka <yamaoka@jpl.org> | 16 | 2012-08-21 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 17 | ||
| 3 | * gnus-msg.el (gnus-summary-resend-message): Honor posting-style for | 18 | * gnus-msg.el (gnus-summary-resend-message): Honor posting-style for |
diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index 234d0f7ae56..3440e6310af 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el | |||
| @@ -417,6 +417,11 @@ category.")) | |||
| 417 | (delq elem tmp)) | 417 | (delq elem tmp)) |
| 418 | (setq tmp (cdr tmp)))) | 418 | (setq tmp (cdr tmp)))) |
| 419 | 419 | ||
| 420 | ;; Decode values posting-style holds. | ||
| 421 | (dolist (style (cdr (assq 'posting-style values))) | ||
| 422 | (when (stringp (cadr style)) | ||
| 423 | (setcdr style (list (mm-decode-coding-string (cadr style) 'utf-8))))) | ||
| 424 | |||
| 420 | (setq gnus-custom-params | 425 | (setq gnus-custom-params |
| 421 | (apply 'widget-create 'group | 426 | (apply 'widget-create 'group |
| 422 | :value values | 427 | :value values |
| @@ -487,14 +492,17 @@ form, but who cares?" | |||
| 487 | (defun gnus-group-customize-done (&rest ignore) | 492 | (defun gnus-group-customize-done (&rest ignore) |
| 488 | "Apply changes and bury the buffer." | 493 | "Apply changes and bury the buffer." |
| 489 | (interactive) | 494 | (interactive) |
| 490 | (if gnus-custom-topic | 495 | (let ((params (widget-value gnus-custom-params))) |
| 491 | (gnus-topic-set-parameters gnus-custom-topic | 496 | ;; Encode values posting-style holds. |
| 492 | (widget-value gnus-custom-params)) | 497 | (dolist (style (cdr (assq 'posting-style params))) |
| 493 | (gnus-group-edit-group-done 'params gnus-custom-group | 498 | (when (stringp (cadr style)) |
| 494 | (widget-value gnus-custom-params)) | 499 | (setcdr style (list (mm-encode-coding-string (cadr style) 'utf-8))))) |
| 495 | (gnus-group-edit-group-done 'method gnus-custom-group | 500 | (if gnus-custom-topic |
| 496 | (widget-value gnus-custom-method))) | 501 | (gnus-topic-set-parameters gnus-custom-topic params) |
| 497 | (bury-buffer)) | 502 | (gnus-group-edit-group-done 'params gnus-custom-group params) |
| 503 | (gnus-group-edit-group-done 'method gnus-custom-group | ||
| 504 | (widget-value gnus-custom-method))) | ||
| 505 | (bury-buffer))) | ||
| 498 | 506 | ||
| 499 | ;;; Score Customization: | 507 | ;;; Score Customization: |
| 500 | 508 | ||
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 07748bebb81..c2f79e70d1e 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -1376,6 +1376,9 @@ For the \"inline\" alternatives, also see the variable | |||
| 1376 | (user-full-name user-full-name) | 1376 | (user-full-name user-full-name) |
| 1377 | (user-mail-address user-mail-address) | 1377 | (user-mail-address user-mail-address) |
| 1378 | tem) | 1378 | tem) |
| 1379 | (dolist (style styles) | ||
| 1380 | (when (stringp (cadr style)) | ||
| 1381 | (setcdr style (list (mm-decode-coding-string (cadr style) 'utf-8))))) | ||
| 1379 | (dolist (style (if styles | 1382 | (dolist (style (if styles |
| 1380 | (append gnus-posting-styles (list (cons ".*" styles))) | 1383 | (append gnus-posting-styles (list (cons ".*" styles))) |
| 1381 | gnus-posting-styles)) | 1384 | gnus-posting-styles)) |
| @@ -1807,6 +1810,10 @@ this is a reply." | |||
| 1807 | (when gnus-newsgroup-name | 1810 | (when gnus-newsgroup-name |
| 1808 | (let ((tmp-style (gnus-group-find-parameter group 'posting-style t))) | 1811 | (let ((tmp-style (gnus-group-find-parameter group 'posting-style t))) |
| 1809 | (when tmp-style | 1812 | (when tmp-style |
| 1813 | (dolist (style tmp-style) | ||
| 1814 | (when (stringp (cadr style)) | ||
| 1815 | (setcdr style (list (mm-decode-coding-string (cadr style) | ||
| 1816 | 'utf-8))))) | ||
| 1810 | (setq styles (append styles (list (cons ".*" tmp-style))))))) | 1817 | (setq styles (append styles (list (cons ".*" tmp-style))))))) |
| 1811 | ;; Go through all styles and look for matches. | 1818 | ;; Go through all styles and look for matches. |
| 1812 | (dolist (style styles) | 1819 | (dolist (style styles) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 06f17bcf646..b44b953bec6 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -9137,7 +9137,7 @@ To control what happens when you exit the group, see the | |||
| 9137 | (list (cons 'save-article-group ogroup)))) | 9137 | (list (cons 'save-article-group ogroup)))) |
| 9138 | (case-fold-search t) | 9138 | (case-fold-search t) |
| 9139 | (buf (current-buffer)) | 9139 | (buf (current-buffer)) |
| 9140 | dig to-address) | 9140 | dig to-address charset) |
| 9141 | (with-current-buffer gnus-original-article-buffer | 9141 | (with-current-buffer gnus-original-article-buffer |
| 9142 | ;; Have the digest group inherit the main mail address of | 9142 | ;; Have the digest group inherit the main mail address of |
| 9143 | ;; the parent article. | 9143 | ;; the parent article. |
| @@ -9150,16 +9150,32 @@ To control what happens when you exit the group, see the | |||
| 9150 | to-address)))))) | 9150 | to-address)))))) |
| 9151 | (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*")) | 9151 | (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*")) |
| 9152 | (insert-buffer-substring gnus-original-article-buffer) | 9152 | (insert-buffer-substring gnus-original-article-buffer) |
| 9153 | ;; Remove lines that may lead nndoc to misinterpret the | ||
| 9154 | ;; document type. | ||
| 9155 | (narrow-to-region | 9153 | (narrow-to-region |
| 9156 | (goto-char (point-min)) | 9154 | (goto-char (point-min)) |
| 9157 | (or (search-forward "\n\n" nil t) (point))) | 9155 | (or (search-forward "\n\n" nil t) (point))) |
| 9156 | ;; Remove lines that may lead nndoc to misinterpret the | ||
| 9157 | ;; document type. | ||
| 9158 | (goto-char (point-min)) | 9158 | (goto-char (point-min)) |
| 9159 | (delete-matching-lines "^Path:\\|^From ") | 9159 | (delete-matching-lines "^Path:\\|^From ") |
| 9160 | ;; Parse charset, and decode content transfer encoding. | ||
| 9161 | (setq charset (mail-content-type-get | ||
| 9162 | (mail-header-parse-content-type | ||
| 9163 | (or (gnus-fetch-field "content-type") "")) | ||
| 9164 | 'charset)) | ||
| 9165 | (let ((encoding (gnus-fetch-field "content-transfer-encoding"))) | ||
| 9166 | (when encoding | ||
| 9167 | (message-remove-header "content-transfer-encoding") | ||
| 9168 | (goto-char (point-max)) | ||
| 9169 | (widen) | ||
| 9170 | (narrow-to-region (point) (point-max)) | ||
| 9171 | (mm-decode-content-transfer-encoding | ||
| 9172 | (intern (downcase (mail-header-strip encoding)))))) | ||
| 9160 | (widen)) | 9173 | (widen)) |
| 9161 | (unwind-protect | 9174 | (unwind-protect |
| 9162 | (if (let ((gnus-newsgroup-ephemeral-charset gnus-newsgroup-charset) | 9175 | (if (let ((gnus-newsgroup-ephemeral-charset |
| 9176 | (if charset | ||
| 9177 | (intern (downcase (gnus-strip-whitespace charset))) | ||
| 9178 | gnus-newsgroup-charset)) | ||
| 9163 | (gnus-newsgroup-ephemeral-ignored-charsets | 9179 | (gnus-newsgroup-ephemeral-ignored-charsets |
| 9164 | gnus-newsgroup-ignored-charsets)) | 9180 | gnus-newsgroup-ignored-charsets)) |
| 9165 | (gnus-group-read-ephemeral-group | 9181 | (gnus-group-read-ephemeral-group |
diff --git a/lisp/help.el b/lisp/help.el index 19cb811bcf5..19db7c255d1 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -145,10 +145,6 @@ specifies what to do when the user exits the help buffer." | |||
| 145 | ;; Secondly, the buffer has not been displayed yet, | 145 | ;; Secondly, the buffer has not been displayed yet, |
| 146 | ;; so we don't know whether its frame will be selected. | 146 | ;; so we don't know whether its frame will be selected. |
| 147 | nil) | 147 | nil) |
| 148 | (display-buffer-reuse-frames | ||
| 149 | (setq help-return-method (cons (selected-window) | ||
| 150 | 'quit-window)) | ||
| 151 | nil) | ||
| 152 | ((not (one-window-p t)) | 148 | ((not (one-window-p t)) |
| 153 | (setq help-return-method | 149 | (setq help-return-method |
| 154 | (cons (selected-window) 'quit-window)) | 150 | (cons (selected-window) 'quit-window)) |
diff --git a/lisp/info.el b/lisp/info.el index 15478f9063c..fe4afd72163 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -4527,7 +4527,17 @@ first line or header line, and for breadcrumb links.") | |||
| 4527 | ((not (bobp)) | 4527 | ((not (bobp)) |
| 4528 | ;; Hide the punctuation at the end, too. | 4528 | ;; Hide the punctuation at the end, too. |
| 4529 | (skip-chars-backward " \t,") | 4529 | (skip-chars-backward " \t,") |
| 4530 | (put-text-property (point) header-end 'invisible t)))))) | 4530 | (put-text-property (point) header-end 'invisible t) |
| 4531 | ;; Hide the suffix of the Info file name. | ||
| 4532 | (beginning-of-line) | ||
| 4533 | (if (re-search-forward | ||
| 4534 | (format "File: %s\\([^,\n\t]+\\)," | ||
| 4535 | (if (stringp Info-current-file) | ||
| 4536 | (file-name-nondirectory Info-current-file) | ||
| 4537 | Info-current-file)) | ||
| 4538 | header-end t) | ||
| 4539 | (put-text-property (match-beginning 1) (match-end 1) | ||
| 4540 | 'invisible t))))))) | ||
| 4531 | 4541 | ||
| 4532 | ;; Fontify titles | 4542 | ;; Fontify titles |
| 4533 | (goto-char (point-min)) | 4543 | (goto-char (point-min)) |
| @@ -4815,6 +4825,12 @@ first line or header line, and for breadcrumb links.") | |||
| 4815 | mouse-face highlight | 4825 | mouse-face highlight |
| 4816 | help-echo "mouse-2: go to this URL")))) | 4826 | help-echo "mouse-2: go to this URL")))) |
| 4817 | 4827 | ||
| 4828 | ;; Hide empty lines at the end of the node. | ||
| 4829 | (goto-char (point-max)) | ||
| 4830 | (skip-chars-backward "\n") | ||
| 4831 | (when (< (1+ (point)) (point-max)) | ||
| 4832 | (put-text-property (1+ (point)) (point-max) 'invisible t)) | ||
| 4833 | |||
| 4818 | (set-buffer-modified-p nil)))) | 4834 | (set-buffer-modified-p nil)))) |
| 4819 | 4835 | ||
| 4820 | ;;; Speedbar support: | 4836 | ;;; Speedbar support: |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 9271ce32484..6ea8d86336a 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -111,17 +111,32 @@ string, and RET terminates editing and does a nonincremental search." | |||
| 111 | 111 | ||
| 112 | (defcustom search-whitespace-regexp (purecopy "\\s-+") | 112 | (defcustom search-whitespace-regexp (purecopy "\\s-+") |
| 113 | "If non-nil, regular expression to match a sequence of whitespace chars. | 113 | "If non-nil, regular expression to match a sequence of whitespace chars. |
| 114 | This applies to regular expression incremental search. | 114 | When you enter a space or spaces in the incremental search, it |
| 115 | When you put a space or spaces in the incremental regexp, it stands for | 115 | will match any sequence matched by this regexp. As an exception, |
| 116 | this, unless it is inside of a regexp construct such as [...] or *, + or ?. | 116 | spaces are treated normally in regexp incremental search if they |
| 117 | occur in a regexp construct like [...] or *, + or ?. | ||
| 118 | |||
| 119 | If the value is a string, it applies to both ordinary and regexp | ||
| 120 | incremental search. If the value is nil, each space you type | ||
| 121 | matches literally, against one space. | ||
| 122 | |||
| 123 | The value can also be a cons cell (REGEXP-1 . REGEXP-2). In that | ||
| 124 | case, REGEXP-1 is used as the value for ordinary incremental | ||
| 125 | search, and REGEXP-2 is used for regexp incremental search. | ||
| 126 | |||
| 117 | You might want to use something like \"[ \\t\\r\\n]+\" instead. | 127 | You might want to use something like \"[ \\t\\r\\n]+\" instead. |
| 118 | In the Customization buffer, that is `[' followed by a space, | 128 | In the Customization buffer, that is `[' followed by a space, |
| 119 | a tab, a carriage return (control-M), a newline, and `]+'. | 129 | a tab, a carriage return (control-M), a newline, and `]+'." |
| 120 | 130 | :type '(choice (const :tag "Treat Spaces Literally" nil) | |
| 121 | When this is nil, each space you type matches literally, against one space." | 131 | (cons (choice :tag "For Ordinary Isearch" |
| 122 | :type '(choice (const :tag "Find Spaces Literally" nil) | 132 | regexp |
| 133 | (const :tag "Treat Spaces Literally" nil)) | ||
| 134 | (choice :tag "For Regexp Isearch" | ||
| 135 | regexp | ||
| 136 | (const :tag "Treat Spaces Literally" nil))) | ||
| 123 | regexp) | 137 | regexp) |
| 124 | :group 'isearch) | 138 | :group 'isearch |
| 139 | :version "24.3") | ||
| 125 | 140 | ||
| 126 | (defcustom search-invisible 'open | 141 | (defcustom search-invisible 'open |
| 127 | "If t incremental search can match hidden text. | 142 | "If t incremental search can match hidden text. |
| @@ -687,6 +702,9 @@ Type \\[isearch-describe-bindings] to display all Isearch key bindings. | |||
| 687 | Type \\[isearch-describe-key] to display documentation of Isearch key. | 702 | Type \\[isearch-describe-key] to display documentation of Isearch key. |
| 688 | Type \\[isearch-describe-mode] to display documentation of Isearch mode. | 703 | Type \\[isearch-describe-mode] to display documentation of Isearch mode. |
| 689 | 704 | ||
| 705 | In incremental searches, a space or spaces normally matches any | ||
| 706 | whitespace; see the variable `search-whitespace-regexp'. | ||
| 707 | |||
| 690 | If an input method is turned on in the current buffer, that input | 708 | If an input method is turned on in the current buffer, that input |
| 691 | method is also active while you are typing characters to search. | 709 | method is also active while you are typing characters to search. |
| 692 | To toggle the input method, type \\[isearch-toggle-input-method]. \ | 710 | To toggle the input method, type \\[isearch-toggle-input-method]. \ |
| @@ -710,22 +728,19 @@ the calling function until the search is done." | |||
| 710 | (isearch-mode t (not (null regexp-p)) nil (not no-recursive-edit))) | 728 | (isearch-mode t (not (null regexp-p)) nil (not no-recursive-edit))) |
| 711 | 729 | ||
| 712 | (defun isearch-forward-regexp (&optional not-regexp no-recursive-edit) | 730 | (defun isearch-forward-regexp (&optional not-regexp no-recursive-edit) |
| 713 | "\ | 731 | "Do incremental search forward for regular expression. |
| 714 | Do incremental search forward for regular expression. | ||
| 715 | With a prefix argument, do a regular string search instead. | 732 | With a prefix argument, do a regular string search instead. |
| 716 | Like ordinary incremental search except that your input is treated | 733 | Like ordinary incremental search except that your input is treated |
| 717 | as a regexp. See the command `isearch-forward' for more information. | 734 | as a regexp. See the command `isearch-forward' for more information. |
| 718 | 735 | ||
| 719 | In regexp incremental searches, a space or spaces normally matches | 736 | In incremental searches, a space or spaces normally matches any |
| 720 | any whitespace (the variable `search-whitespace-regexp' controls | 737 | whitespace; see the variable `search-whitespace-regexp'. To |
| 721 | precisely what that means). If you want to search for a literal space | 738 | search for a literal space and nothing else, enter C-q SPC." |
| 722 | and nothing else, enter C-q SPC." | ||
| 723 | (interactive "P\np") | 739 | (interactive "P\np") |
| 724 | (isearch-mode t (null not-regexp) nil (not no-recursive-edit))) | 740 | (isearch-mode t (null not-regexp) nil (not no-recursive-edit))) |
| 725 | 741 | ||
| 726 | (defun isearch-forward-word (&optional not-word no-recursive-edit) | 742 | (defun isearch-forward-word (&optional not-word no-recursive-edit) |
| 727 | "\ | 743 | "Do incremental search forward for a sequence of words. |
| 728 | Do incremental search forward for a sequence of words. | ||
| 729 | With a prefix argument, do a regular string search instead. | 744 | With a prefix argument, do a regular string search instead. |
| 730 | Like ordinary incremental search except that your input is treated | 745 | Like ordinary incremental search except that your input is treated |
| 731 | as a sequence of words without regard to how the words are separated. | 746 | as a sequence of words without regard to how the words are separated. |
| @@ -734,8 +749,7 @@ See the command `isearch-forward' for more information." | |||
| 734 | (isearch-mode t nil nil (not no-recursive-edit) (null not-word))) | 749 | (isearch-mode t nil nil (not no-recursive-edit) (null not-word))) |
| 735 | 750 | ||
| 736 | (defun isearch-forward-symbol (&optional not-symbol no-recursive-edit) | 751 | (defun isearch-forward-symbol (&optional not-symbol no-recursive-edit) |
| 737 | "\ | 752 | "Do incremental search forward for a symbol. |
| 738 | Do incremental search forward for a symbol. | ||
| 739 | The prefix argument is currently unused. | 753 | The prefix argument is currently unused. |
| 740 | Like ordinary incremental search except that your input is treated | 754 | Like ordinary incremental search except that your input is treated |
| 741 | as a symbol surrounded by symbol boundary constructs \\_< and \\_>. | 755 | as a symbol surrounded by symbol boundary constructs \\_< and \\_>. |
| @@ -744,16 +758,14 @@ See the command `isearch-forward' for more information." | |||
| 744 | (isearch-mode t nil nil (not no-recursive-edit) 'isearch-symbol-regexp)) | 758 | (isearch-mode t nil nil (not no-recursive-edit) 'isearch-symbol-regexp)) |
| 745 | 759 | ||
| 746 | (defun isearch-backward (&optional regexp-p no-recursive-edit) | 760 | (defun isearch-backward (&optional regexp-p no-recursive-edit) |
| 747 | "\ | 761 | "Do incremental search backward. |
| 748 | Do incremental search backward. | ||
| 749 | With a prefix argument, do a regular expression search instead. | 762 | With a prefix argument, do a regular expression search instead. |
| 750 | See the command `isearch-forward' for more information." | 763 | See the command `isearch-forward' for more information." |
| 751 | (interactive "P\np") | 764 | (interactive "P\np") |
| 752 | (isearch-mode nil (not (null regexp-p)) nil (not no-recursive-edit))) | 765 | (isearch-mode nil (not (null regexp-p)) nil (not no-recursive-edit))) |
| 753 | 766 | ||
| 754 | (defun isearch-backward-regexp (&optional not-regexp no-recursive-edit) | 767 | (defun isearch-backward-regexp (&optional not-regexp no-recursive-edit) |
| 755 | "\ | 768 | "Do incremental search backward for regular expression. |
| 756 | Do incremental search backward for regular expression. | ||
| 757 | With a prefix argument, do a regular string search instead. | 769 | With a prefix argument, do a regular string search instead. |
| 758 | Like ordinary incremental search except that your input is treated | 770 | Like ordinary incremental search except that your input is treated |
| 759 | as a regexp. See the command `isearch-forward' for more information." | 771 | as a regexp. See the command `isearch-forward' for more information." |
| @@ -895,8 +907,7 @@ The last thing it does is to run `isearch-update-post-hook'." | |||
| 895 | (if (< isearch-other-end (point)) ; isearch-forward? | 907 | (if (< isearch-other-end (point)) ; isearch-forward? |
| 896 | (isearch-highlight isearch-other-end (point)) | 908 | (isearch-highlight isearch-other-end (point)) |
| 897 | (isearch-highlight (point) isearch-other-end)) | 909 | (isearch-highlight (point) isearch-other-end)) |
| 898 | (isearch-dehighlight)) | 910 | (isearch-dehighlight)))) |
| 899 | )) | ||
| 900 | (setq ;; quit-flag nil not for isearch-mode | 911 | (setq ;; quit-flag nil not for isearch-mode |
| 901 | isearch-adjusted nil | 912 | isearch-adjusted nil |
| 902 | isearch-yank-flag nil) | 913 | isearch-yank-flag nil) |
| @@ -1547,6 +1558,15 @@ See `isearch-query-replace' for more information." | |||
| 1547 | (list current-prefix-arg)) | 1558 | (list current-prefix-arg)) |
| 1548 | (isearch-query-replace delimited t)) | 1559 | (isearch-query-replace delimited t)) |
| 1549 | 1560 | ||
| 1561 | (defun isearch-whitespace-regexp () | ||
| 1562 | "Return the value of `search-whitespace-regexp' for the current search." | ||
| 1563 | (cond ((not (consp search-whitespace-regexp)) | ||
| 1564 | search-whitespace-regexp) | ||
| 1565 | (isearch-regexp | ||
| 1566 | (cdr search-whitespace-regexp)) | ||
| 1567 | (t | ||
| 1568 | (car search-whitespace-regexp)))) | ||
| 1569 | |||
| 1550 | (defun isearch-occur (regexp &optional nlines) | 1570 | (defun isearch-occur (regexp &optional nlines) |
| 1551 | "Run `occur' using the last search string as the regexp. | 1571 | "Run `occur' using the last search string as the regexp. |
| 1552 | Interactively, REGEXP is constructed using the search string from the | 1572 | Interactively, REGEXP is constructed using the search string from the |
| @@ -1586,7 +1606,7 @@ characters in that string." | |||
| 1586 | ;; Set `search-upper-case' to nil to not call | 1606 | ;; Set `search-upper-case' to nil to not call |
| 1587 | ;; `isearch-no-upper-case-p' in `occur-1'. | 1607 | ;; `isearch-no-upper-case-p' in `occur-1'. |
| 1588 | (search-upper-case nil) | 1608 | (search-upper-case nil) |
| 1589 | (search-spaces-regexp (if isearch-regexp search-whitespace-regexp))) | 1609 | (search-spaces-regexp (isearch-whitespace-regexp))) |
| 1590 | (occur regexp nlines))) | 1610 | (occur regexp nlines))) |
| 1591 | 1611 | ||
| 1592 | (declare-function hi-lock-read-face-name "hi-lock" ()) | 1612 | (declare-function hi-lock-read-face-name "hi-lock" ()) |
| @@ -2426,7 +2446,13 @@ Can be changed via `isearch-search-fun-function' for special needs." | |||
| 2426 | (isearch-regexp | 2446 | (isearch-regexp |
| 2427 | (if isearch-forward 're-search-forward 're-search-backward)) | 2447 | (if isearch-forward 're-search-forward 're-search-backward)) |
| 2428 | (t | 2448 | (t |
| 2429 | (if isearch-forward 'search-forward 'search-backward)))) | 2449 | (if isearch-forward 'isearch-search-forward 'isearch-search-backward)))) |
| 2450 | |||
| 2451 | (defun isearch-search-forward (string &optional bound noerror count) | ||
| 2452 | (re-search-forward (regexp-quote string) bound noerror count)) | ||
| 2453 | |||
| 2454 | (defun isearch-search-backward (string &optional bound noerror count) | ||
| 2455 | (re-search-backward (regexp-quote string) bound noerror count)) | ||
| 2430 | 2456 | ||
| 2431 | (defun isearch-search-string (string bound noerror) | 2457 | (defun isearch-search-string (string bound noerror) |
| 2432 | "Search for the first occurrence of STRING or its translation. | 2458 | "Search for the first occurrence of STRING or its translation. |
| @@ -2487,7 +2513,7 @@ update the match data, and return point." | |||
| 2487 | search-invisible)) | 2513 | search-invisible)) |
| 2488 | (inhibit-quit nil) | 2514 | (inhibit-quit nil) |
| 2489 | (case-fold-search isearch-case-fold-search) | 2515 | (case-fold-search isearch-case-fold-search) |
| 2490 | (search-spaces-regexp search-whitespace-regexp) | 2516 | (search-spaces-regexp (isearch-whitespace-regexp)) |
| 2491 | (retry t)) | 2517 | (retry t)) |
| 2492 | (setq isearch-error nil) | 2518 | (setq isearch-error nil) |
| 2493 | (while retry | 2519 | (while retry |
| @@ -2847,7 +2873,7 @@ by other Emacs features." | |||
| 2847 | isearch-lazy-highlight-last-string isearch-string | 2873 | isearch-lazy-highlight-last-string isearch-string |
| 2848 | isearch-lazy-highlight-case-fold-search isearch-case-fold-search | 2874 | isearch-lazy-highlight-case-fold-search isearch-case-fold-search |
| 2849 | isearch-lazy-highlight-regexp isearch-regexp | 2875 | isearch-lazy-highlight-regexp isearch-regexp |
| 2850 | isearch-lazy-highlight-space-regexp search-whitespace-regexp | 2876 | isearch-lazy-highlight-space-regexp (isearch-whitespace-regexp) |
| 2851 | isearch-lazy-highlight-word isearch-word | 2877 | isearch-lazy-highlight-word isearch-word |
| 2852 | isearch-lazy-highlight-forward isearch-forward) | 2878 | isearch-lazy-highlight-forward isearch-forward) |
| 2853 | (unless (equal isearch-string "") | 2879 | (unless (equal isearch-string "") |
diff --git a/lisp/misc.el b/lisp/misc.el index cb52ecbd36e..96b739dc2b7 100644 --- a/lisp/misc.el +++ b/lisp/misc.el | |||
| @@ -99,14 +99,14 @@ Ignores CHAR at point." | |||
| 99 | (defun forward-to-word (arg) | 99 | (defun forward-to-word (arg) |
| 100 | "Move forward until encountering the beginning of a word. | 100 | "Move forward until encountering the beginning of a word. |
| 101 | With argument, do this that many times." | 101 | With argument, do this that many times." |
| 102 | (interactive "p") | 102 | (interactive "^p") |
| 103 | (or (re-search-forward (if (> arg 0) "\\W\\b" "\\b\\W") nil t arg) | 103 | (or (re-search-forward (if (> arg 0) "\\W\\b" "\\b\\W") nil t arg) |
| 104 | (goto-char (if (> arg 0) (point-max) (point-min))))) | 104 | (goto-char (if (> arg 0) (point-max) (point-min))))) |
| 105 | 105 | ||
| 106 | (defun backward-to-word (arg) | 106 | (defun backward-to-word (arg) |
| 107 | "Move backward until encountering the end of a word. | 107 | "Move backward until encountering the end of a word. |
| 108 | With argument, do this that many times." | 108 | With argument, do this that many times." |
| 109 | (interactive "p") | 109 | (interactive "^p") |
| 110 | (forward-to-word (- arg))) | 110 | (forward-to-word (- arg))) |
| 111 | 111 | ||
| 112 | ;;;###autoload | 112 | ;;;###autoload |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 21a323d8b45..eb966e8a90d 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -2461,10 +2461,7 @@ and overlay is highlighted between MK and END-MK." | |||
| 2461 | ;; the error location if the two buffers are in two | 2461 | ;; the error location if the two buffers are in two |
| 2462 | ;; different frames. So don't do it if it's not necessary. | 2462 | ;; different frames. So don't do it if it's not necessary. |
| 2463 | pre-existing | 2463 | pre-existing |
| 2464 | (let ((display-buffer-reuse-frames t) | 2464 | (display-buffer (marker-buffer msg)))) |
| 2465 | (pop-up-windows t)) | ||
| 2466 | ;; Pop up a window. | ||
| 2467 | (display-buffer (marker-buffer msg))))) | ||
| 2468 | (highlight-regexp (with-current-buffer (marker-buffer msg) | 2465 | (highlight-regexp (with-current-buffer (marker-buffer msg) |
| 2469 | ;; also do this while we change buffer | 2466 | ;; also do this while we change buffer |
| 2470 | (compilation-set-window w msg) | 2467 | (compilation-set-window w msg) |
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index e5142571972..092e1a4d578 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el | |||
| @@ -84,8 +84,9 @@ When this is `function', only ask when called non-interactively." | |||
| 84 | :group 'executable) | 84 | :group 'executable) |
| 85 | 85 | ||
| 86 | 86 | ||
| 87 | (defcustom executable-prefix "#! " | 87 | (defcustom executable-prefix "#!" |
| 88 | "Interpreter magic number prefix inserted when there was no magic number." | 88 | "Interpreter magic number prefix inserted when there was no magic number." |
| 89 | :version "24.3" ; "#! " -> "#!" | ||
| 89 | :type 'string | 90 | :type 'string |
| 90 | :group 'executable) | 91 | :group 'executable) |
| 91 | 92 | ||
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 0a99c2f5c24..59c419abfc3 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -1413,29 +1413,6 @@ this trigger is subscribed to `gdb-buf-publisher' and called with | |||
| 1413 | (with-current-buffer ,buffer | 1413 | (with-current-buffer ,buffer |
| 1414 | (apply ',expr args)))) | 1414 | (apply ',expr args)))) |
| 1415 | 1415 | ||
| 1416 | ;; Used to define all gdb-frame-*-buffer functions except | ||
| 1417 | ;; `gdb-frame-io-buffer' | ||
| 1418 | (defmacro def-gdb-frame-for-buffer (name buffer &optional doc) | ||
| 1419 | "Define a function NAME which shows gdb BUFFER in a separate frame. | ||
| 1420 | |||
| 1421 | DOC is an optional documentation string." | ||
| 1422 | `(defun ,name (&optional thread) | ||
| 1423 | ,(when doc doc) | ||
| 1424 | (interactive) | ||
| 1425 | (let ((special-display-regexps (append special-display-regexps '(".*"))) | ||
| 1426 | (special-display-frame-alist gdb-frame-parameters)) | ||
| 1427 | (display-buffer (gdb-get-buffer-create ,buffer thread))))) | ||
| 1428 | |||
| 1429 | (defmacro def-gdb-display-buffer (name buffer &optional doc) | ||
| 1430 | "Define a function NAME which shows gdb BUFFER. | ||
| 1431 | |||
| 1432 | DOC is an optional documentation string." | ||
| 1433 | `(defun ,name (&optional thread) | ||
| 1434 | ,(when doc doc) | ||
| 1435 | (interactive) | ||
| 1436 | (gdb-display-buffer | ||
| 1437 | (gdb-get-buffer-create ,buffer thread) t))) | ||
| 1438 | |||
| 1439 | ;; Used to display windows with thread-bound buffers | 1416 | ;; Used to display windows with thread-bound buffers |
| 1440 | (defmacro def-gdb-preempt-display-buffer (name buffer &optional doc | 1417 | (defmacro def-gdb-preempt-display-buffer (name buffer &optional doc |
| 1441 | split-horizontal) | 1418 | split-horizontal) |
| @@ -1511,8 +1488,7 @@ DOC is an optional documentation string." | |||
| 1511 | (defun gdb-display-io-buffer () | 1488 | (defun gdb-display-io-buffer () |
| 1512 | "Display IO of debugged program in a separate window." | 1489 | "Display IO of debugged program in a separate window." |
| 1513 | (interactive) | 1490 | (interactive) |
| 1514 | (gdb-display-buffer | 1491 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-inferior-io))) |
| 1515 | (gdb-get-buffer-create 'gdb-inferior-io) t)) | ||
| 1516 | 1492 | ||
| 1517 | (defun gdb-inferior-io--init-proc (proc) | 1493 | (defun gdb-inferior-io--init-proc (proc) |
| 1518 | ;; Set up inferior I/O. Needs GDB 6.4 onwards. | 1494 | ;; Set up inferior I/O. Needs GDB 6.4 onwards. |
| @@ -1540,19 +1516,24 @@ DOC is an optional documentation string." | |||
| 1540 | (comint-exec io-buffer "gdb-inferior" nil nil nil) | 1516 | (comint-exec io-buffer "gdb-inferior" nil nil nil) |
| 1541 | (gdb-inferior-io--init-proc (get-buffer-process io-buffer)))))) | 1517 | (gdb-inferior-io--init-proc (get-buffer-process io-buffer)))))) |
| 1542 | 1518 | ||
| 1543 | (defconst gdb-frame-parameters | 1519 | (defvar gdb-display-buffer-other-frame-action |
| 1544 | '((height . 14) (width . 80) | 1520 | `((display-buffer-reuse-window display-buffer-pop-up-frame) |
| 1545 | (unsplittable . t) | 1521 | (reusable-frames . 0) |
| 1546 | (tool-bar-lines . nil) | 1522 | (inhibit-same-window . t) |
| 1547 | (menu-bar-lines . nil) | 1523 | (pop-up-frame-parameters (height . 14) |
| 1548 | (minibuffer . nil))) | 1524 | (width . 80) |
| 1525 | (unsplittable . t) | ||
| 1526 | (tool-bar-lines . nil) | ||
| 1527 | (menu-bar-lines . nil) | ||
| 1528 | (minibuffer . nil))) | ||
| 1529 | "A `display-buffer' action for displaying GDB utility frames.") | ||
| 1530 | (put 'gdb-display-buffer-other-frame-action 'risky-local-variable t) | ||
| 1549 | 1531 | ||
| 1550 | (defun gdb-frame-io-buffer () | 1532 | (defun gdb-frame-io-buffer () |
| 1551 | "Display IO of debugged program in a new frame." | 1533 | "Display IO of debugged program in another frame." |
| 1552 | (interactive) | 1534 | (interactive) |
| 1553 | (let ((special-display-regexps (append special-display-regexps '(".*"))) | 1535 | (display-buffer (gdb-get-buffer-create 'gdb-inferior-io) |
| 1554 | (special-display-frame-alist gdb-frame-parameters)) | 1536 | gdb-display-buffer-other-frame-action)) |
| 1555 | (display-buffer (gdb-get-buffer-create 'gdb-inferior-io)))) | ||
| 1556 | 1537 | ||
| 1557 | (defvar gdb-inferior-io-mode-map | 1538 | (defvar gdb-inferior-io-mode-map |
| 1558 | (let ((map (make-sparse-keymap))) | 1539 | (let ((map (make-sparse-keymap))) |
| @@ -1571,7 +1552,7 @@ DOC is an optional documentation string." | |||
| 1571 | 1552 | ||
| 1572 | (defun gdb-inferior-filter (proc string) | 1553 | (defun gdb-inferior-filter (proc string) |
| 1573 | (unless (string-equal string "") | 1554 | (unless (string-equal string "") |
| 1574 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-inferior-io) t)) | 1555 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-inferior-io))) |
| 1575 | (with-current-buffer (gdb-get-buffer-create 'gdb-inferior-io) | 1556 | (with-current-buffer (gdb-get-buffer-create 'gdb-inferior-io) |
| 1576 | (comint-output-filter proc string))) | 1557 | (comint-output-filter proc string))) |
| 1577 | 1558 | ||
| @@ -2615,15 +2596,16 @@ If not in a source or disassembly buffer just set point." | |||
| 2615 | (defun gdb-breakpoints-buffer-name () | 2596 | (defun gdb-breakpoints-buffer-name () |
| 2616 | (concat "*breakpoints of " (gdb-get-target-string) "*")) | 2597 | (concat "*breakpoints of " (gdb-get-target-string) "*")) |
| 2617 | 2598 | ||
| 2618 | (def-gdb-display-buffer | 2599 | (defun gdb-display-breakpoints-buffer (&optional thread) |
| 2619 | gdb-display-breakpoints-buffer | 2600 | "Display GDB breakpoints." |
| 2620 | 'gdb-breakpoints-buffer | 2601 | (interactive) |
| 2621 | "Display status of user-settable breakpoints.") | 2602 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-breakpoints-buffer thread))) |
| 2622 | 2603 | ||
| 2623 | (def-gdb-frame-for-buffer | 2604 | (defun gdb-frame-breakpoints-buffer (&optional thread) |
| 2624 | gdb-frame-breakpoints-buffer | 2605 | "Display GDB breakpoints in another frame." |
| 2625 | 'gdb-breakpoints-buffer | 2606 | (interactive) |
| 2626 | "Display status of user-settable breakpoints in a new frame.") | 2607 | (display-buffer (gdb-get-buffer-create 'gdb-breakpoints-buffer thread) |
| 2608 | gdb-display-buffer-other-frame-action)) | ||
| 2627 | 2609 | ||
| 2628 | (defvar gdb-breakpoints-mode-map | 2610 | (defvar gdb-breakpoints-mode-map |
| 2629 | (let ((map (make-sparse-keymap)) | 2611 | (let ((map (make-sparse-keymap)) |
| @@ -2684,15 +2666,16 @@ corresponding to the mode line clicked." | |||
| 2684 | (defun gdb-threads-buffer-name () | 2666 | (defun gdb-threads-buffer-name () |
| 2685 | (concat "*threads of " (gdb-get-target-string) "*")) | 2667 | (concat "*threads of " (gdb-get-target-string) "*")) |
| 2686 | 2668 | ||
| 2687 | (def-gdb-display-buffer | 2669 | (defun gdb-display-threads-buffer (&optional thread) |
| 2688 | gdb-display-threads-buffer | 2670 | "Display GDB threads." |
| 2689 | 'gdb-threads-buffer | 2671 | (interactive) |
| 2690 | "Display GDB threads.") | 2672 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-threads-buffer thread))) |
| 2691 | 2673 | ||
| 2692 | (def-gdb-frame-for-buffer | 2674 | (defun gdb-frame-threads-buffer (&optional thread) |
| 2693 | gdb-frame-threads-buffer | 2675 | "Display GDB threads in another frame." |
| 2694 | 'gdb-threads-buffer | 2676 | (interactive) |
| 2695 | "Display GDB threads in a new frame.") | 2677 | (display-buffer (gdb-get-buffer-create 'gdb-threads-buffer thread) |
| 2678 | gdb-display-buffer-other-frame-action)) | ||
| 2696 | 2679 | ||
| 2697 | (def-gdb-trigger-and-handler | 2680 | (def-gdb-trigger-and-handler |
| 2698 | gdb-invalidate-threads (gdb-current-context-command "-thread-info") | 2681 | gdb-invalidate-threads (gdb-current-context-command "-thread-info") |
| @@ -2868,26 +2851,22 @@ on the current line." | |||
| 2868 | (def-gdb-thread-buffer-simple-command | 2851 | (def-gdb-thread-buffer-simple-command |
| 2869 | gdb-frame-stack-for-thread | 2852 | gdb-frame-stack-for-thread |
| 2870 | gdb-frame-stack-buffer | 2853 | gdb-frame-stack-buffer |
| 2871 | "Display a new frame with stack buffer for the thread at | 2854 | "Display another frame with stack buffer for thread at current line.") |
| 2872 | current line.") | ||
| 2873 | 2855 | ||
| 2874 | (def-gdb-thread-buffer-simple-command | 2856 | (def-gdb-thread-buffer-simple-command |
| 2875 | gdb-frame-locals-for-thread | 2857 | gdb-frame-locals-for-thread |
| 2876 | gdb-frame-locals-buffer | 2858 | gdb-frame-locals-buffer |
| 2877 | "Display a new frame with locals buffer for the thread at | 2859 | "Display another frame with locals buffer for thread at current line.") |
| 2878 | current line.") | ||
| 2879 | 2860 | ||
| 2880 | (def-gdb-thread-buffer-simple-command | 2861 | (def-gdb-thread-buffer-simple-command |
| 2881 | gdb-frame-registers-for-thread | 2862 | gdb-frame-registers-for-thread |
| 2882 | gdb-frame-registers-buffer | 2863 | gdb-frame-registers-buffer |
| 2883 | "Display a new frame with registers buffer for the thread at | 2864 | "Display another frame with registers buffer for the thread at current line.") |
| 2884 | current line.") | ||
| 2885 | 2865 | ||
| 2886 | (def-gdb-thread-buffer-simple-command | 2866 | (def-gdb-thread-buffer-simple-command |
| 2887 | gdb-frame-disassembly-for-thread | 2867 | gdb-frame-disassembly-for-thread |
| 2888 | gdb-frame-disassembly-buffer | 2868 | gdb-frame-disassembly-buffer |
| 2889 | "Display a new frame with disassembly buffer for the thread at | 2869 | "Display another frame with disassembly buffer for the thread at current line.") |
| 2890 | current line.") | ||
| 2891 | 2870 | ||
| 2892 | (defmacro def-gdb-thread-buffer-gud-command (name gud-command &optional doc) | 2871 | (defmacro def-gdb-thread-buffer-gud-command (name gud-command &optional doc) |
| 2893 | "Define a NAME which will execute GUD-COMMAND with | 2872 | "Define a NAME which will execute GUD-COMMAND with |
| @@ -3290,21 +3269,16 @@ DOC is an optional documentation string." | |||
| 3290 | (defun gdb-memory-buffer-name () | 3269 | (defun gdb-memory-buffer-name () |
| 3291 | (concat "*memory of " (gdb-get-target-string) "*")) | 3270 | (concat "*memory of " (gdb-get-target-string) "*")) |
| 3292 | 3271 | ||
| 3293 | (def-gdb-display-buffer | 3272 | (defun gdb-display-memory-buffer (&optional thread) |
| 3294 | gdb-display-memory-buffer | 3273 | "Display GDB memory contents." |
| 3295 | 'gdb-memory-buffer | 3274 | (interactive) |
| 3296 | "Display memory contents.") | 3275 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-memory-buffer thread))) |
| 3297 | 3276 | ||
| 3298 | (defun gdb-frame-memory-buffer () | 3277 | (defun gdb-frame-memory-buffer () |
| 3299 | "Display memory contents in a new frame." | 3278 | "Display memory contents in another frame." |
| 3300 | (interactive) | 3279 | (interactive) |
| 3301 | (let* ((special-display-regexps (append special-display-regexps '(".*"))) | 3280 | (display-buffer (gdb-get-buffer-create 'gdb-memory-buffer) |
| 3302 | (special-display-frame-alist | 3281 | gdb-display-buffer-other-frame-action)) |
| 3303 | `((left-fringe . 0) | ||
| 3304 | (right-fringe . 0) | ||
| 3305 | (width . 83) | ||
| 3306 | ,@gdb-frame-parameters))) | ||
| 3307 | (display-buffer (gdb-get-buffer-create 'gdb-memory-buffer)))) | ||
| 3308 | 3282 | ||
| 3309 | 3283 | ||
| 3310 | ;;; Disassembly view | 3284 | ;;; Disassembly view |
| @@ -3313,19 +3287,20 @@ DOC is an optional documentation string." | |||
| 3313 | (gdb-current-context-buffer-name | 3287 | (gdb-current-context-buffer-name |
| 3314 | (concat "disassembly of " (gdb-get-target-string)))) | 3288 | (concat "disassembly of " (gdb-get-target-string)))) |
| 3315 | 3289 | ||
| 3316 | (def-gdb-display-buffer | 3290 | (defun gdb-display-disassembly-buffer (&optional thread) |
| 3317 | gdb-display-disassembly-buffer | 3291 | "Display GDB disassembly information." |
| 3318 | 'gdb-disassembly-buffer | 3292 | (interactive) |
| 3319 | "Display disassembly for current stack frame.") | 3293 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-disassembly-buffer thread))) |
| 3320 | 3294 | ||
| 3321 | (def-gdb-preempt-display-buffer | 3295 | (def-gdb-preempt-display-buffer |
| 3322 | gdb-preemptively-display-disassembly-buffer | 3296 | gdb-preemptively-display-disassembly-buffer |
| 3323 | 'gdb-disassembly-buffer) | 3297 | 'gdb-disassembly-buffer) |
| 3324 | 3298 | ||
| 3325 | (def-gdb-frame-for-buffer | 3299 | (defun gdb-frame-disassembly-buffer (&optional thread) |
| 3326 | gdb-frame-disassembly-buffer | 3300 | "Display GDB disassembly information in another frame." |
| 3327 | 'gdb-disassembly-buffer | 3301 | (interactive) |
| 3328 | "Display disassembly in a new frame.") | 3302 | (display-buffer (gdb-get-buffer-create 'gdb-disassembly-buffer thread) |
| 3303 | gdb-display-buffer-other-frame-action)) | ||
| 3329 | 3304 | ||
| 3330 | (def-gdb-auto-update-trigger gdb-invalidate-disassembly | 3305 | (def-gdb-auto-update-trigger gdb-invalidate-disassembly |
| 3331 | (let* ((frame (gdb-current-buffer-frame)) | 3306 | (let* ((frame (gdb-current-buffer-frame)) |
| @@ -3560,19 +3535,20 @@ member." | |||
| 3560 | (gdb-current-context-buffer-name | 3535 | (gdb-current-context-buffer-name |
| 3561 | (concat "stack frames of " (gdb-get-target-string)))) | 3536 | (concat "stack frames of " (gdb-get-target-string)))) |
| 3562 | 3537 | ||
| 3563 | (def-gdb-display-buffer | 3538 | (defun gdb-display-stack-buffer (&optional thread) |
| 3564 | gdb-display-stack-buffer | 3539 | "Display GDB backtrace for current stack." |
| 3565 | 'gdb-stack-buffer | 3540 | (interactive) |
| 3566 | "Display backtrace of current stack.") | 3541 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-stack-buffer thread))) |
| 3567 | 3542 | ||
| 3568 | (def-gdb-preempt-display-buffer | 3543 | (def-gdb-preempt-display-buffer |
| 3569 | gdb-preemptively-display-stack-buffer | 3544 | gdb-preemptively-display-stack-buffer |
| 3570 | 'gdb-stack-buffer nil t) | 3545 | 'gdb-stack-buffer nil t) |
| 3571 | 3546 | ||
| 3572 | (def-gdb-frame-for-buffer | 3547 | (defun gdb-frame-stack-buffer (&optional thread) |
| 3573 | gdb-frame-stack-buffer | 3548 | "Display GDB backtrace for current stack in another frame." |
| 3574 | 'gdb-stack-buffer | 3549 | (interactive) |
| 3575 | "Display backtrace of current stack in a new frame.") | 3550 | (display-buffer (gdb-get-buffer-create 'gdb-stack-buffer thread) |
| 3551 | gdb-display-buffer-other-frame-action)) | ||
| 3576 | 3552 | ||
| 3577 | (defvar gdb-frames-mode-map | 3553 | (defvar gdb-frames-mode-map |
| 3578 | (let ((map (make-sparse-keymap))) | 3554 | (let ((map (make-sparse-keymap))) |
| @@ -3719,19 +3695,20 @@ member." | |||
| 3719 | (gdb-current-context-buffer-name | 3695 | (gdb-current-context-buffer-name |
| 3720 | (concat "locals of " (gdb-get-target-string)))) | 3696 | (concat "locals of " (gdb-get-target-string)))) |
| 3721 | 3697 | ||
| 3722 | (def-gdb-display-buffer | 3698 | (defun gdb-display-locals-buffer (&optional thread) |
| 3723 | gdb-display-locals-buffer | 3699 | "Display the local variables of current GDB stack." |
| 3724 | 'gdb-locals-buffer | 3700 | (interactive) |
| 3725 | "Display local variables of current stack and their values.") | 3701 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-locals-buffer thread))) |
| 3726 | 3702 | ||
| 3727 | (def-gdb-preempt-display-buffer | 3703 | (def-gdb-preempt-display-buffer |
| 3728 | gdb-preemptively-display-locals-buffer | 3704 | gdb-preemptively-display-locals-buffer |
| 3729 | 'gdb-locals-buffer nil t) | 3705 | 'gdb-locals-buffer nil t) |
| 3730 | 3706 | ||
| 3731 | (def-gdb-frame-for-buffer | 3707 | (defun gdb-frame-locals-buffer (&optional thread) |
| 3732 | gdb-frame-locals-buffer | 3708 | "Display the local variables of the current GDB stack in another frame." |
| 3733 | 'gdb-locals-buffer | 3709 | (interactive) |
| 3734 | "Display local variables of current stack and their values in a new frame.") | 3710 | (display-buffer (gdb-get-buffer-create 'gdb-locals-buffer thread) |
| 3711 | gdb-display-buffer-other-frame-action)) | ||
| 3735 | 3712 | ||
| 3736 | 3713 | ||
| 3737 | ;; Registers buffer. | 3714 | ;; Registers buffer. |
| @@ -3818,19 +3795,20 @@ member." | |||
| 3818 | (gdb-current-context-buffer-name | 3795 | (gdb-current-context-buffer-name |
| 3819 | (concat "registers of " (gdb-get-target-string)))) | 3796 | (concat "registers of " (gdb-get-target-string)))) |
| 3820 | 3797 | ||
| 3821 | (def-gdb-display-buffer | 3798 | (defun gdb-display-registers-buffer (&optional thread) |
| 3822 | gdb-display-registers-buffer | 3799 | "Display GDB register contents." |
| 3823 | 'gdb-registers-buffer | 3800 | (interactive) |
| 3824 | "Display integer register contents.") | 3801 | (gdb-display-buffer (gdb-get-buffer-create 'gdb-registers-buffer thread))) |
| 3825 | 3802 | ||
| 3826 | (def-gdb-preempt-display-buffer | 3803 | (def-gdb-preempt-display-buffer |
| 3827 | gdb-preemptively-display-registers-buffer | 3804 | gdb-preemptively-display-registers-buffer |
| 3828 | 'gdb-registers-buffer nil t) | 3805 | 'gdb-registers-buffer nil t) |
| 3829 | 3806 | ||
| 3830 | (def-gdb-frame-for-buffer | 3807 | (defun gdb-frame-registers-buffer (&optional thread) |
| 3831 | gdb-frame-registers-buffer | 3808 | "Display GDB register contents in another frame." |
| 3832 | 'gdb-registers-buffer | 3809 | (interactive) |
| 3833 | "Display integer register contents in a new frame.") | 3810 | (display-buffer (gdb-get-buffer-create 'gdb-registers-buffer thread) |
| 3811 | gdb-display-buffer-other-frame-action)) | ||
| 3834 | 3812 | ||
| 3835 | ;; Needs GDB 6.4 onwards (used to fail with no stack). | 3813 | ;; Needs GDB 6.4 onwards (used to fail with no stack). |
| 3836 | (defun gdb-get-changed-registers () | 3814 | (defun gdb-get-changed-registers () |
| @@ -3917,26 +3895,26 @@ overlay arrow in source buffer." | |||
| 3917 | (setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name))) | 3895 | (setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name))) |
| 3918 | 3896 | ||
| 3919 | ;;;; Window management | 3897 | ;;;; Window management |
| 3920 | (defun gdb-display-buffer (buf dedicated &optional frame) | 3898 | (defun gdb-display-buffer (buf) |
| 3921 | "Show buffer BUF. | 3899 | "Show buffer BUF, and make that window dedicated." |
| 3922 | 3900 | (let ((window (display-buffer buf))) | |
| 3923 | If BUF is already displayed in some window, show it, deiconifying | 3901 | (set-window-dedicated-p window t) |
| 3924 | the frame if necessary. Otherwise, find least recently used | 3902 | window)) |
| 3925 | window and show BUF there, if the window is not used for GDB | 3903 | |
| 3926 | already, in which case that window is split first." | 3904 | ;; (let ((answer (get-buffer-window buf 0))) |
| 3927 | (let ((answer (get-buffer-window buf (or frame 0)))) | 3905 | ;; (if answer |
| 3928 | (if answer | 3906 | ;; (display-buffer buf nil 0) ;Deiconify frame if necessary. |
| 3929 | (display-buffer buf nil (or frame 0)) ;Deiconify frame if necessary. | 3907 | ;; (let ((window (get-lru-window))) |
| 3930 | (let ((window (get-lru-window))) | 3908 | ;; (if (eq (buffer-local-value 'gud-minor-mode (window-buffer window)) |
| 3931 | (if (eq (buffer-local-value 'gud-minor-mode (window-buffer window)) | 3909 | ;; 'gdbmi) |
| 3932 | 'gdbmi) | 3910 | ;; (let ((largest (get-largest-window))) |
| 3933 | (let ((largest (get-largest-window))) | 3911 | ;; (setq answer (split-window largest)) |
| 3934 | (setq answer (split-window largest)) | 3912 | ;; (set-window-buffer answer buf) |
| 3935 | (set-window-buffer answer buf) | 3913 | ;; (set-window-dedicated-p answer t) |
| 3936 | (set-window-dedicated-p answer dedicated) | 3914 | ;; answer) |
| 3937 | answer) | 3915 | ;; (set-window-buffer window buf) |
| 3938 | (set-window-buffer window buf) | 3916 | ;; window))))) |
| 3939 | window))))) | 3917 | |
| 3940 | 3918 | ||
| 3941 | (defun gdb-preempt-existing-or-display-buffer (buf &optional split-horizontal) | 3919 | (defun gdb-preempt-existing-or-display-buffer (buf &optional split-horizontal) |
| 3942 | "Find window displaying a buffer with the same | 3920 | "Find window displaying a buffer with the same |
| @@ -3963,7 +3941,7 @@ SPLIT-HORIZONTAL and show BUF in the new window." | |||
| 3963 | (if dedicated-window | 3941 | (if dedicated-window |
| 3964 | (set-window-buffer | 3942 | (set-window-buffer |
| 3965 | (split-window dedicated-window nil split-horizontal) buf) | 3943 | (split-window dedicated-window nil split-horizontal) buf) |
| 3966 | (gdb-display-buffer buf t)))))) | 3944 | (gdb-display-buffer buf)))))) |
| 3967 | (error "Null buffer"))) | 3945 | (error "Null buffer"))) |
| 3968 | 3946 | ||
| 3969 | ;;; Shared keymap initialization: | 3947 | ;;; Shared keymap initialization: |
| @@ -4067,7 +4045,7 @@ SPLIT-HORIZONTAL and show BUF in the new window." | |||
| 4067 | 'all-threads) | 4045 | 'all-threads) |
| 4068 | 4046 | ||
| 4069 | (defun gdb-frame-gdb-buffer () | 4047 | (defun gdb-frame-gdb-buffer () |
| 4070 | "Display GUD buffer in a new frame." | 4048 | "Display GUD buffer in another frame." |
| 4071 | (interactive) | 4049 | (interactive) |
| 4072 | (display-buffer-other-frame gud-comint-buffer)) | 4050 | (display-buffer-other-frame gud-comint-buffer)) |
| 4073 | 4051 | ||
| @@ -4089,13 +4067,12 @@ window is dedicated." | |||
| 4089 | 4067 | ||
| 4090 | (defun gdb-setup-windows () | 4068 | (defun gdb-setup-windows () |
| 4091 | "Layout the window pattern for `gdb-many-windows'." | 4069 | "Layout the window pattern for `gdb-many-windows'." |
| 4092 | (gdb-display-locals-buffer) | 4070 | (gdb-get-buffer-create 'gdb-locals-buffer) |
| 4093 | (gdb-display-stack-buffer) | 4071 | (gdb-get-buffer-create 'gdb-stack-buffer) |
| 4094 | (delete-other-windows) | 4072 | (gdb-get-buffer-create 'gdb-breakpoints-buffer) |
| 4095 | (gdb-display-breakpoints-buffer) | 4073 | (set-window-dedicated-p (selected-window) nil) |
| 4096 | (delete-other-windows) | ||
| 4097 | ;; Don't dedicate. | ||
| 4098 | (switch-to-buffer gud-comint-buffer) | 4074 | (switch-to-buffer gud-comint-buffer) |
| 4075 | (delete-other-windows) | ||
| 4099 | (let ((win0 (selected-window)) | 4076 | (let ((win0 (selected-window)) |
| 4100 | (win1 (split-window nil ( / ( * (window-height) 3) 4))) | 4077 | (win1 (split-window nil ( / ( * (window-height) 3) 4))) |
| 4101 | (win2 (split-window nil ( / (window-height) 3))) | 4078 | (win2 (split-window nil ( / (window-height) 3))) |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 5946e93f34d..2e3858b2cc5 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -2685,7 +2685,6 @@ Obeying it means displaying in another window the specified file and line." | |||
| 2685 | (declare-function global-hl-line-highlight "hl-line" ()) | 2685 | (declare-function global-hl-line-highlight "hl-line" ()) |
| 2686 | (declare-function hl-line-highlight "hl-line" ()) | 2686 | (declare-function hl-line-highlight "hl-line" ()) |
| 2687 | (declare-function gdb-display-source-buffer "gdb-mi" (buffer)) | 2687 | (declare-function gdb-display-source-buffer "gdb-mi" (buffer)) |
| 2688 | (declare-function gdb-display-buffer "gdb-mi" (buf dedicated &optional size)) | ||
| 2689 | 2688 | ||
| 2690 | ;; Make sure the file named TRUE-FILE is in a buffer that appears on the screen | 2689 | ;; Make sure the file named TRUE-FILE is in a buffer that appears on the screen |
| 2691 | ;; and that its line LINE is visible. | 2690 | ;; and that its line LINE is visible. |
| @@ -2702,10 +2701,7 @@ Obeying it means displaying in another window the specified file and line." | |||
| 2702 | (window (and buffer | 2701 | (window (and buffer |
| 2703 | (or (get-buffer-window buffer) | 2702 | (or (get-buffer-window buffer) |
| 2704 | (if (eq gud-minor-mode 'gdbmi) | 2703 | (if (eq gud-minor-mode 'gdbmi) |
| 2705 | (or (if (get-buffer-window buffer 'visible) | 2704 | (display-buffer buffer nil 'visible)) |
| 2706 | (display-buffer buffer nil 'visible)) | ||
| 2707 | (unless (gdb-display-source-buffer buffer) | ||
| 2708 | (gdb-display-buffer buffer nil 'visible)))) | ||
| 2709 | (display-buffer buffer)))) | 2705 | (display-buffer buffer)))) |
| 2710 | (pos)) | 2706 | (pos)) |
| 2711 | (if buffer | 2707 | (if buffer |
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 2a672623c01..c1c4b750267 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el | |||
| @@ -1178,7 +1178,11 @@ is non-nil." | |||
| 1178 | (parse-time-string (concat time " +0000"))))) | 1178 | (parse-time-string (concat time " +0000"))))) |
| 1179 | (cond ((and (not (string-match "\\+" time)) | 1179 | (cond ((and (not (string-match "\\+" time)) |
| 1180 | (car parsed-time) | 1180 | (car parsed-time) |
| 1181 | (equal mtime (apply 'encode-time parsed-time))) | 1181 | ;; Compare just the seconds part of the file time, |
| 1182 | ;; since CVS file time stamp resolution is just 1 second. | ||
| 1183 | (let ((ptime (apply 'encode-time parsed-time))) | ||
| 1184 | (and (eq (car mtime) (car ptime)) | ||
| 1185 | (eq (cadr mtime) (cadr ptime))))) | ||
| 1182 | (vc-file-setprop file 'vc-checkout-time mtime) | 1186 | (vc-file-setprop file 'vc-checkout-time mtime) |
| 1183 | (if set-state (vc-file-setprop file 'vc-state 'up-to-date))) | 1187 | (if set-state (vc-file-setprop file 'vc-state 'up-to-date))) |
| 1184 | (t | 1188 | (t |
diff --git a/lisp/window.el b/lisp/window.el index ab90d8a4bde..3599ff5527f 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -357,6 +357,45 @@ WINDOW must be an internal window. Return WINDOW." | |||
| 357 | window t) | 357 | window t) |
| 358 | window)) | 358 | window)) |
| 359 | 359 | ||
| 360 | (defun display-buffer-in-atom-window (buffer alist) | ||
| 361 | "Display BUFFER in an atomic window. | ||
| 362 | This function displays BUFFER in a new window that will be | ||
| 363 | combined with an existing window to form an atomic window. If | ||
| 364 | the existing window is already part of an atomic window, add the | ||
| 365 | new window to that atomic window. Operations like `split-window' | ||
| 366 | or `delete-window', when applied to a constituent of an atomic | ||
| 367 | window, are applied atomically to the root of that atomic window. | ||
| 368 | |||
| 369 | ALIST is an association list of symbols and values. The | ||
| 370 | following symbols can be used. | ||
| 371 | |||
| 372 | `window' specifies the existing window the new window shall be | ||
| 373 | combined with. Use `window-atom-root' to make the new window a | ||
| 374 | sibling of an atomic window's root. If an internal window is | ||
| 375 | specified here, all children of that window become part of the | ||
| 376 | atomic window too. If no window is specified, the new window | ||
| 377 | becomes a sibling of the selected window. | ||
| 378 | |||
| 379 | `side' denotes the side of the existing window where the new | ||
| 380 | window shall be located. Valid values are `below', `right', | ||
| 381 | `above' and `left'. The default is `below'. | ||
| 382 | |||
| 383 | The return value is the new window, nil when creating that window | ||
| 384 | failed." | ||
| 385 | (let ((ignore-window-parameters t) | ||
| 386 | (window-combination-limit t) | ||
| 387 | (window (cdr (assq 'window alist))) | ||
| 388 | (side (cdr (assq 'side alist))) | ||
| 389 | new) | ||
| 390 | (setq window (window-normalize-window window)) | ||
| 391 | ;; Split off new window | ||
| 392 | (when (setq new (split-window window nil side)) | ||
| 393 | ;; Make sure we have a valid atomic window. | ||
| 394 | (window-make-atom (window-parent window)) | ||
| 395 | ;; Display BUFFER in NEW and return NEW. | ||
| 396 | (window--display-buffer | ||
| 397 | buffer new 'window display-buffer-mark-dedicated)))) | ||
| 398 | |||
| 360 | (defun window--atom-check-1 (window) | 399 | (defun window--atom-check-1 (window) |
| 361 | "Subroutine of `window--atom-check'." | 400 | "Subroutine of `window--atom-check'." |
| 362 | (when window | 401 | (when window |
| @@ -446,23 +485,273 @@ number of slots on that side." | |||
| 446 | (integer :tag "Number" :value 3 :size 5))) | 485 | (integer :tag "Number" :value 3 :size 5))) |
| 447 | :group 'windows) | 486 | :group 'windows) |
| 448 | 487 | ||
| 488 | (defun window--major-non-side-window (&optional frame) | ||
| 489 | "Return the major non-side window of frame FRAME. | ||
| 490 | The optional argument FRAME must be a live frame and defaults to | ||
| 491 | the selected one. | ||
| 492 | |||
| 493 | If FRAME has at least one side window, the major non-side window | ||
| 494 | is either an internal non-side window such that all other | ||
| 495 | non-side windows on FRAME descend from it, or the single live | ||
| 496 | non-side window of FRAME. If FRAME has no side windows, return | ||
| 497 | its root window." | ||
| 498 | (let ((frame (window-normalize-frame frame)) | ||
| 499 | major sibling) | ||
| 500 | ;; Set major to the _last_ window found by `walk-window-tree' that | ||
| 501 | ;; is not a side window but has a side window as its sibling. | ||
| 502 | (walk-window-tree | ||
| 503 | (lambda (window) | ||
| 504 | (and (not (window-parameter window 'window-side)) | ||
| 505 | (or (and (setq sibling (window-prev-sibling window)) | ||
| 506 | (window-parameter sibling 'window-side)) | ||
| 507 | (and (setq sibling (window-next-sibling window)) | ||
| 508 | (window-parameter sibling 'window-side))) | ||
| 509 | (setq major window))) | ||
| 510 | frame t) | ||
| 511 | (or major (frame-root-window frame)))) | ||
| 512 | |||
| 513 | (defun window--major-side-window (side) | ||
| 514 | "Return major side window on SIDE. | ||
| 515 | SIDE must be one of the symbols `left', `top', `right' or | ||
| 516 | `bottom'. Return nil if no such window exists." | ||
| 517 | (let ((root (frame-root-window)) | ||
| 518 | window) | ||
| 519 | ;; (1) If a window on the opposite side exists, return that window's | ||
| 520 | ;; sibling. | ||
| 521 | ;; (2) If the new window shall span the entire side, return the | ||
| 522 | ;; frame's root window. | ||
| 523 | ;; (3) If a window on an orthogonal side exists, return that | ||
| 524 | ;; window's sibling. | ||
| 525 | ;; (4) Otherwise return the frame's root window. | ||
| 526 | (cond | ||
| 527 | ((or (and (eq side 'left) | ||
| 528 | (setq window (window-with-parameter 'window-side 'right nil t))) | ||
| 529 | (and (eq side 'top) | ||
| 530 | (setq window (window-with-parameter 'window-side 'bottom nil t)))) | ||
| 531 | (window-prev-sibling window)) | ||
| 532 | ((or (and (eq side 'right) | ||
| 533 | (setq window (window-with-parameter 'window-side 'left nil t))) | ||
| 534 | (and (eq side 'bottom) | ||
| 535 | (setq window (window-with-parameter 'window-side 'top nil t)))) | ||
| 536 | (window-next-sibling window)) | ||
| 537 | ((memq side '(left right)) | ||
| 538 | (cond | ||
| 539 | (window-sides-vertical | ||
| 540 | root) | ||
| 541 | ((setq window (window-with-parameter 'window-side 'top nil t)) | ||
| 542 | (window-next-sibling window)) | ||
| 543 | ((setq window (window-with-parameter 'window-side 'bottom nil t)) | ||
| 544 | (window-prev-sibling window)) | ||
| 545 | (t root))) | ||
| 546 | ((memq side '(top bottom)) | ||
| 547 | (cond | ||
| 548 | ((not window-sides-vertical) | ||
| 549 | root) | ||
| 550 | ((setq window (window-with-parameter 'window-side 'left nil t)) | ||
| 551 | (window-next-sibling window)) | ||
| 552 | ((setq window (window-with-parameter 'window-side 'right nil t)) | ||
| 553 | (window-prev-sibling window)) | ||
| 554 | (t root)))))) | ||
| 555 | |||
| 556 | (defun display-buffer-in-major-side-window (buffer side slot &optional alist) | ||
| 557 | "Display BUFFER in a new window on SIDE of the selected frame. | ||
| 558 | SIDE must be one of `left', `top', `right' or `bottom'. SLOT | ||
| 559 | specifies the slot to use. ALIST is an association list of | ||
| 560 | symbols and values as passed to `display-buffer-in-side-window'. | ||
| 561 | This function may be called only if no window on SIDE exists yet. | ||
| 562 | The new window automatically becomes the \"major\" side window on | ||
| 563 | SIDE. Return the new window, nil if its creation window failed." | ||
| 564 | (let* ((root (frame-root-window)) | ||
| 565 | (left-or-right (memq side '(left right))) | ||
| 566 | (size (or (assq 'size alist) | ||
| 567 | (/ (window-total-size (frame-root-window) left-or-right) | ||
| 568 | ;; By default use a fourth of the size of the | ||
| 569 | ;; frame's root window. This has to be made | ||
| 570 | ;; customizable via ALIST. | ||
| 571 | 4))) | ||
| 572 | (major (window--major-side-window side)) | ||
| 573 | (selected-window (selected-window)) | ||
| 574 | (on-side (cond | ||
| 575 | ((eq side 'top) 'above) | ||
| 576 | ((eq side 'bottom) 'below) | ||
| 577 | (t side))) | ||
| 578 | ;; The following two bindings will tell `split-window' to take | ||
| 579 | ;; the space for the new window from `major' and not make a new | ||
| 580 | ;; parent window unless needed. | ||
| 581 | (window-combination-resize 'side) | ||
| 582 | (window-combination-limit nil) | ||
| 583 | (new (split-window major (- size) on-side)) | ||
| 584 | fun) | ||
| 585 | (when new | ||
| 586 | ;; Initialize `window-side' parameter of new window to SIDE. | ||
| 587 | (set-window-parameter new 'window-side side) | ||
| 588 | ;; Install `window-slot' parameter of new window. | ||
| 589 | (set-window-parameter new 'window-slot slot) | ||
| 590 | ;; Install `delete-window' parameter thus making sure that when | ||
| 591 | ;; the new window is deleted, a side window on the opposite side | ||
| 592 | ;; does not get resized. | ||
| 593 | (set-window-parameter new 'delete-window 'delete-side-window) | ||
| 594 | ;; Install BUFFER in new window and return NEW. | ||
| 595 | (window--display-buffer buffer new 'window 'side)))) | ||
| 596 | |||
| 597 | (defun delete-side-window (window) | ||
| 598 | "Delete side window WINDOW." | ||
| 599 | (let ((window-combination-resize | ||
| 600 | (window-parameter (window-parent window) 'window-side)) | ||
| 601 | (ignore-window-parameters t)) | ||
| 602 | (delete-window window))) | ||
| 603 | |||
| 604 | (defun display-buffer-in-side-window (buffer alist) | ||
| 605 | "Display BUFFER in a window on side SIDE of the selected frame. | ||
| 606 | ALIST is an association list of symbols and values. The | ||
| 607 | following symbols can be used: | ||
| 608 | |||
| 609 | `side' denotes the side of the existing window where the new | ||
| 610 | window shall be located. Valid values are `bottom', `right', | ||
| 611 | `top' and `left'. The default is `bottom'. | ||
| 612 | |||
| 613 | `slot' if non-nil, specifies the window slot where to display | ||
| 614 | BUFFER. A value of zero or nil means use the middle slot on | ||
| 615 | the specified side. A negative value means use a slot | ||
| 616 | preceding (that is, above or on the left of) the middle slot. | ||
| 617 | A positive value means use a slot following (that is, below or | ||
| 618 | on the right of) the middle slot. The default is zero." | ||
| 619 | (let ((side (or (cdr (assq 'side alist)) 'bottom)) | ||
| 620 | (slot (or (cdr (assq 'slot alist)) 0)) | ||
| 621 | new) | ||
| 622 | (cond | ||
| 623 | ((not (memq side '(top bottom left right))) | ||
| 624 | (error "Invalid side %s specified" side)) | ||
| 625 | ((not (numberp slot)) | ||
| 626 | (error "Invalid slot %s specified" slot))) | ||
| 627 | |||
| 628 | (let* ((major (window-with-parameter 'window-side side nil t)) | ||
| 629 | ;; `major' is the major window on SIDE, `windows' the list of | ||
| 630 | ;; life windows on SIDE. | ||
| 631 | (windows | ||
| 632 | (when major | ||
| 633 | (let (windows) | ||
| 634 | (walk-window-tree | ||
| 635 | (lambda (window) | ||
| 636 | (when (eq (window-parameter window 'window-side) side) | ||
| 637 | (setq windows (cons window windows))))) | ||
| 638 | (nreverse windows)))) | ||
| 639 | (slots (when major (max 1 (window-child-count major)))) | ||
| 640 | (max-slots | ||
| 641 | (nth (cond | ||
| 642 | ((eq side 'left) 0) | ||
| 643 | ((eq side 'top) 1) | ||
| 644 | ((eq side 'right) 2) | ||
| 645 | ((eq side 'bottom) 3)) | ||
| 646 | window-sides-slots)) | ||
| 647 | (selected-window (selected-window)) | ||
| 648 | window this-window this-slot prev-window next-window | ||
| 649 | best-window best-slot abs-slot new-window) | ||
| 650 | |||
| 651 | (cond | ||
| 652 | ((and (numberp max-slots) (<= max-slots 0)) | ||
| 653 | ;; No side-slots available on this side. Don't create an error, | ||
| 654 | ;; just return nil. | ||
| 655 | nil) | ||
| 656 | ((not windows) | ||
| 657 | ;; No major window exists on this side, make one. | ||
| 658 | (display-buffer-in-major-side-window buffer side slot alist)) | ||
| 659 | (t | ||
| 660 | ;; Scan windows on SIDE. | ||
| 661 | (catch 'found | ||
| 662 | (dolist (window windows) | ||
| 663 | (setq this-slot (window-parameter window 'window-slot)) | ||
| 664 | (cond | ||
| 665 | ;; The following should not happen and probably be checked | ||
| 666 | ;; by window--side-check. | ||
| 667 | ((not (numberp this-slot))) | ||
| 668 | ((= this-slot slot) | ||
| 669 | ;; A window with a matching slot has been found. | ||
| 670 | (setq this-window window) | ||
| 671 | (throw 'found t)) | ||
| 672 | (t | ||
| 673 | ;; Check if this window has a better slot value wrt the | ||
| 674 | ;; slot of the window we want. | ||
| 675 | (setq abs-slot | ||
| 676 | (if (or (and (> this-slot 0) (> slot 0)) | ||
| 677 | (and (< this-slot 0) (< slot 0))) | ||
| 678 | (abs (- slot this-slot)) | ||
| 679 | (+ (abs slot) (abs this-slot)))) | ||
| 680 | (unless (and best-slot (<= best-slot abs-slot)) | ||
| 681 | (setq best-window window) | ||
| 682 | (setq best-slot abs-slot)) | ||
| 683 | (cond | ||
| 684 | ((<= this-slot slot) | ||
| 685 | (setq prev-window window)) | ||
| 686 | ((not next-window) | ||
| 687 | (setq next-window window))))))) | ||
| 688 | |||
| 689 | ;; `this-window' is the first window with the same SLOT. | ||
| 690 | ;; `prev-window' is the window with the largest slot < SLOT. A new | ||
| 691 | ;; window will be created after it. | ||
| 692 | ;; `next-window' is the window with the smallest slot > SLOT. A new | ||
| 693 | ;; window will be created before it. | ||
| 694 | ;; `best-window' is the window with the smallest absolute difference | ||
| 695 | ;; of its slot and SLOT. | ||
| 696 | |||
| 697 | ;; Note: We dedicate the window used softly to its buffer to | ||
| 698 | ;; avoid that "other" (non-side) buffer display functions steal | ||
| 699 | ;; it from us. This must eventually become customizable via | ||
| 700 | ;; ALIST (or, better, avoided in the "other" functions). | ||
| 701 | (or (and this-window | ||
| 702 | ;; Reuse `this-window'. | ||
| 703 | (window--display-buffer buffer this-window 'reuse 'side)) | ||
| 704 | (and (or (not max-slots) (< slots max-slots)) | ||
| 705 | (or (and next-window | ||
| 706 | ;; Make new window before `next-window'. | ||
| 707 | (let ((next-side | ||
| 708 | (if (memq side '(left right)) 'above 'left)) | ||
| 709 | (window-combination-resize 'side)) | ||
| 710 | (setq window (split-window next-window nil next-side)) | ||
| 711 | ;; When the new window is deleted, its space | ||
| 712 | ;; is returned to other side windows. | ||
| 713 | (set-window-parameter | ||
| 714 | window 'delete-window 'delete-side-window) | ||
| 715 | window)) | ||
| 716 | (and prev-window | ||
| 717 | ;; Make new window after `prev-window'. | ||
| 718 | (let ((prev-side | ||
| 719 | (if (memq side '(left right)) 'below 'right)) | ||
| 720 | (window-combination-resize 'side)) | ||
| 721 | (setq window (split-window prev-window nil prev-side)) | ||
| 722 | ;; When the new window is deleted, its space | ||
| 723 | ;; is returned to other side windows. | ||
| 724 | (set-window-parameter | ||
| 725 | window 'delete-window 'delete-side-window) | ||
| 726 | window))) | ||
| 727 | (set-window-parameter window 'window-slot slot) | ||
| 728 | (window--display-buffer buffer window 'window 'side)) | ||
| 729 | (and best-window | ||
| 730 | ;; Reuse `best-window'. | ||
| 731 | (progn | ||
| 732 | ;; Give best-window the new slot value. | ||
| 733 | (set-window-parameter best-window 'window-slot slot) | ||
| 734 | (window--display-buffer buffer best-window 'reuse 'side))))))))) | ||
| 735 | |||
| 449 | (defun window--side-check (&optional frame) | 736 | (defun window--side-check (&optional frame) |
| 450 | "Check the window-side parameter of all windows on FRAME. | 737 | "Check the side window configuration of FRAME. |
| 451 | FRAME defaults to the selected frame. If the configuration is | 738 | FRAME defaults to the selected frame. |
| 452 | invalid, reset all window-side parameters to nil. | 739 | |
| 453 | 740 | A valid side window configuration preserves the following two | |
| 454 | A valid configuration has to preserve the following invariant: | 741 | invariants: |
| 455 | 742 | ||
| 456 | - If a window has a non-nil window-side parameter, it must have a | 743 | - If there exists a window whose window-side parameter is |
| 457 | parent window and the parent window's window-side parameter | 744 | non-nil, there must exist at least one live window whose |
| 458 | must be either nil or the same as for window. | 745 | window-side parameter is nil. |
| 459 | 746 | ||
| 460 | - If windows with non-nil window-side parameters exist, there | 747 | - If a window W has a non-nil window-side parameter (i) it must |
| 461 | must be at most one window of each side and non-side with a | 748 | have a parent window and that parent's window-side parameter |
| 462 | parent whose window-side parameter is nil and there must be no | 749 | must be either nil or the same as for W, and (ii) any child |
| 463 | leaf window whose window-side parameter is nil." | 750 | window of W must have the same window-side parameter as W. |
| 464 | (let (normal none left top right bottom | 751 | |
| 465 | side parent parent-side) | 752 | If the configuration is invalid, reset the window-side parameters |
| 753 | of all windows on FRAME to nil." | ||
| 754 | (let (left top right bottom none side parent parent-side) | ||
| 466 | (when (or (catch 'reset | 755 | (when (or (catch 'reset |
| 467 | (walk-window-tree | 756 | (walk-window-tree |
| 468 | (lambda (window) | 757 | (lambda (window) |
| @@ -478,40 +767,34 @@ A valid configuration has to preserve the following invariant: | |||
| 478 | ;; A parent whose window-side is non-nil must | 767 | ;; A parent whose window-side is non-nil must |
| 479 | ;; have a child with the same window-side. | 768 | ;; have a child with the same window-side. |
| 480 | (throw 'reset t))) | 769 | (throw 'reset t))) |
| 481 | ;; Now check that there's more than one main window | 770 | ((not side) |
| 482 | ;; for any of none, left, top, right and bottom. | 771 | (when (window-buffer window) |
| 483 | ((eq side 'none) | 772 | ;; Record that we have at least one non-side, |
| 484 | (if none | 773 | ;; live window. |
| 485 | (throw 'reset t) | ||
| 486 | (setq none t))) | 774 | (setq none t))) |
| 775 | ((if (memq side '(left top)) | ||
| 776 | (window-prev-sibling window) | ||
| 777 | (window-next-sibling window)) | ||
| 778 | ;; Left and top major side windows must not have a | ||
| 779 | ;; previous sibling, right and bottom major side | ||
| 780 | ;; windows must not have a next sibling. | ||
| 781 | (throw 'reset t)) | ||
| 782 | ;; Now check that there's no more than one major | ||
| 783 | ;; window for any of left, top, right and bottom. | ||
| 487 | ((eq side 'left) | 784 | ((eq side 'left) |
| 488 | (if left | 785 | (if left (throw 'reset t) (setq left t))) |
| 489 | (throw 'reset t) | ||
| 490 | (setq left t))) | ||
| 491 | ((eq side 'top) | 786 | ((eq side 'top) |
| 492 | (if top | 787 | (if top (throw 'reset t) (setq top t))) |
| 493 | (throw 'reset t) | ||
| 494 | (setq top t))) | ||
| 495 | ((eq side 'right) | 788 | ((eq side 'right) |
| 496 | (if right | 789 | (if right (throw 'reset t) (setq right t))) |
| 497 | (throw 'reset t) | ||
| 498 | (setq right t))) | ||
| 499 | ((eq side 'bottom) | 790 | ((eq side 'bottom) |
| 500 | (if bottom | 791 | (if bottom (throw 'reset t) (setq bottom t))) |
| 501 | (throw 'reset t) | 792 | (t |
| 502 | (setq bottom t))) | 793 | (throw 'reset t)))) |
| 503 | ((window-buffer window) | ||
| 504 | ;; A leaf window without window-side parameter, | ||
| 505 | ;; record its existence. | ||
| 506 | (setq normal t)))) | ||
| 507 | frame t)) | 794 | frame t)) |
| 508 | (if none | 795 | ;; If there's a side window, there must be at least one |
| 509 | ;; At least one non-side window exists, so there must | 796 | ;; non-side window. |
| 510 | ;; be at least one side-window and no normal window. | 797 | (and (or left top right bottom) (not none))) |
| 511 | (or (not (or left top right bottom)) normal) | ||
| 512 | ;; No non-side window exists, so there must be no side | ||
| 513 | ;; window either. | ||
| 514 | (or left top right bottom))) | ||
| 515 | (walk-window-tree | 798 | (walk-window-tree |
| 516 | (lambda (window) | 799 | (lambda (window) |
| 517 | (set-window-parameter window 'window-side nil)) | 800 | (set-window-parameter window 'window-side nil)) |
| @@ -2393,8 +2676,7 @@ Return `frame' if deleting WINDOW should also delete its frame." | |||
| 2393 | (when (window-parameter window 'window-atom) | 2676 | (when (window-parameter window 'window-atom) |
| 2394 | (setq window (window-atom-root window)))) | 2677 | (setq window (window-atom-root window)))) |
| 2395 | 2678 | ||
| 2396 | (let ((parent (window-parent window)) | 2679 | (let ((frame (window-frame window))) |
| 2397 | (frame (window-frame window))) | ||
| 2398 | (cond | 2680 | (cond |
| 2399 | ((frame-root-window-p window) | 2681 | ((frame-root-window-p window) |
| 2400 | ;; WINDOW's frame can be deleted only if there are other frames | 2682 | ;; WINDOW's frame can be deleted only if there are other frames |
| @@ -2405,10 +2687,9 @@ Return `frame' if deleting WINDOW should also delete its frame." | |||
| 2405 | (and minibuf (eq frame (window-frame minibuf))))) | 2687 | (and minibuf (eq frame (window-frame minibuf))))) |
| 2406 | 'frame)) | 2688 | 'frame)) |
| 2407 | ((or ignore-window-parameters | 2689 | ((or ignore-window-parameters |
| 2408 | (not (eq (window-parameter window 'window-side) 'none)) | 2690 | (not (eq window (window--major-non-side-window frame)))) |
| 2409 | (and parent (eq (window-parameter parent 'window-side) 'none))) | 2691 | ;; WINDOW can be deleted unless it is the major non-side window of |
| 2410 | ;; WINDOW can be deleted unless it is the main window of its | 2692 | ;; its frame. |
| 2411 | ;; frame. | ||
| 2412 | t)))) | 2693 | t)))) |
| 2413 | 2694 | ||
| 2414 | (defun window--in-subtree-p (window root) | 2695 | (defun window--in-subtree-p (window root) |
| @@ -2459,13 +2740,13 @@ that is its frame's root window." | |||
| 2459 | ((and (window-parameter window 'window-atom) | 2740 | ((and (window-parameter window 'window-atom) |
| 2460 | (setq atom-root (window-atom-root window)) | 2741 | (setq atom-root (window-atom-root window)) |
| 2461 | (not (eq atom-root window))) | 2742 | (not (eq atom-root window))) |
| 2462 | (throw 'done (delete-window atom-root))) | 2743 | (if (eq atom-root (frame-root-window frame)) |
| 2463 | ((and (eq (window-parameter window 'window-side) 'none) | 2744 | (error "Root of atomic window is root window of its frame") |
| 2464 | (or (not parent) | 2745 | (throw 'done (delete-window atom-root)))) |
| 2465 | (not (eq (window-parameter parent 'window-side) 'none)))) | ||
| 2466 | (error "Attempt to delete last non-side window")) | ||
| 2467 | ((not parent) | 2746 | ((not parent) |
| 2468 | (error "Attempt to delete minibuffer or sole ordinary window"))) | 2747 | (error "Attempt to delete minibuffer or sole ordinary window")) |
| 2748 | ((eq window (window--major-non-side-window frame)) | ||
| 2749 | (error "Attempt to delete last non-side window"))) | ||
| 2469 | 2750 | ||
| 2470 | (let* ((horizontal (window-left-child parent)) | 2751 | (let* ((horizontal (window-left-child parent)) |
| 2471 | (size (window-total-size window horizontal)) | 2752 | (size (window-total-size window horizontal)) |
| @@ -2539,13 +2820,19 @@ window signal an error." | |||
| 2539 | ((and (window-parameter window 'window-atom) | 2820 | ((and (window-parameter window 'window-atom) |
| 2540 | (setq atom-root (window-atom-root window)) | 2821 | (setq atom-root (window-atom-root window)) |
| 2541 | (not (eq atom-root window))) | 2822 | (not (eq atom-root window))) |
| 2542 | (throw 'done (delete-other-windows atom-root))) | 2823 | (if (eq atom-root (frame-root-window frame)) |
| 2543 | ((eq window-side 'none) | 2824 | (error "Root of atomic window is root window of its frame") |
| 2544 | ;; Set side-main to the major non-side window. | 2825 | (throw 'done (delete-other-windows atom-root)))) |
| 2545 | (setq side-main (window-with-parameter 'window-side 'none frame t))) | ||
| 2546 | ((memq window-side window-sides) | 2826 | ((memq window-side window-sides) |
| 2547 | (error "Cannot make side window the only window"))) | 2827 | (error "Cannot make side window the only window")) |
| 2548 | ;; If WINDOW is the main non-side window, do nothing. | 2828 | ((and (window-minibuffer-p window) |
| 2829 | (not (eq window (frame-root-window window)))) | ||
| 2830 | (error "Can't expand minibuffer to full frame"))) | ||
| 2831 | |||
| 2832 | ;; If WINDOW is the major non-side window, do nothing. | ||
| 2833 | (if (window-with-parameter 'window-side) | ||
| 2834 | (setq side-main (window--major-non-side-window frame)) | ||
| 2835 | (setq side-main (frame-root-window frame))) | ||
| 2549 | (unless (eq window side-main) | 2836 | (unless (eq window side-main) |
| 2550 | (delete-other-windows-internal window side-main) | 2837 | (delete-other-windows-internal window side-main) |
| 2551 | (run-window-configuration-change-hook frame) | 2838 | (run-window-configuration-change-hook frame) |
| @@ -3204,14 +3491,16 @@ frame. The selected window is not changed by this function." | |||
| 3204 | ((not side) 'below) | 3491 | ((not side) 'below) |
| 3205 | ((memq side '(below above right left)) side) | 3492 | ((memq side '(below above right left)) side) |
| 3206 | (t 'right))) | 3493 | (t 'right))) |
| 3207 | (horizontal (not (memq side '(nil below above)))) | 3494 | (horizontal (not (memq side '(below above)))) |
| 3208 | (frame (window-frame window)) | 3495 | (frame (window-frame window)) |
| 3209 | (parent (window-parent window)) | 3496 | (parent (window-parent window)) |
| 3210 | (function (window-parameter window 'split-window)) | 3497 | (function (window-parameter window 'split-window)) |
| 3211 | (window-side (window-parameter window 'window-side)) | 3498 | (window-side (window-parameter window 'window-side)) |
| 3212 | ;; Rebind `window-combination-limit' since in some cases we may | 3499 | ;; Rebind `window-combination-limit' and |
| 3213 | ;; have to override its value. | 3500 | ;; `window-combination-resize' since in some cases we may have |
| 3501 | ;; to override their value. | ||
| 3214 | (window-combination-limit window-combination-limit) | 3502 | (window-combination-limit window-combination-limit) |
| 3503 | (window-combination-resize window-combination-resize) | ||
| 3215 | atom-root) | 3504 | atom-root) |
| 3216 | 3505 | ||
| 3217 | (window--check frame) | 3506 | (window--check frame) |
| @@ -3229,20 +3518,32 @@ frame. The selected window is not changed by this function." | |||
| 3229 | ((and (window-parameter window 'window-atom) | 3518 | ((and (window-parameter window 'window-atom) |
| 3230 | (setq atom-root (window-atom-root window)) | 3519 | (setq atom-root (window-atom-root window)) |
| 3231 | (not (eq atom-root window))) | 3520 | (not (eq atom-root window))) |
| 3232 | (throw 'done (split-window atom-root size side)))) | 3521 | (throw 'done (split-window atom-root size side))) |
| 3233 | 3522 | ;; If WINDOW is a side window or its first or last child is a | |
| 3234 | (when (and window-side | 3523 | ;; side window, throw an error unless `window-combination-resize' |
| 3235 | (or (not parent) | 3524 | ;; equals 'side. |
| 3236 | (not (window-parameter parent 'window-side)))) | 3525 | ((and (not (eq window-combination-resize 'side)) |
| 3237 | ;; WINDOW is a side root window. To make sure that a new parent | 3526 | (or (window-parameter window 'window-side) |
| 3238 | ;; window gets created set `window-combination-limit' to t. | 3527 | (and (window-child window) |
| 3239 | (setq window-combination-limit t)) | 3528 | (or (window-parameter |
| 3240 | 3529 | (window-child window) 'window-side) | |
| 3241 | (when (and window-combination-resize size (> size 0)) | 3530 | (window-parameter |
| 3242 | ;; If `window-combination-resize' is non-nil and SIZE is a | 3531 | (window-last-child window) 'window-side))))) |
| 3243 | ;; non-negative integer, we cannot reasonably resize other | 3532 | (error "Cannot split side window or parent of side window")) |
| 3244 | ;; windows. Rather bind `window-combination-limit' to t to make | 3533 | ;; If `window-combination-resize' is 'side and window has a side |
| 3245 | ;; sure that subsequent window deletions are handled correctly. | 3534 | ;; window sibling, bind `window-combination-limit' to t. |
| 3535 | ((and (not (eq window-combination-resize 'side)) | ||
| 3536 | (or (and (window-prev-sibling window) | ||
| 3537 | (window-parameter | ||
| 3538 | (window-prev-sibling window) 'window-side)) | ||
| 3539 | (and (window-next-sibling window) | ||
| 3540 | (window-parameter | ||
| 3541 | (window-next-sibling window) 'window-side)))) | ||
| 3542 | (setq window-combination-limit t))) | ||
| 3543 | |||
| 3544 | ;; If `window-combination-resize' is t and SIZE is non-negative, | ||
| 3545 | ;; bind `window-combination-limit' to t. | ||
| 3546 | (when (and (eq window-combination-resize t) size (> size 0)) | ||
| 3246 | (setq window-combination-limit t)) | 3547 | (setq window-combination-limit t)) |
| 3247 | 3548 | ||
| 3248 | (let* ((parent-size | 3549 | (let* ((parent-size |
| @@ -3252,7 +3553,10 @@ frame. The selected window is not changed by this function." | |||
| 3252 | ;; `resize' non-nil means we are supposed to resize other | 3553 | ;; `resize' non-nil means we are supposed to resize other |
| 3253 | ;; windows in WINDOW's combination. | 3554 | ;; windows in WINDOW's combination. |
| 3254 | (resize | 3555 | (resize |
| 3255 | (and window-combination-resize (not window-combination-limit) | 3556 | (and window-combination-resize |
| 3557 | (or (window-parameter window 'window-side) | ||
| 3558 | (not (eq window-combination-resize 'side))) | ||
| 3559 | (not window-combination-limit) | ||
| 3256 | ;; Resize makes sense in iso-combinations only. | 3560 | ;; Resize makes sense in iso-combinations only. |
| 3257 | (window-combined-p window horizontal))) | 3561 | (window-combined-p window horizontal))) |
| 3258 | ;; `old-size' is the current size of WINDOW. | 3562 | ;; `old-size' is the current size of WINDOW. |
| @@ -3363,10 +3667,21 @@ frame. The selected window is not changed by this function." | |||
| 3363 | new-normal))) | 3667 | new-normal))) |
| 3364 | 3668 | ||
| 3365 | (let* ((new (split-window-internal window new-size side new-normal))) | 3669 | (let* ((new (split-window-internal window new-size side new-normal))) |
| 3366 | ;; Inherit window-side parameters, if any. | 3670 | ;; Assign window-side parameters, if any. |
| 3367 | (when (and window-side new-parent) | 3671 | (when (eq window-combination-resize 'side) |
| 3368 | (set-window-parameter (window-parent new) 'window-side window-side) | 3672 | (let ((window-side |
| 3369 | (set-window-parameter new 'window-side window-side)) | 3673 | (cond |
| 3674 | (window-side window-side) | ||
| 3675 | ((eq side 'above) 'top) | ||
| 3676 | ((eq side 'below) 'bottom) | ||
| 3677 | (t side)))) | ||
| 3678 | ;; We made a new side window. | ||
| 3679 | (set-window-parameter new 'window-side window-side) | ||
| 3680 | (when (and new-parent (window-parameter window 'window-side)) | ||
| 3681 | ;; We've been splitting a side root window. Give the | ||
| 3682 | ;; new parent the same window-side parameter. | ||
| 3683 | (set-window-parameter | ||
| 3684 | (window-parent new) 'window-side window-side)))) | ||
| 3370 | 3685 | ||
| 3371 | (run-window-configuration-change-hook frame) | 3686 | (run-window-configuration-change-hook frame) |
| 3372 | (window--check frame) | 3687 | (window--check frame) |
| @@ -4054,12 +4369,11 @@ of the window used." | |||
| 4054 | (function :tag "function")) | 4369 | (function :tag "function")) |
| 4055 | :group 'windows) | 4370 | :group 'windows) |
| 4056 | 4371 | ||
| 4372 | ;; Eventually, we want to turn this into a defvar; instead of | ||
| 4373 | ;; customizing this, the user should use a `pop-up-frame-parameters' | ||
| 4374 | ;; alist entry in `display-buffer-base-action'. | ||
| 4057 | (defcustom pop-up-frame-alist nil | 4375 | (defcustom pop-up-frame-alist nil |
| 4058 | "Alist of parameters for automatically generated new frames. | 4376 | "Alist of parameters for automatically generated new frames. |
| 4059 | You can set this in your init file; for example, | ||
| 4060 | |||
| 4061 | (setq pop-up-frame-alist '((width . 80) (height . 20))) | ||
| 4062 | |||
| 4063 | If non-nil, the value you specify here is used by the default | 4377 | If non-nil, the value you specify here is used by the default |
| 4064 | `pop-up-frame-function' for the creation of new frames. | 4378 | `pop-up-frame-function' for the creation of new frames. |
| 4065 | 4379 | ||
| @@ -4146,8 +4460,7 @@ See also `special-display-regexps'." | |||
| 4146 | (repeat :tag "Arguments" (sexp))))) | 4460 | (repeat :tag "Arguments" (sexp))))) |
| 4147 | :group 'windows | 4461 | :group 'windows |
| 4148 | :group 'frames) | 4462 | :group 'frames) |
| 4149 | 4463 | (make-obsolete-variable 'special-display-buffer-names 'display-buffer-alist "24.3") | |
| 4150 | ;;;###autoload | ||
| 4151 | (put 'special-display-buffer-names 'risky-local-variable t) | 4464 | (put 'special-display-buffer-names 'risky-local-variable t) |
| 4152 | 4465 | ||
| 4153 | (defcustom special-display-regexps nil | 4466 | (defcustom special-display-regexps nil |
| @@ -4214,6 +4527,8 @@ See also `special-display-buffer-names'." | |||
| 4214 | (repeat :tag "Arguments" (sexp))))) | 4527 | (repeat :tag "Arguments" (sexp))))) |
| 4215 | :group 'windows | 4528 | :group 'windows |
| 4216 | :group 'frames) | 4529 | :group 'frames) |
| 4530 | (make-obsolete-variable 'special-display-regexps 'display-buffer-alist "24.3") | ||
| 4531 | (put 'special-display-regexps 'risky-local-variable t) | ||
| 4217 | 4532 | ||
| 4218 | (defun special-display-p (buffer-name) | 4533 | (defun special-display-p (buffer-name) |
| 4219 | "Return non-nil if a buffer named BUFFER-NAME gets a special frame. | 4534 | "Return non-nil if a buffer named BUFFER-NAME gets a special frame. |
| @@ -4255,6 +4570,7 @@ These supersede the values given in `default-frame-alist'." | |||
| 4255 | (symbol :tag "Parameter") | 4570 | (symbol :tag "Parameter") |
| 4256 | (sexp :tag "Value"))) | 4571 | (sexp :tag "Value"))) |
| 4257 | :group 'frames) | 4572 | :group 'frames) |
| 4573 | (make-obsolete-variable 'special-display-frame-alist 'display-buffer-alist "24.3") | ||
| 4258 | 4574 | ||
| 4259 | (defun special-display-popup-frame (buffer &optional args) | 4575 | (defun special-display-popup-frame (buffer &optional args) |
| 4260 | "Pop up a frame displaying BUFFER and return its window. | 4576 | "Pop up a frame displaying BUFFER and return its window. |
| @@ -4321,6 +4637,7 @@ with corresponding arguments to set up the quit-restore parameter | |||
| 4321 | of the window used." | 4637 | of the window used." |
| 4322 | :type 'function | 4638 | :type 'function |
| 4323 | :group 'frames) | 4639 | :group 'frames) |
| 4640 | (make-obsolete-variable 'special-display-function 'display-buffer-alist "24.3") | ||
| 4324 | 4641 | ||
| 4325 | (defcustom same-window-buffer-names nil | 4642 | (defcustom same-window-buffer-names nil |
| 4326 | "List of names of buffers that should appear in the \"same\" window. | 4643 | "List of names of buffers that should appear in the \"same\" window. |
| @@ -4393,6 +4710,7 @@ that frame." | |||
| 4393 | :type 'boolean | 4710 | :type 'boolean |
| 4394 | :version "21.1" | 4711 | :version "21.1" |
| 4395 | :group 'windows) | 4712 | :group 'windows) |
| 4713 | (make-obsolete-variable 'display-buffer-reuse-frames 'display-buffer-alist "24.3") | ||
| 4396 | 4714 | ||
| 4397 | (defcustom pop-up-windows t | 4715 | (defcustom pop-up-windows t |
| 4398 | "Non-nil means `display-buffer' should make a new window." | 4716 | "Non-nil means `display-buffer' should make a new window." |
| @@ -4596,23 +4914,19 @@ Do this only if these windows are vertically adjacent to each | |||
| 4596 | other, `even-window-heights' is non-nil, and the selected window | 4914 | other, `even-window-heights' is non-nil, and the selected window |
| 4597 | is higher than WINDOW." | 4915 | is higher than WINDOW." |
| 4598 | (when (and even-window-heights | 4916 | (when (and even-window-heights |
| 4599 | (not (eq window (selected-window))) | 4917 | ;; Even iff WINDOW forms a vertical combination with the |
| 4600 | ;; Don't resize minibuffer windows. | 4918 | ;; selected window, and WINDOW's height exceeds that of the |
| 4601 | (not (window-minibuffer-p (selected-window))) | 4919 | ;; selected window, see also bug#11880. |
| 4602 | (> (window-height (selected-window)) (window-height window)) | 4920 | (window-combined-p window) |
| 4603 | (eq (window-frame window) (window-frame (selected-window))) | 4921 | (= (window-child-count (window-parent window)) 2) |
| 4604 | (let ((sel-edges (window-edges (selected-window))) | 4922 | (eq (window-parent) (window-parent window)) |
| 4605 | (win-edges (window-edges window))) | 4923 | (> (window-total-height) (window-total-height window))) |
| 4606 | (and (= (nth 0 sel-edges) (nth 0 win-edges)) | 4924 | ;; Don't throw an error if we can't even window heights for |
| 4607 | (= (nth 2 sel-edges) (nth 2 win-edges)) | 4925 | ;; whatever reason. |
| 4608 | (or (= (nth 1 sel-edges) (nth 3 win-edges)) | 4926 | (condition-case nil |
| 4609 | (= (nth 3 sel-edges) (nth 1 win-edges)))))) | 4927 | (enlarge-window |
| 4610 | (let ((window-min-height 1)) | 4928 | (/ (- (window-total-height window) (window-total-height)) 2)) |
| 4611 | ;; Don't throw an error if we can't even window heights for | 4929 | (error nil)))) |
| 4612 | ;; whatever reason. | ||
| 4613 | (condition-case nil | ||
| 4614 | (enlarge-window (/ (- (window-height window) (window-height)) 2)) | ||
| 4615 | (error nil))))) | ||
| 4616 | 4930 | ||
| 4617 | (defun window--display-buffer (buffer window type &optional dedicated) | 4931 | (defun window--display-buffer (buffer window type &optional dedicated) |
| 4618 | "Display BUFFER in WINDOW and make its frame visible. | 4932 | "Display BUFFER in WINDOW and make its frame visible. |
| @@ -4621,9 +4935,9 @@ is passed unaltered to `display-buffer-record-window'. Set | |||
| 4621 | `window-dedicated-p' to DEDICATED if non-nil. Return WINDOW if | 4935 | `window-dedicated-p' to DEDICATED if non-nil. Return WINDOW if |
| 4622 | BUFFER and WINDOW are live." | 4936 | BUFFER and WINDOW are live." |
| 4623 | (when (and (buffer-live-p buffer) (window-live-p window)) | 4937 | (when (and (buffer-live-p buffer) (window-live-p window)) |
| 4938 | (display-buffer-record-window type window buffer) | ||
| 4624 | (unless (eq buffer (window-buffer window)) | 4939 | (unless (eq buffer (window-buffer window)) |
| 4625 | (set-window-dedicated-p window nil) | 4940 | (set-window-dedicated-p window nil) |
| 4626 | (display-buffer-record-window type window buffer) | ||
| 4627 | (set-window-buffer window buffer) | 4941 | (set-window-buffer window buffer) |
| 4628 | (when dedicated | 4942 | (when dedicated |
| 4629 | (set-window-dedicated-p window dedicated)) | 4943 | (set-window-dedicated-p window dedicated)) |
| @@ -4797,6 +5111,10 @@ Recognized alist entries include: | |||
| 4797 | window that already displays the buffer. | 5111 | window that already displays the buffer. |
| 4798 | See `display-buffer-reuse-window'. | 5112 | See `display-buffer-reuse-window'. |
| 4799 | 5113 | ||
| 5114 | `pop-up-frame-parameters' -- Value specifies an alist of frame | ||
| 5115 | parameters to give a new frame, if | ||
| 5116 | one is created. | ||
| 5117 | |||
| 4800 | The ACTION argument to `display-buffer' can also have a non-nil | 5118 | The ACTION argument to `display-buffer' can also have a non-nil |
| 4801 | and non-list value. This means to display the buffer in a window | 5119 | and non-list value. This means to display the buffer in a window |
| 4802 | other than the selected one, even if it is already displayed in | 5120 | other than the selected one, even if it is already displayed in |
| @@ -4939,9 +5257,15 @@ This works by calling `pop-up-frame-function'. If successful, | |||
| 4939 | return the window used; otherwise return nil. | 5257 | return the window used; otherwise return nil. |
| 4940 | 5258 | ||
| 4941 | If ALIST has a non-nil `inhibit-switch-frame' entry, avoid | 5259 | If ALIST has a non-nil `inhibit-switch-frame' entry, avoid |
| 4942 | raising the new frame." | 5260 | raising the new frame. |
| 4943 | (let ((fun pop-up-frame-function) | 5261 | |
| 4944 | frame window) | 5262 | If ALIST has a non-nil `pop-up-frame-parameters' entry, the |
| 5263 | corresponding value is an alist of frame parameters to give the | ||
| 5264 | new frame." | ||
| 5265 | (let* ((params (cdr (assq 'pop-up-frame-parameters alist))) | ||
| 5266 | (pop-up-frame-alist (append params pop-up-frame-alist)) | ||
| 5267 | (fun pop-up-frame-function) | ||
| 5268 | frame window) | ||
| 4945 | (when (and fun | 5269 | (when (and fun |
| 4946 | (setq frame (funcall fun)) | 5270 | (setq frame (funcall fun)) |
| 4947 | (setq window (frame-selected-window frame))) | 5271 | (setq window (frame-selected-window frame))) |
| @@ -5019,8 +5343,9 @@ that frame." | |||
| 5019 | window)) | 5343 | window)) |
| 5020 | (get-largest-window 0 not-this-window)))) | 5344 | (get-largest-window 0 not-this-window)))) |
| 5021 | (when (window-live-p window) | 5345 | (when (window-live-p window) |
| 5022 | (window--even-window-heights window) | 5346 | (prog1 |
| 5023 | (prog1 (window--display-buffer buffer window 'reuse) | 5347 | (window--display-buffer buffer window 'reuse) |
| 5348 | (window--even-window-heights window) | ||
| 5024 | (unless (cdr (assq 'inhibit-switch-frame alist)) | 5349 | (unless (cdr (assq 'inhibit-switch-frame alist)) |
| 5025 | (window--maybe-raise-frame (window-frame window))))))) | 5350 | (window--maybe-raise-frame (window-frame window))))))) |
| 5026 | 5351 | ||
diff --git a/lisp/woman.el b/lisp/woman.el index 5933d593aa5..c8cc7ea6766 100644 --- a/lisp/woman.el +++ b/lisp/woman.el | |||
| @@ -2531,7 +2531,7 @@ REQUEST is the invoking directive without the leading dot." | |||
| 2531 | (cond | 2531 | (cond |
| 2532 | ;; ((looking-at "[no]") (setq c t)) ; accept n(roff) and o(dd page) | 2532 | ;; ((looking-at "[no]") (setq c t)) ; accept n(roff) and o(dd page) |
| 2533 | ;; ((looking-at "[te]") (setq c nil)) ; reject t(roff) and e(ven page) | 2533 | ;; ((looking-at "[te]") (setq c nil)) ; reject t(roff) and e(ven page) |
| 2534 | ;; Per groff ".if v" is recognised as false (it means -Tversatec). | 2534 | ;; Per groff ".if v" is recognized as false (it means -Tversatec). |
| 2535 | ((looking-at "[ntoev]") | 2535 | ((looking-at "[ntoev]") |
| 2536 | (setq c (memq (following-char) woman-if-conditions-true))) | 2536 | (setq c (memq (following-char) woman-if-conditions-true))) |
| 2537 | ;; Unrecognized letter so reject: | 2537 | ;; Unrecognized letter so reject: |