From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: info Date: Sat, 8 Feb 2003 22:45:50 -0600 (CST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200302090445.WAA00717@eel.dms.auburn.edu> References: <200302052007.OAA20921@eel.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1044765847 18556 80.91.224.249 (9 Feb 2003 04:44:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 9 Feb 2003 04:44:07 +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.35 #1 (Debian)) id 18hjJx-0004p1-00 for ; Sun, 09 Feb 2003 05:44:01 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18hjUJ-0001jY-00 for ; Sun, 09 Feb 2003 05:54:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18hjLT-000782-04 for emacs-devel@quimby.gnus.org; Sat, 08 Feb 2003 23:45:35 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18hjL5-00074e-00 for emacs-devel@gnu.org; Sat, 08 Feb 2003 23:45:11 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18hjL3-00074T-00 for emacs-devel@gnu.org; Sat, 08 Feb 2003 23:45:10 -0500 Original-Received: from manatee.dms.auburn.edu ([131.204.53.104]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18hjL2-000721-00; Sat, 08 Feb 2003 23:45:08 -0500 Original-Received: from eel.dms.auburn.edu (eel.dms.auburn.edu [131.204.53.108]) by manatee.dms.auburn.edu (8.9.1a/8.9.1) with ESMTP id WAA13324; Sat, 8 Feb 2003 22:45:03 -0600 (CST) Original-Received: (from teirllm@localhost) by eel.dms.auburn.edu (8.9.3+Sun/8.9.3) id WAA00717; Sat, 8 Feb 2003 22:45:50 -0600 (CST) X-Authentication-Warning: eel.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: teirllm@dms.auburn.edu In-reply-to: <200302052007.OAA20921@eel.dms.auburn.edu> (message from Luc Teirlinck on Wed, 5 Feb 2003 14:07:44 -0600 (CST)) Original-cc: eliz@is.elta.co.il Original-cc: rms@gnu.org Original-cc: karl@freefriends.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11511 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11511 Included is a change log entry and patch that implements the new behavior for RETURN in the Emacs version of info, using the algorithm suggested by Kai and Richard. Change log: 2003-02-08 Luc Teirlinck * info.el (Info-follow-nearest-node): Implement new behavior. Patch: ===File ~/infodiff========================================== cd /usr/local/share/emacs/21.3.50/lisp/ diff -c /usr/local/share/emacs/21.3.50/lisp/info.old.el /usr/local/share/emacs/21.3.50/lisp/info.el *** /usr/local/share/emacs/21.3.50/lisp/info.old.el Sat Feb 8 20:43:13 2003 --- /usr/local/share/emacs/21.3.50/lisp/info.el Sat Feb 8 22:12:39 2003 *************** *** 2113,2124 **** (Info-next-preorder))) (defun Info-follow-nearest-node () ! "\\Follow a node reference near point. ! Like \\[Info-menu], \\[Info-follow-reference], \\[Info-next], \\[Info-prev] or \\[Info-up] command, depending on where point is. ! If no reference to follow, moves to the next node, or up if none." (interactive) (or (Info-try-follow-nearest-node) ! (Info-next-preorder))) ;; Common subroutine. (defun Info-try-follow-nearest-node () --- 2113,2134 ---- (Info-next-preorder))) (defun Info-follow-nearest-node () ! "Follow a node reference near point. ! If point is on a reference, follow that reference. Otherwise, ! if point is in a menu item description, follow that menu item." (interactive) (or (Info-try-follow-nearest-node) ! (when (save-excursion ! (search-backward "\n* menu:" nil t)) ! (save-excursion ! (beginning-of-line) ! (while (not (or (bobp) (looking-at "[^ \t]\\|[ \t]*$"))) ! (beginning-of-line 0)) ! (when (looking-at "\\* +\\([^\t\n]*\\):") ! (Info-goto-node ! (Info-extract-menu-item (match-string-no-properties 1))) ! t))) ! (error "Point neither on reference nor in menu item description"))) ;; Common subroutine. (defun Info-try-follow-nearest-node () Diff finished at Sat Feb 8 22:19:44 ============================================================