Function: Info-context-menu

Info-context-menu is a byte-compiled function defined in info.el.gz.

Signature

(Info-context-menu MENU CLICK)

Documentation

Populate MENU with Info commands at CLICK.

Source Code

;; Defined in /usr/src/emacs/lisp/info.el.gz
(defun Info-context-menu (menu click)
  "Populate MENU with Info commands at CLICK."
  (define-key menu [Info-separator] menu-bar-separator)
  (let ((easy-menu (make-sparse-keymap "Info")))
    (easy-menu-define nil easy-menu nil
      '("Info"
        ["Back in History" Info-history-back :visible Info-history
         :help "Go back in history to the last node you were at"]
        ["Forward in History" Info-history-forward :visible Info-history-forward
         :help "Go forward in history"]))
    (dolist (item (reverse (lookup-key easy-menu [menu-bar info])))
      (when (consp item)
        (define-key menu (vector (car item)) (cdr item)))))

  (when (mouse-posn-property (event-start click) 'mouse-face)
    (define-key menu [Info-mouse-follow-nearest-node]
      '(menu-item "Follow Link" Info-mouse-follow-nearest-node
                  :help "Follow a link where you click")))

  menu)