[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: info
From: |
Luc Teirlinck |
Subject: |
Re: info |
Date: |
Sat, 8 Feb 2003 22:45:50 -0600 (CST) |
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 <address@hidden>
* 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 ()
! "\\<Info-mode-map>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
============================================================
- Re: info, (continued)
- Re: info, Luc Teirlinck, 2003/02/01
- Re: info, Eli Zaretskii, 2003/02/02
- Re: info, Stefan Monnier, 2003/02/03
- Re: info, Luc Teirlinck, 2003/02/03
- Re: info, Richard Stallman, 2003/02/04
- Re: info, Eli Zaretskii, 2003/02/05
- Re: info, Luc Teirlinck, 2003/02/05
- Re: info,
Luc Teirlinck <=