bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: info-look.el bug


From: Kevin Rodgers
Subject: Re: info-look.el bug
Date: Mon, 02 Feb 2004 18:25:38 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Stephen Eglen wrote:

Hi,
I think I've found a little bug in info-look.el.  If anyone out there
regularly uses info-look.el, could they please check the following and
get back to me?

% emacs -q

In the *scratch* buffer, type "C-h S defun RET". The frame should divide
into two: the top window shows *scratch* and the bottom window shows
the definition of "defun" from the elisp *info*.

Still in the scratch buffer, type "C-h S setq RET".  This time the
*scratch* buffer disappears and is replaced by another window showing
*info* for setq; so now, both windows are showing an info node, but
the scratch buffer has gone.

I think this behaviour is wrong, and that if the *info* buffer is
already visible, it should not be viewed again in another window.  I
think have tracked down the problem to the call in info-lookup where
it calls Info-goto-node.
I think this problem can be solved by using save-window-excursion, but
then on the second call to C-h S, the highlighting is not shown.
Anyone have a better idea of how to solve this?

I think it is caused by the default value of same-window-buffer-names,

which includes "*info*".  Here's a patch:

*** emacs-21.3/lisp/info-look.el.orig   Fri Oct 18 19:21:07 2002
--- emacs-21.3/lisp/info-look.el        Mon Feb  2 18:19:02 2004
***************
*** 338,345 ****
          (if (and info-frame
                   (display-multi-frame-p)
                   (memq info-frame (frames-on-display-list)))
!           (select-frame info-frame)
!         (switch-to-buffer-other-window "*info*")))))
      (while (and (not found) modes)
        (setq doc-spec (info-lookup->doc-spec topic (car modes)))
        (while (and (not found) doc-spec)
--- 338,347 ----
          (if (and info-frame
                   (display-multi-frame-p)
                   (memq info-frame (frames-on-display-list)))
!               (select-frame info-frame)
!             (let ((same-window-buffer-names
!                    (delete "*info*" same-window-buffer-names)))
!               (switch-to-buffer-other-window "*info*"))))))
      (while (and (not found) modes)
        (setq doc-spec (info-lookup->doc-spec topic (car modes)))
        (while (and (not found) doc-spec)

--
Kevin Rodgers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]