]> git.eshelyaron.com Git - emacs.git/commitdiff
(Info-select-node): If Info-use-header-line is nil, set
authorEli Zaretskii <eliz@gnu.org>
Fri, 21 Dec 2001 18:38:52 +0000 (18:38 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 21 Dec 2001 18:38:52 +0000 (18:38 +0000)
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.

lisp/ChangeLog
lisp/info.el

index ec18c63df3c823c09fa3610da90b9c49063b9f0d..5c1c86df486043a91b060c948922bf14960c2138 100644 (file)
@@ -1,5 +1,10 @@
 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.
+
        * ls-lisp.el (insert-directory): Insert the amount of free disk
        space, like files.el's insert-directory does.
 
index 164c5e9d1f5b95d7ba5fcefae5c5309ef04e9a85..cc90027a77fa2ce07b624ece70315234b1cc4e32 100644 (file)
@@ -999,7 +999,8 @@ Bind this in case the user sets it to nil."
        (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 @@ the variable `Info-file-list-for-emacs'."
                                   '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)