emacs-devel
[Top][All Lists]
Advanced

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

Patch to disable links line in *info* buffer


From: Romain FRANCOISE
Subject: Patch to disable links line in *info* buffer
Date: Thu, 06 Jun 2002 20:32:30 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu)

Richard,

the change you made to info.el to make the links line show up at the top
of the *info* buffer didn't seem to be very popular, and I myself find
it quite useless, since I never ever had to copy this particular line
out of the buffer.

Following Miles Bader's suggestion, I propose the following patch, it
makes the behavior optional, and disabled by default. Does it look
reasonable to you?

Thank you.



Index: lisp/info.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/info.el,v
retrieving revision 1.302
diff -c -r1.302 info.el
*** lisp/info.el        3 Jun 2002 22:57:40 -0000       1.302
--- lisp/info.el        6 Jun 2002 18:15:09 -0000
***************
*** 86,91 ****
--- 86,99 ----
    :type 'boolean
    :group 'info)
  
+ (defcustom Info-show-links-in-buffer nil
+   "*Non-nil means to put the beginning-of-node links at the top of the buffer.
+ This is convenient if you need to copy the links line out of the buffer using
+ M-w. Please note that if you choose not to use the header line, links will
+ be showed in the buffer regardless of the state of this option."
+   :type 'boolean
+   :group 'info)
+ 
  (defface info-header-xref
    '((t (:inherit info-xref)))
    "Face for Info cross-references in a node header."
***************
*** 1034,1043 ****
      (set (make-local-variable 'Info-header-line)
         (buffer-substring header-beg header-end))
      (setq header-line-format 'Info-header-line)
! ;;; It is useful to be able to copy the links line out of the buffer
! ;;; with M-w.
! ;;;    (narrow-to-region (1+ header-end) (point-max))
!     ))
  
  ;; Go to an info node specified with a filename-and-nodename string
  ;; of the sort that is found in pointers in nodes.
--- 1042,1049 ----
      (set (make-local-variable 'Info-header-line)
         (buffer-substring header-beg header-end))
      (setq header-line-format 'Info-header-line)
!     (when (not Info-show-links-in-buffer)
!       (narrow-to-region (1+ header-end) (point-max)))))
  
  ;; Go to an info node specified with a filename-and-nodename string
  ;; of the sort that is found in pointers in nodes.
***************
*** 1247,1256 ****
      (save-excursion
        (save-restriction
        (goto-char (point-min))
! ;;;   (when Info-header-line
! ;;;     ;; expose the header line in the buffer
! ;;;     (widen)
! ;;;     (forward-line -1))
        (let ((bound (point)))
          (forward-line 1)
          (cond ((re-search-backward (concat name ":") bound t)
--- 1253,1263 ----
      (save-excursion
        (save-restriction
        (goto-char (point-min))
!       (when (and Info-header-line (not Info-show-links-in-buffer))
!         ;; expose the header line in the buffer if it's
!         ;; not there already
!         (widen)
!         (forward-line -1))
        (let ((bound (point)))
          (forward-line 1)
          (cond ((re-search-backward (concat name ":") bound t)


-- 
Romain FRANCOISE <address@hidden> | This is a man's man's man's
it's a miracle -- http://orebokech.com/ | world.--James Brown




reply via email to

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