aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2001-01-11 16:41:38 +0000
committerEli Zaretskii2001-01-11 16:41:38 +0000
commit6e961dcde2fdad36006f4e17df4b7d41d531cefd (patch)
treea70bb1b4f875f6a54ba6bbe71867197714a80c1c
parentd527b615a22d39e58f1c6c0e18c272fd9a1b9d2c (diff)
downloademacs-6e961dcde2fdad36006f4e17df4b7d41d531cefd.tar.gz
emacs-6e961dcde2fdad36006f4e17df4b7d41d531cefd.zip
(Info-setup-header-line): If the node header includes
either Next: or Prev: links, don't show the File: and Node: parts in the header line.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/info.el20
2 files changed, 21 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 59e408c7e22..04549011028 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12001-01-11 Eli Zaretskii <eliz@is.elta.co.il>
2
3 * info.el (Info-setup-header-line): If the node header includes
4 either Next: or Prev: links, don't show the File: and Node: parts
5 in the header line.
6
12001-01-11 Gerd Moellmann <gerd@gnu.org> 72001-01-11 Gerd Moellmann <gerd@gnu.org>
2 8
3 * comint.el (comint-goto-process-mark): Don't print a message 9 * comint.el (comint-goto-process-mark): Don't print a message
diff --git a/lisp/info.el b/lisp/info.el
index a298607785d..dc9a7b7dea9 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -984,11 +984,21 @@ Bind this in case the user sets it to nil."
984;; should be called when the node is already narrowed. 984;; should be called when the node is already narrowed.
985(defun Info-setup-header-line () 985(defun Info-setup-header-line ()
986 (goto-char (point-min)) 986 (goto-char (point-min))
987 (forward-line 1) 987 (let* ((case-fold-search t)
988 (set (make-local-variable 'Info-header-line) 988 (header-end (save-excursion (forward-line 1) (1- (point))))
989 (buffer-substring (point-min) (1- (point)))) 989 ;; If we find neither Next: nor Prev: link, show the entire
990 (setq header-line-format 'Info-header-line) 990 ;; node header. Otherwise, don't show the File: and Node:
991 (narrow-to-region (point) (point-max))) 991 ;; parts, to avoid wasting precious space on information that
992 ;; is available in the mode line.
993 (header-beg (if (re-search-forward
994 "\\(next\\|prev[ious]*\\): "
995 header-end t)
996 (match-beginning 1)
997 (point))))
998 (set (make-local-variable 'Info-header-line)
999 (buffer-substring header-beg header-end))
1000 (setq header-line-format 'Info-header-line)
1001 (narrow-to-region (1+ header-end) (point-max))))
992 1002
993;; Go to an info node specified with a filename-and-nodename string 1003;; Go to an info node specified with a filename-and-nodename string
994;; of the sort that is found in pointers in nodes. 1004;; of the sort that is found in pointers in nodes.