Mercurial > emacs
changeset 66119:bc2d2dc9f534
(compilation-goto-locus): Display the
compilation buffer first and the source buffer second, in case they're
in overlapping frames. Don't raise the compilation frame if it was the
selected window upon entry. Pass the `other-window' arg to
pop-to-buffer.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sun, 16 Oct 2005 14:12:50 +0000 |
parents | c0fac24c378a |
children | 87310076f109 |
files | lisp/ChangeLog lisp/progmodes/compile.el |
diffstat | 2 files changed, 58 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sun Oct 16 14:12:35 2005 +0000 +++ b/lisp/ChangeLog Sun Oct 16 14:12:50 2005 +0000 @@ -1,3 +1,19 @@ +2005-10-16 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/compile.el (compilation-goto-locus): Display the + compilation buffer first and the source buffer second, in case they're + in overlapping frames. Don't raise the compilation frame if it was the + selected window upon entry. Pass the `other-window' arg to + pop-to-buffer. + + * info.el (Info-fontify-node): Use dolist. + Change add-text-properties to put-text-property. + +2005-10-16 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> + + * textmodes/bibtex.el (bibtex-font-lock-url): Catch when point past + bound of search. + 2005-10-16 Masatake YAMATO <jet@gyve.org> * dabbrev.el (dabbrev-completion): Pass the common @@ -138,6 +154,11 @@ Handle the case that ucs-mule-to-mule-unicode translates a character to ASCII (usually for IPA characters). +2005-10-12 Stefan Monnier <monnier@iro.umontreal.ca> + + * info.el (Info-fontify-node): Don't be fooled by a lone "...". + Don't hide the underline of titles if font-lock-mode is disabled. + 2005-10-12 Bill Wohler <wohler@newt.com> * makefile.w32-in (MH-E-SRC): New. Used by mh-autoloads. @@ -10183,8 +10204,8 @@ minibuffer-with-setup-hook (which breaks turning on/off file-name-shadow-mode while in the prompt). - * complete.el (PC-read-include-file-name-internal): Use - test-completion. + * complete.el (PC-read-include-file-name-internal): + Use test-completion. 2005-03-28 Luc Teirlinck <teirllm@auburn.edu>
--- a/lisp/progmodes/compile.el Sun Oct 16 14:12:35 2005 +0000 +++ b/lisp/progmodes/compile.el Sun Oct 16 14:12:50 2005 +0000 @@ -1678,37 +1678,20 @@ "Jump to an error corresponding to MSG at MK. All arguments are markers. If END-MK is non-nil, mark is set there and overlay is highlighted between MK and END-MK." - (if (eq (window-buffer (selected-window)) - (marker-buffer msg)) - ;; If the compilation buffer window is selected, - ;; keep the compilation buffer in this window; - ;; display the source in another window. - (let ((pop-up-windows t)) - (pop-to-buffer (marker-buffer mk))) - (if (window-dedicated-p (selected-window)) - (pop-to-buffer (marker-buffer mk)) - (switch-to-buffer (marker-buffer mk)))) - ;; If narrowing gets in the way of going to the right place, widen. - (unless (eq (goto-char mk) (point)) - (widen) - (goto-char mk)) - (if end-mk - (push-mark end-mk t) - (if mark-active (setq mark-active))) - ;; If hideshow got in the way of - ;; seeing the right place, open permanently. - (dolist (ov (overlays-at (point))) - (when (eq 'hs (overlay-get ov 'invisible)) - (delete-overlay ov) - (goto-char mk))) - ;; Show compilation buffer in other window, scrolled to this error. - (let* ((pop-up-windows t) - ;; Use an existing window if it is in a visible frame. + (let* ((from-compilation-buffer (eq (window-buffer (selected-window)) + (marker-buffer msg))) + ;; Use an existing window if it is in a visible frame. (pre-existing (get-buffer-window (marker-buffer msg) 0)) - (w (let ((display-buffer-reuse-frames t)) - ;; Pop up a window. - (display-buffer (marker-buffer msg)))) + (w (if (and from-compilation-buffer pre-existing) + ;; Calling display-buffer here may end up (partly) hiding + ;; the error location if the two buffers are in two + ;; different frames. So don't do it if it's not necessary. + pre-existing + (let ((display-buffer-reuse-frames t) + (pop-up-windows t)) + ;; Pop up a window. + (display-buffer (marker-buffer msg))))) (highlight-regexp (with-current-buffer (marker-buffer msg) ;; also do this while we change buffer (compilation-set-window w msg) @@ -1718,6 +1701,29 @@ ;; creating a new window. (unless pre-existing (compilation-set-window-height w)) + (if from-compilation-buffer + ;; If the compilation buffer window was selected, + ;; keep the compilation buffer in this window; + ;; display the source in another window. + (let ((pop-up-windows t)) + (pop-to-buffer (marker-buffer mk) 'other-window)) + (if (window-dedicated-p (selected-window)) + (pop-to-buffer (marker-buffer mk)) + (switch-to-buffer (marker-buffer mk)))) + ;; If narrowing gets in the way of going to the right place, widen. + (unless (eq (goto-char mk) (point)) + (widen) + (goto-char mk)) + (if end-mk + (push-mark end-mk t) + (if mark-active (setq mark-active))) + ;; If hideshow got in the way of + ;; seeing the right place, open permanently. + (dolist (ov (overlays-at (point))) + (when (eq 'hs (overlay-get ov 'invisible)) + (delete-overlay ov) + (goto-char mk))) + (when highlight-regexp (if (timerp next-error-highlight-timer) (cancel-timer next-error-highlight-timer))