From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Romain FRANCOISE Newsgroups: gmane.emacs.devel Subject: Patch to disable links line in *info* buffer Date: Thu, 06 Jun 2002 20:32:30 +0200 Organization: orebokech dot com Sender: emacs-devel-admin@gnu.org Message-ID: <87bsaos1fl.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 1023388457 30490 127.0.0.1 (6 Jun 2002 18:34:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 6 Jun 2002 18:34:17 +0000 (UTC) Cc: 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 17G25R-0007vR-00 for ; Thu, 06 Jun 2002 20:34:17 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17G2QR-000380-00 for ; Thu, 06 Jun 2002 20:56:00 +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 17G24M-0007Bk-00; Thu, 06 Jun 2002 14:33:10 -0400 Original-Received: from cismrelais.univ-lyon1.fr ([134.214.101.250]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 17G23P-00073T-00; Thu, 06 Jun 2002 14:32:11 -0400 Original-Received: by cismrelais.univ-lyon1.fr (Postfix, from userid 1000) id 3CAE637EDC; Thu, 6 Jun 2002 20:32:10 +0200 (CEST) Original-Received: from J446-b.resJ.insa-lyon.fr (J446-b.resJ.insa-lyon.fr [134.214.166.6]) by cismrelais.univ-lyon1.fr (Postfix) with ESMTP id 2132633B29; Thu, 6 Jun 2002 20:32:09 +0200 (CEST) Original-Received: by J446-b.resJ.insa-lyon.fr (Postfix, from userid 1000) id 5194A1C06C; Thu, 6 Jun 2002 20:32:31 +0200 (CEST) Original-To: rms@gnu.org Original-Lines: 89 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu) X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) 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:4616 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4616 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 | This is a man's man's man's it's a miracle -- http://orebokech.com/ | world.--James Brown