# HG changeset patch # User Eli Zaretskii # Date 1008959820 0 # Node ID cfb7f074df8619957e2fbd3147aa6b782313d6b0 # Parent 8a60ab4595b4ee62dfb4972d7af247bdb798c6fd (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. diff -r 8a60ab4595b4 -r cfb7f074df86 lisp/info.el --- a/lisp/info.el Fri Dec 21 15:22:06 2001 +0000 +++ b/lisp/info.el Fri Dec 21 18:37:00 2001 +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)