[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Info-use-header-line nil => no navigation via header buttons (what
From: |
Eli Zaretskii |
Subject: |
Re: Info-use-header-line nil => no navigation via header buttons (what was the header line) |
Date: |
Fri, 21 Dec 2001 20:40:08 +0200 |
Drew Adams wrote:
>
> I'm using GNU Emacs 21.1.1 (i366-msvc-nt-4.0.1381) of 2001-10-22 on buffy.
>
> 1. In virgin Emacs (-q), load-library info.
> 2. Set Info-use-header-line to nil.
> 3. Start Info: C-h i.
> 4. Clicking on the header navigation buttons "Next" etc. doesn't do
> anything. The mouseover mouse-face and help ("Go to...") string are
> displayed, but no navigation takes place.
Thank you for your report. This is indeed a bug. Please see if the changes
below solve it.
> Also, setting the user option Info-use-header-line should be possible after
> Info is displayed, and it should change the display to reflect the user's
> request. At the least, there should be a redisplay command/function to take
> into effect the change in value of Info-use-header-line.
The changes below should solve this as well, although you need to go to
another node (e.g., by pressing `n' or `p') to have the header line
disappear, after setting Info-use-header-line to nil.
2001-12-21 Eli Zaretskii <eliz@is.elta.co.il>
* info.el (Info-select-node): If Info-use-header-line is nil, set
header-line-format to nil.
(Info-fontify-node): Don't put a keymap text property on the
heading if we are not going to display the header line.
Index: lisp/info.el
===================================================================
RCS file: /cvs/emacs/lisp/info.el,v
retrieving revision 1.288
diff -u -r1.288 info.el
--- lisp/info.el 3 Dec 2001 04:26:43 -0000 1.288
+++ lisp/info.el 21 Dec 2001 18:34:51 -0000
@@ -999,7 +999,8 @@
(if Info-fontify (Info-fontify-node))
(if Info-use-header-line
(Info-setup-header-line)
- (setq Info-header-line nil))
+ (setq Info-header-line nil)
+ (setq header-line-format nil)) ; so the header line isn't displayed
(run-hooks 'Info-selection-hook)))))
(defun Info-set-mode-line ()
@@ -2599,15 +2600,18 @@
'help-echo
(concat "Go to node "
(buffer-substring nbeg nend)))
- (let ((fun (cdr (assoc tag '(("Prev" . Info-prev)
- ("Next" . Info-next)
- ("Up" . Info-up))))))
- (when fun
- (let ((keymap (make-sparse-keymap)))
- (define-key keymap [header-line down-mouse-1] fun)
- (define-key keymap [header-line down-mouse-2] fun)
- (put-text-property tbeg nend 'local-map keymap))))
- ))))
+ ;; Don't bind mouse events on the header line if we
+ ;; aren't going to display the header line.
+ (when Info-use-header-line
+ (let ((fun (cdr (assoc tag '(("Prev" . Info-prev)
+ ("Next" . Info-next)
+ ("Up" . Info-up))))))
+ (when fun
+ (let ((keymap (make-sparse-keymap)))
+ (define-key keymap [header-line down-mouse-1] fun)
+ (define-key keymap [header-line down-mouse-2] fun)
+ (put-text-property tbeg nend 'local-map keymap))))
+ )))))
(goto-char (point-min))
(while (re-search-forward "\n\\([^
\t\n].+\\)\n\\(\\*+\\|=+\\|-+\\|\\.+\\)$"
nil t)