95,97c95,97 < ;; 1. If the current buffer is a next-error capable buffer, return it. < ;; 2. If one window on the selected frame displays such buffer, return it. < ;; 3. If next-error-last-buffer is set to a live buffer, use that. --- > ;; 1. If one window on the selected frame displays such buffer, return it. > ;; 2. If next-error-last-buffer is set to a live buffer, use that. > ;; 3. If the current buffer is a next-error capable buffer, return it. 101,121c101,122 < (if (and (not other-buffer) < (next-error-buffer-p (current-buffer) extra-test)) < ;; The current buffer is a next-error capable buffer. < (current-buffer) < (or < (let ((window-buffers < (delete-dups < (delq nil < (mapcar (lambda (w) < (and (next-error-buffer-p (window-buffer w) extra-test) < (window-buffer w))) < (window-list)))))) < (if other-buffer < (setq window-buffers (delq (current-buffer) window-buffers))) < (if (eq (length window-buffers) 1) < (car window-buffers))) < (if (and next-error-last-buffer (buffer-name next-error-last-buffer) < (next-error-buffer-p next-error-last-buffer extra-test) < (or (not other-buffer) (not (eq next-error-last-buffer < (current-buffer))))) < next-error-last-buffer --- > (or > (let ((window-buffers > (delete-dups > (delq nil > (mapcar (lambda (w) > (and (next-error-buffer-p (window-buffer w) extra-test) > (window-buffer w))) > (window-list)))))) > (if other-buffer > (setq window-buffers (delq (current-buffer) window-buffers))) > (if (eq (length window-buffers) 1) > (car window-buffers))) > (if (and next-error-last-buffer > (buffer-name next-error-last-buffer) > (next-error-buffer-p next-error-last-buffer extra-test) > (or (not other-buffer) > (not (eq next-error-last-buffer (current-buffer))))) > next-error-last-buffer > (if (and (not other-buffer) > (next-error-buffer-p (current-buffer) extra-test)) > ;; The current buffer is a next-error capable buffer. > (current-buffer)))) 136c137 < (error "No next-error capable buffer found!")))))))) --- > (error "No next-error capable buffer found!"))))) 156,158c157,160 < `next-error-function' is bound to an appropriate < function. To specify use of a particular buffer for error < messages, type \\[next-error] in that buffer. --- > `next-error-function' is bound to an appropriate function. To > specify use of a particular buffer for error messages, type > \\[next-error] in that buffer when it is the only one displayed > in the current frame.