[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch to disable links line in *info* buffer
From: |
Kim F. Storm |
Subject: |
Re: Patch to disable links line in *info* buffer |
Date: |
10 Jun 2002 01:04:14 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Romain FRANCOISE <address@hidden> writes:
> Kim F Storm writes:
>
> > Nobody seems to like it. Are there really any real
> > reasons why this is good?
>
> I'll second Kim's opinion. As is, this extra header line is useless,
> unless one wants to copy it, but it seems like nobody ever had to.
>
> Kim's patch looks good to me, even though it breaks something with the
> header line, and shouldn't be applied in its current state.
I noticed that myself. The following patch should fix this:
Index: info.el
===================================================================
RCS file: /cvs/emacs/lisp/info.el,v
retrieving revision 1.304
diff -c -r1.304 info.el
*** info.el 9 Jun 2002 00:18:15 -0000 1.304
--- info.el 9 Jun 2002 22:01:37 -0000
***************
*** 1031,1043 ****
header-end t)
(match-beginning 1)
(point))))
! (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.
--- 1031,1050 ----
header-end t)
(match-beginning 1)
(point))))
! (let ((buffer-read-only nil))
! (remove-text-properties (point-min) (1+ header-end) '(invisible nil))
! (set (make-local-variable 'Info-header-line)
! (buffer-substring header-beg header-end))
! (setq header-line-format 'Info-header-line)
! (add-text-properties (point-min) (1+ header-end) '(invisible t)))
))
+
+ (defun Info-toggle-header-visible ()
+ (interactive)
+ (let ((buffer-read-only nil))
+ (goto-char (point-min))
+ (alter-text-property (point) (1+ (line-end-position))
+ 'invisible #'null)))
;; Go to an info node specified with a filename-and-nodename string
;; of the sort that is found in pointers in nodes.
***************
*** 2095,2100 ****
--- 2102,2108 ----
(define-key Info-mode-map "9" 'Info-nth-menu-item)
(define-key Info-mode-map "0" 'undefined)
(define-key Info-mode-map "?" 'Info-summary)
+ (define-key Info-mode-map "+" 'Info-toggle-header-visible)
(define-key Info-mode-map "]" 'Info-forward-node)
(define-key Info-mode-map "[" 'Info-backward-node)
(define-key Info-mode-map "<" 'Info-top-node)
--
Kim F. Storm <address@hidden> http://www.cua.dk
- Re: Patch to disable links line in *info* buffer, (continued)
- Re: Patch to disable links line in *info* buffer, Richard Stallman, 2002/06/21
- Re: Patch to disable links line in *info* buffer, Robert J. Chassell, 2002/06/13
- Re: Patch to disable links line in *info* buffer, Andreas Schwab, 2002/06/13
- Message not available
- Re: Patch to disable links line in *info* buffer, Robert J. Chassell, 2002/06/13
- Re: Patch to disable links line in *info* buffer, Kim F. Storm, 2002/06/13
- Re: Patch to disable links line in *info* buffer, Richard Stallman, 2002/06/14
- Patch for emacs-lisp-intro.texi, Christian Egli, 2002/06/17
- Re: Patch to disable links line in *info* buffer, Richard Stallman, 2002/06/11
- Re: Patch to disable links line in *info* buffer,
Kim F. Storm <=
- Re: Patch to disable links line in *info* buffer, Richard Stallman, 2002/06/10
- Re: Patch to disable links line in *info* buffer, Eli Zaretskii, 2002/06/10
- Re: Patch to disable links line in *info* buffer, Richard Stallman, 2002/06/09
- Re: Patch to disable links line in *info* buffer, Kai Großjohann, 2002/06/09
- Re: Patch to disable links line in *info* buffer, Kim F. Storm, 2002/06/09
- Re: Patch to disable links line in *info* buffer, Richard Stallman, 2002/06/10
- Re: Patch to disable links line in *info* buffer, Karl Eichwalder, 2002/06/10
- Re: Patch to disable links line in *info* buffer, Miles Bader, 2002/06/10
- Re: Patch to disable links line in *info* buffer, Richard Stallman, 2002/06/10
- Re: Patch to disable links line in *info* buffer, Miles Bader, 2002/06/10