[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Info-try-follow-nearest-node: FORK arg is not described

From: Drew Adams
Subject: RE: Info-try-follow-nearest-node: FORK arg is not described
Date: Tue, 13 Jun 2006 07:10:47 -0700

    > Info-try-follow-nearest-node: FORK arg is not described.

    Isn't the FORK argument obsoleted by M-n?

I hope not. I use it to define these simple new-window versions of the
follow commands, which I bind to `S-mouse-2' and `S-return', respectively:

(defun Info-mouse-follow-nearest-node-new-window (click)
  "Open the link at the mouse pointer in a new window."
  (interactive "e")
  (Info-mouse-follow-nearest-node click t))

(defun Info-follow-nearest-node-new-window ()
  "Open the link near the text cursor in a new window."
  (Info-follow-nearest-node t))

I mentioned these commands in my June 10 emacs-devel mail, subject "minor
enhancements for links: open Info link in new window...". They are quite
handy, even if trivial.

For the mouse command, it's true that I had to add FORK, redefining the
standard `Info-mouse-follow-nearest-node':

(when (>= emacs-major-version 21)
  (defun Info-mouse-follow-nearest-node (click &optional fork)
    "\\<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 you click.
At end of the node's text, moves to the next node, or up if none.

With a prefix argument, open the node in a separate window."
    (interactive "e\nP")
    (mouse-set-point click)
    (and (not (Info-try-follow-nearest-node fork))
         (save-excursion (forward-line 1) (eobp))

I'm using Emacs CVS from 2006/03/20; the FORK arg is defined for the
non-mouse command in that version at least.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]