# HG changeset patch # User Jim Blandy # Date 731056953 0 # Node ID eda7eec8f8ad22ac5fd37879afee13c9bee420bb # Parent 3334e2489824d3c4f8abf20406767f71ef61be67 * etags.el (find-tag-other-window): If another window is already displaying the tag's buffer, explicitly set that window's point to the tag's position. diff -r 3334e2489824 -r eda7eec8f8ad lisp/progmodes/etags.el --- a/lisp/progmodes/etags.el Tue Mar 02 07:21:44 1993 +0000 +++ b/lisp/progmodes/etags.el Tue Mar 02 07:22:33 1993 +0000 @@ -658,10 +658,17 @@ ;; windows. To prevent this, we save the selected window's point before ;; doing find-tag-noselect, and restore it after. (let* ((window-point (window-point (selected-window))) - (tagbuf (find-tag-noselect tagname next-p))) + (tagbuf (find-tag-noselect tagname next-p)) + (tagpoint (progn (set-buffer tagbuf) (point)))) (set-window-point (prog1 (selected-window) - (switch-to-buffer-other-window tagbuf)) + (switch-to-buffer-other-window tagbuf) + ;; We have to set this new window's point; it + ;; might already have been displaying a + ;; different portion of tagbuf, in which case + ;; switch-to-buffer-other-window doesn't set + ;; the window's point from the buffer. + (set-window-point (selected-window) tagpoint)) window-point))) ;;;###autoload (define-key ctl-x-4-map "." 'find-tag-other-window)