Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
d0b560c6
Commit
d0b560c6
authored
Feb 10, 2003
by
Juanma Barranquero
Browse files
(Info-follow-nearest-node): Implement new behavior.
parent
9e3561d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
lisp/info.el
lisp/info.el
+14
-4
No files found.
lisp/info.el
View file @
d0b560c6
...
...
@@ -2113,12 +2113,22 @@ At end of the node's text, moves to the next node, or up if none."
(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.
I
f
no reference to follow, moves to the next node, or up if none
."
"Follow a node reference near point.
If point is on a
reference,
follow that reference. Otherwise,
i
f
point is in a menu item description, follow that menu item
."
(interactive)
(or (Info-try-follow-nearest-node)
(Info-next-preorder)))
(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 ()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment