From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Patch to disable links line in *info* buffer Date: 10 Jun 2002 01:04:14 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <5xn0u49hqp.fsf@kfs2.cua.dk> References: <87bsaos1fl.fsf@orebokech.com> <200206072322.g57NMtK27277@aztec.santafe.edu> <5xbsam1tje.fsf@kfs2.cua.dk> <87wut9tppe.fsf@orebokech.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1023660398 15529 127.0.0.1 (9 Jun 2002 22:06:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 9 Jun 2002 22:06:38 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17HApa-00042M-00 for ; Mon, 10 Jun 2002 00:06:38 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17HBC7-00059g-00 for ; Mon, 10 Jun 2002 00:29:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17HAp4-0005Am-00; Sun, 09 Jun 2002 18:06:06 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 17HAmb-00050P-00; Sun, 09 Jun 2002 18:03:33 -0400 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 57A427C016; Sun, 9 Jun 2002 22:03:31 +0000 (GMT) Original-To: Romain FRANCOISE In-Reply-To: <87wut9tppe.fsf@orebokech.com> Original-Lines: 71 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4675 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4675 Romain FRANCOISE 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 http://www.cua.dk