diff options
| author | Martin Rudalics | 2011-06-28 14:28:40 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2011-06-28 14:28:40 +0200 |
| commit | 5f45cca553e6fa28ebcb7f29f961d2dec112721f (patch) | |
| tree | 0ec321a6b28f8941455bcf8aa8f743ede58c1c6f | |
| parent | da68c4c88c9e505f622afe741e7533fda808f418 (diff) | |
| download | emacs-5f45cca553e6fa28ebcb7f29f961d2dec112721f.tar.gz emacs-5f45cca553e6fa28ebcb7f29f961d2dec112721f.zip | |
Some more fixes of buffer display functions.
* window.el (display-buffer-in-side-window): Handle dedicated
windows as in display-buffer-reuse-window.
(display-buffer-normalize-alist): Use value of override
specifier.
(display-buffer-normalize-specifiers): Use value of
other-window-means-other-frame specifier.
(display-buffer-alist): Rewrite some texts in widgets.
(display-buffer): Spread arguments when calling function
specified by fun-with-args.
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/window.el | 44 |
2 files changed, 37 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 65eb59cca54..921de562731 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2011-06-28 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * window.el (display-buffer-in-side-window): Handle dedicated | ||
| 4 | windows as in display-buffer-reuse-window. | ||
| 5 | (display-buffer-normalize-alist): Use value of override | ||
| 6 | specifier. | ||
| 7 | (display-buffer-normalize-specifiers): Use value of | ||
| 8 | other-window-means-other-frame specifier. | ||
| 9 | (display-buffer-alist): Rewrite some texts in widgets. | ||
| 10 | (display-buffer): Spread arguments when calling function | ||
| 11 | specified by fun-with-args. | ||
| 12 | |||
| 1 | 2011-06-28 Deniz Dogan <deniz@dogan.se> | 13 | 2011-06-28 Deniz Dogan <deniz@dogan.se> |
| 2 | 14 | ||
| 3 | * emacs-lisp/lisp-mode.el (emacs-lisp-mode-syntax-table): Unnest | 15 | * emacs-lisp/lisp-mode.el (emacs-lisp-mode-syntax-table): Unnest |
diff --git a/lisp/window.el b/lisp/window.el index f693077f753..161dbb33646 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -4092,7 +4092,7 @@ A list whose car is the symbol `fun-with-args' specifies that the | |||
| 4092 | function specified in the second element of the list is | 4092 | function specified in the second element of the list is |
| 4093 | responsible for displaying the buffer. `display-buffer' calls | 4093 | responsible for displaying the buffer. `display-buffer' calls |
| 4094 | this function with the buffer as first argument and the remaining | 4094 | this function with the buffer as first argument and the remaining |
| 4095 | elements of the list as second argument. | 4095 | elements of the list as the other arguments. |
| 4096 | 4096 | ||
| 4097 | The function should choose or create a window, display the buffer | 4097 | The function should choose or create a window, display the buffer |
| 4098 | in it, and return the window. It is also responsible for giving | 4098 | in it, and return the window. It is also responsible for giving |
| @@ -4226,9 +4226,9 @@ using the location specifiers `same-window' or `other-frame'." | |||
| 4226 | :help-echo "Window to reuse." | 4226 | :help-echo "Window to reuse." |
| 4227 | :value nil | 4227 | :value nil |
| 4228 | :format "%[Window%] %v" :size 15 | 4228 | :format "%[Window%] %v" :size 15 |
| 4229 | (const :tag "Any" :format "%t" nil) | 4229 | (const :tag "Any window" :format "%t" nil) |
| 4230 | (const :tag "Selected only" :format "%t" same) | 4230 | (const :tag "Same window" :format "%t" same) |
| 4231 | (const :tag "Any but selected" :format "%t" other)) | 4231 | (const :tag "Other window" :format "%t" other)) |
| 4232 | ;; The window's buffer. | 4232 | ;; The window's buffer. |
| 4233 | (choice | 4233 | (choice |
| 4234 | :tag "Buffer" | 4234 | :tag "Buffer" |
| @@ -4240,15 +4240,15 @@ using the location specifiers `same-window' or `other-frame'." | |||
| 4240 | (const :tag "Other buffer" :format "%t" other)) | 4240 | (const :tag "Other buffer" :format "%t" other)) |
| 4241 | ;; The window's frame. | 4241 | ;; The window's frame. |
| 4242 | (choice | 4242 | (choice |
| 4243 | :help-echo "Frame to search for a window to reuse." | 4243 | :help-echo "Frames to search for a window to reuse." |
| 4244 | :tag "Frame" | 4244 | :tag "Frame" |
| 4245 | :value nil | 4245 | :value nil |
| 4246 | :format " %[Frame%] %v" :size 15 | 4246 | :format " %[Frame%] %v" :size 15 |
| 4247 | (const :tag "Selected frame only" :format "%t" nil) | 4247 | (const :tag "Same frame only" :format "%t" nil) |
| 4248 | (const :tag "Visible frames" :format "%t" visible) | 4248 | (const :tag "Visible frames" :format "%t" visible) |
| 4249 | (const :tag "Visible but unselected" :format "%t" other) | 4249 | (const :tag "Any other visible frame" :format "%t" other) |
| 4250 | (const :tag "Visible and iconified" :format "%t" 0) | 4250 | (const :tag "Visible and iconified frames" :format "%t" 0) |
| 4251 | (const :tag "Any frame" :format "%t" t))) | 4251 | (const :tag "All frames" :format "%t" t))) |
| 4252 | ;; Whether window sizes should be evened out. | 4252 | ;; Whether window sizes should be evened out. |
| 4253 | (cons | 4253 | (cons |
| 4254 | :format "%v\n" | 4254 | :format "%v\n" |
| @@ -4596,9 +4596,9 @@ using the location specifiers `same-window' or `other-frame'." | |||
| 4596 | (const :format "" other-window-means-other-frame) | 4596 | (const :format "" other-window-means-other-frame) |
| 4597 | (choice | 4597 | (choice |
| 4598 | :help-echo "Whether other window means same or other frame." | 4598 | :help-echo "Whether other window means same or other frame." |
| 4599 | :format "%[Same or other frame%] %v\n" :size 15 | 4599 | :format "%[Other window means other frame%] %v\n" :size 15 |
| 4600 | (const :tag "Same frame" :format "%t" nil) | 4600 | (const :tag "Off" :format "%t" nil) |
| 4601 | (const :tag "Other frame" :format "%t" t))) | 4601 | (const :tag "On" :format "%t" t))) |
| 4602 | ;; Overriding. | 4602 | ;; Overriding. |
| 4603 | (cons | 4603 | (cons |
| 4604 | :format "%v\n" | 4604 | :format "%v\n" |
| @@ -5172,6 +5172,7 @@ SPECIFIERS must be a list of buffer display specifiers." | |||
| 5172 | ;; `major' is the major window on SIDE, `windows' the life | 5172 | ;; `major' is the major window on SIDE, `windows' the life |
| 5173 | ;; windows on SIDE. | 5173 | ;; windows on SIDE. |
| 5174 | (windows (when major (windows-with-parameter 'window-side side))) | 5174 | (windows (when major (windows-with-parameter 'window-side side))) |
| 5175 | (reuse-dedicated (cdr (assq 'reuse-window-dedicated specifiers))) | ||
| 5175 | (slots (when major (window-child-count major))) | 5176 | (slots (when major (window-child-count major))) |
| 5176 | (max-slots | 5177 | (max-slots |
| 5177 | (nth (cond | 5178 | (nth (cond |
| @@ -5182,7 +5183,7 @@ SPECIFIERS must be a list of buffer display specifiers." | |||
| 5182 | window-sides-slots)) | 5183 | window-sides-slots)) |
| 5183 | (selected-window (selected-window)) | 5184 | (selected-window (selected-window)) |
| 5184 | window this-window this-slot prev-window next-window | 5185 | window this-window this-slot prev-window next-window |
| 5185 | best-window best-slot abs-slot) | 5186 | best-window best-slot abs-slot dedicated) |
| 5186 | 5187 | ||
| 5187 | (unless (numberp slot) | 5188 | (unless (numberp slot) |
| 5188 | (setq slot 0)) | 5189 | (setq slot 0)) |
| @@ -5197,8 +5198,13 @@ SPECIFIERS must be a list of buffer display specifiers." | |||
| 5197 | ((not (numberp this-slot))) | 5198 | ((not (numberp this-slot))) |
| 5198 | ((and (= this-slot slot) | 5199 | ((and (= this-slot slot) |
| 5199 | ;; Dedicatedness check. | 5200 | ;; Dedicatedness check. |
| 5200 | (or (not (window-dedicated-p window)) | 5201 | (or (not (setq dedicated (window-dedicated-p window))) |
| 5201 | (assq 'reuse-window-dedicated specifiers))) | 5202 | ;; If the window is weakly dedicated to its |
| 5203 | ;; buffer, reuse-dedicated must be non-nil. | ||
| 5204 | (and (not (eq dedicated t)) reuse-dedicated) | ||
| 5205 | ;; If the window is strongly dedicated to its | ||
| 5206 | ;; buffer, reuse-dedicated must be t. | ||
| 5207 | (eq reuse-dedicated t))) | ||
| 5202 | ;; Window with matching SLOT, use it. | 5208 | ;; Window with matching SLOT, use it. |
| 5203 | (setq this-window window) | 5209 | (setq this-window window) |
| 5204 | (throw 'found t)) | 5210 | (throw 'found t)) |
| @@ -5550,7 +5556,7 @@ LABEL the corresponding argument of `display-buffer'." | |||
| 5550 | (let* ((specifiers (cdr entry)) | 5556 | (let* ((specifiers (cdr entry)) |
| 5551 | (normalized | 5557 | (normalized |
| 5552 | (display-buffer-normalize-alist-1 specifiers label))) | 5558 | (display-buffer-normalize-alist-1 specifiers label))) |
| 5553 | (if (assq 'override specifiers) | 5559 | (if (cdr (assq 'override specifiers)) |
| 5554 | (setq list-1 | 5560 | (setq list-1 |
| 5555 | (if list-1 | 5561 | (if list-1 |
| 5556 | (append list-1 normalized) | 5562 | (append list-1 normalized) |
| @@ -5587,8 +5593,8 @@ specifiers: | |||
| 5587 | 5593 | ||
| 5588 | - `display-buffer-default-specifiers'." | 5594 | - `display-buffer-default-specifiers'." |
| 5589 | (let* ((list (display-buffer-normalize-alist buffer-name label)) | 5595 | (let* ((list (display-buffer-normalize-alist buffer-name label)) |
| 5590 | (other-frame (assq 'other-window-means-other-frame | 5596 | (other-frame (cdr (assq 'other-window-means-other-frame |
| 5591 | (or (car list) (cdr list))))) | 5597 | (or (car list) (cdr list)))))) |
| 5592 | (append | 5598 | (append |
| 5593 | ;; Overriding user specifiers. | 5599 | ;; Overriding user specifiers. |
| 5594 | (car list) | 5600 | (car list) |
| @@ -5717,7 +5723,7 @@ this list as arguments." | |||
| 5717 | (display-buffer-in-side-window | 5723 | (display-buffer-in-side-window |
| 5718 | buffer (nth 1 specifier) (nth 2 specifier) normalized)) | 5724 | buffer (nth 1 specifier) (nth 2 specifier) normalized)) |
| 5719 | ((eq method 'fun-with-args) | 5725 | ((eq method 'fun-with-args) |
| 5720 | (apply (cadr specifier) buffer (cddr specifier)))))) | 5726 | (apply (nth 1 specifier) buffer (nth 2 specifier)))))) |
| 5721 | 5727 | ||
| 5722 | ;; If we don't have a window yet, try a fallback method. All | 5728 | ;; If we don't have a window yet, try a fallback method. All |
| 5723 | ;; specifiers have been used up by now. | 5729 | ;; specifiers have been used up by now. |