aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2004-12-14 00:51:02 +0000
committerJuri Linkov2004-12-14 00:51:02 +0000
commitf1e2a03326d180858cad6fb8a1718714dc5f161a (patch)
tree64951865368faf15bd228e2474c75d4f1bc7ff00
parent1113094c332932b2437fd43f6326b57ff825dafd (diff)
downloademacs-f1e2a03326d180858cad6fb8a1718714dc5f161a.tar.gz
emacs-f1e2a03326d180858cad6fb8a1718714dc5f161a.zip
(next-error-buffer-p, next-error-find-buffer): Doc fix.
-rw-r--r--lisp/simple.el38
1 files changed, 19 insertions, 19 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 92dc5ad0cb0..3a55d5f27ca 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -123,33 +123,33 @@ to navigate in it.")
123 123
124(make-variable-buffer-local 'next-error-function) 124(make-variable-buffer-local 'next-error-function)
125 125
126(defsubst next-error-buffer-p (buffer 126(defsubst next-error-buffer-p (buffer
127 &optional 127 &optional
128 extra-test-inclusive 128 extra-test-inclusive
129 extra-test-exclusive) 129 extra-test-exclusive)
130 "Test if BUFFER is a next-error capable buffer. 130 "Test if BUFFER is a next-error capable buffer.
131EXTRA-TEST-INCLUSIVE is called to allow extra buffers. 131EXTRA-TEST-INCLUSIVE is called to allow extra buffers.
132EXTRA-TEST-INCLUSIVE is called to disallow buffers." 132EXTRA-TEST-EXCLUSIVE is called to disallow buffers."
133 (with-current-buffer buffer 133 (with-current-buffer buffer
134 (or (and extra-test-inclusive (funcall extra-test-inclusive)) 134 (or (and extra-test-inclusive (funcall extra-test-inclusive))
135 (and (if extra-test-exclusive (funcall extra-test-exclusive) t) 135 (and (if extra-test-exclusive (funcall extra-test-exclusive) t)
136 next-error-function)))) 136 next-error-function))))
137 137
138(defun next-error-find-buffer (&optional other-buffer 138(defun next-error-find-buffer (&optional other-buffer
139 extra-test-inclusive 139 extra-test-inclusive
140 extra-test-exclusive) 140 extra-test-exclusive)
141 "Return a next-error capable buffer. 141 "Return a next-error capable buffer.
142OTHER-BUFFER will disallow the current buffer. 142OTHER-BUFFER will disallow the current buffer.
143EXTRA-TEST-INCLUSIVE is called to allow extra buffers. 143EXTRA-TEST-INCLUSIVE is called to allow extra buffers.
144EXTRA-TEST-INCLUSIVE is called to disallow buffers." 144EXTRA-TEST-EXCLUSIVE is called to disallow buffers."
145 (or 145 (or
146 ;; 1. If one window on the selected frame displays such buffer, return it. 146 ;; 1. If one window on the selected frame displays such buffer, return it.
147 (let ((window-buffers 147 (let ((window-buffers
148 (delete-dups 148 (delete-dups
149 (delq nil (mapcar (lambda (w) 149 (delq nil (mapcar (lambda (w)
150 (if (next-error-buffer-p 150 (if (next-error-buffer-p
151 (window-buffer w) 151 (window-buffer w)
152 extra-test-inclusive extra-test-exclusive) 152 extra-test-inclusive extra-test-exclusive)
153 (window-buffer w))) 153 (window-buffer w)))
154 (window-list)))))) 154 (window-list))))))
155 (if other-buffer 155 (if other-buffer
@@ -159,29 +159,29 @@ EXTRA-TEST-INCLUSIVE is called to disallow buffers."
159 ;; 2. If next-error-last-buffer is set to a live buffer, use that. 159 ;; 2. If next-error-last-buffer is set to a live buffer, use that.
160 (if (and next-error-last-buffer 160 (if (and next-error-last-buffer
161 (buffer-name next-error-last-buffer) 161 (buffer-name next-error-last-buffer)
162 (next-error-buffer-p next-error-last-buffer 162 (next-error-buffer-p next-error-last-buffer
163 extra-test-inclusive extra-test-exclusive) 163 extra-test-inclusive extra-test-exclusive)
164 (or (not other-buffer) 164 (or (not other-buffer)
165 (not (eq next-error-last-buffer (current-buffer))))) 165 (not (eq next-error-last-buffer (current-buffer)))))
166 next-error-last-buffer) 166 next-error-last-buffer)
167 ;; 3. If the current buffer is a next-error capable buffer, return it. 167 ;; 3. If the current buffer is a next-error capable buffer, return it.
168 (if (and (not other-buffer) 168 (if (and (not other-buffer)
169 (next-error-buffer-p (current-buffer) 169 (next-error-buffer-p (current-buffer)
170 extra-test-inclusive extra-test-exclusive)) 170 extra-test-inclusive extra-test-exclusive))
171 (current-buffer)) 171 (current-buffer))
172 ;; 4. Look for a next-error capable buffer in a buffer list. 172 ;; 4. Look for a next-error capable buffer in a buffer list.
173 (let ((buffers (buffer-list))) 173 (let ((buffers (buffer-list)))
174 (while (and buffers 174 (while (and buffers
175 (or (not (next-error-buffer-p 175 (or (not (next-error-buffer-p
176 (car buffers) 176 (car buffers)
177 extra-test-inclusive extra-test-exclusive)) 177 extra-test-inclusive extra-test-exclusive))
178 (and other-buffer (eq (car buffers) (current-buffer))))) 178 (and other-buffer (eq (car buffers) (current-buffer)))))
179 (setq buffers (cdr buffers))) 179 (setq buffers (cdr buffers)))
180 (if buffers 180 (if buffers
181 (car buffers) 181 (car buffers)
182 (or (and other-buffer 182 (or (and other-buffer
183 (next-error-buffer-p (current-buffer) 183 (next-error-buffer-p (current-buffer)
184 extra-test-inclusive extra-test-exclusive) 184 extra-test-inclusive extra-test-exclusive)
185 ;; The current buffer is a next-error capable buffer. 185 ;; The current buffer is a next-error capable buffer.
186 (progn 186 (progn
187 (if other-buffer 187 (if other-buffer
@@ -3247,7 +3247,7 @@ Outline mode sets this."
3247 (if (if forward 3247 (if (if forward
3248 ;; If going forward, don't accept the previous 3248 ;; If going forward, don't accept the previous
3249 ;; allowable position if it is before the target line. 3249 ;; allowable position if it is before the target line.
3250 (< line-beg (point)) 3250 (< line-beg (point))
3251 ;; If going backward, don't accept the previous 3251 ;; If going backward, don't accept the previous
3252 ;; allowable position if it is still after the target line. 3252 ;; allowable position if it is still after the target line.
3253 (<= (point) line-end)) 3253 (<= (point) line-end))