Mercurial > emacs
comparison lisp/simple.el @ 83428:d0eee3282e6b
Merged from miles@gnu.org--gnu-2005 (patch 678-680)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-678
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-679
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-680
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-468
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Thu, 29 Dec 2005 04:41:02 +0000 |
parents | 521d3f18b3d1 8eda669e2619 |
children | ec395f552d45 |
comparison
equal
deleted
inserted
replaced
83427:2afc49c9f0c0 | 83428:d0eee3282e6b |
---|---|
50 | 50 |
51 (defgroup paren-matching nil | 51 (defgroup paren-matching nil |
52 "Highlight (un)matching of parens and expressions." | 52 "Highlight (un)matching of parens and expressions." |
53 :group 'matching) | 53 :group 'matching) |
54 | 54 |
55 (defun get-next-valid-buffer (list &optional buffer visible-ok frame) "\ | 55 (defun get-next-valid-buffer (list &optional buffer visible-ok frame) |
56 Search LIST for a valid buffer to display in FRAME. | 56 "Search LIST for a valid buffer to display in FRAME. |
57 Return nil when all buffers in LIST are undesirable for display, | 57 Return nil when all buffers in LIST are undesirable for display, |
58 otherwise return the first suitable buffer in LIST. | 58 otherwise return the first suitable buffer in LIST. |
59 | 59 |
60 Buffers not visible in windows are preferred to visible buffers, | 60 Buffers not visible in windows are preferred to visible buffers, |
61 unless VISIBLE-OK is non-nil. | 61 unless VISIBLE-OK is non-nil. |
62 If the optional argument FRAME is nil, it defaults to the selected frame. | 62 If the optional argument FRAME is nil, it defaults to the selected frame. |
63 If BUFFER is non-nil, ignore occurances of that buffer in LIST." | 63 If BUFFER is non-nil, ignore occurrences of that buffer in LIST." |
64 ;; This logic is more or less copied from other-buffer. | 64 ;; This logic is more or less copied from other-buffer. |
65 (setq frame (or frame (selected-frame))) | 65 (setq frame (or frame (selected-frame))) |
66 (let ((pred (frame-parameter frame 'buffer-predicate)) | 66 (let ((pred (frame-parameter frame 'buffer-predicate)) |
67 found buf) | 67 found buf) |
68 (while (and (not found) list) | 68 (while (and (not found) list) |
74 (or visible-ok (null (get-buffer-window buf 'visible)))) | 74 (or visible-ok (null (get-buffer-window buf 'visible)))) |
75 (setq found buf) | 75 (setq found buf) |
76 (setq list (cdr list)))) | 76 (setq list (cdr list)))) |
77 (car list))) | 77 (car list))) |
78 | 78 |
79 (defun last-buffer (&optional buffer visible-ok frame) "\ | 79 (defun last-buffer (&optional buffer visible-ok frame) |
80 Return the last non-hidden displayable buffer in the buffer list. | 80 "Return the last non-hidden displayable buffer in the buffer list. |
81 If BUFFER is non-nil, last-buffer will ignore that buffer. | 81 If BUFFER is non-nil, last-buffer will ignore that buffer. |
82 Buffers not visible in windows are preferred to visible buffers, | 82 Buffers not visible in windows are preferred to visible buffers, |
83 unless optional argument VISIBLE-OK is non-nil. | 83 unless optional argument VISIBLE-OK is non-nil. |
84 If the optional third argument FRAME is non-nil, use that frame's | 84 If the optional third argument FRAME is non-nil, use that frame's |
85 buffer list instead of the selected frame's buffer list. | 85 buffer list instead of the selected frame's buffer list. |
182 | 182 |
183 The function EXTRA-TEST-INCLUSIVE, if non-nil, is called in each buffer | 183 The function EXTRA-TEST-INCLUSIVE, if non-nil, is called in each buffer |
184 that normally would not qualify. If it returns t, the buffer | 184 that normally would not qualify. If it returns t, the buffer |
185 in question is treated as usable. | 185 in question is treated as usable. |
186 | 186 |
187 The function EXTRA-TEST-EXCLUSIVE, if non-nil is called in each buffer | 187 The function EXTRA-TEST-EXCLUSIVE, if non-nil, is called in each buffer |
188 that would normally be considered usable. If it returns nil, | 188 that would normally be considered usable. If it returns nil, |
189 that buffer is rejected." | 189 that buffer is rejected." |
190 (and (buffer-name buffer) ;First make sure it's live. | 190 (and (buffer-name buffer) ;First make sure it's live. |
191 (not (and avoid-current (eq buffer (current-buffer)))) | 191 (not (and avoid-current (eq buffer (current-buffer)))) |
192 (with-current-buffer buffer | 192 (with-current-buffer buffer |
201 | 201 |
202 (defun next-error-find-buffer (&optional avoid-current | 202 (defun next-error-find-buffer (&optional avoid-current |
203 extra-test-inclusive | 203 extra-test-inclusive |
204 extra-test-exclusive) | 204 extra-test-exclusive) |
205 "Return a `next-error' capable buffer. | 205 "Return a `next-error' capable buffer. |
206 | |
206 If AVOID-CURRENT is non-nil, treat the current buffer | 207 If AVOID-CURRENT is non-nil, treat the current buffer |
207 as an absolute last resort only. | 208 as an absolute last resort only. |
208 | 209 |
209 The function EXTRA-TEST-INCLUSIVE, if non-nil, is called in each buffer | 210 The function EXTRA-TEST-INCLUSIVE, if non-nil, is called in each buffer |
210 that normally would not qualify. If it returns t, the buffer | 211 that normally would not qualify. If it returns t, the buffer |
211 in question is treated as usable. | 212 in question is treated as usable. |
212 | 213 |
213 The function EXTRA-TEST-EXCLUSIVE, if non-nil is called in each buffer | 214 The function EXTRA-TEST-EXCLUSIVE, if non-nil, is called in each buffer |
214 that would normally be considered usable. If it returns nil, | 215 that would normally be considered usable. If it returns nil, |
215 that buffer is rejected." | 216 that buffer is rejected." |
216 (or | 217 (or |
217 ;; 1. If one window on the selected frame displays such buffer, return it. | 218 ;; 1. If one window on the selected frame displays such buffer, return it. |
218 (let ((window-buffers | 219 (let ((window-buffers |
1135 except when an alternate history list is specified.") | 1136 except when an alternate history list is specified.") |
1136 (defvar minibuffer-history-sexp-flag nil | 1137 (defvar minibuffer-history-sexp-flag nil |
1137 "Control whether history list elements are expressions or strings. | 1138 "Control whether history list elements are expressions or strings. |
1138 If the value of this variable equals current minibuffer depth, | 1139 If the value of this variable equals current minibuffer depth, |
1139 they are expressions; otherwise they are strings. | 1140 they are expressions; otherwise they are strings. |
1140 \(That convention is designed to do the right thing fora | 1141 \(That convention is designed to do the right thing for |
1141 recursive uses of the minibuffer.)") | 1142 recursive uses of the minibuffer.)") |
1142 (setq minibuffer-history-variable 'minibuffer-history) | 1143 (setq minibuffer-history-variable 'minibuffer-history) |
1143 (setq minibuffer-history-position nil) | 1144 (setq minibuffer-history-position nil) |
1144 (defvar minibuffer-history-search-history nil) | 1145 (defvar minibuffer-history-search-history nil) |
1145 | 1146 |