Function: Info-extract-menu-node-name

Info-extract-menu-node-name is a byte-compiled function defined in info.el.gz.

Signature

(Info-extract-menu-node-name &optional MULTI-LINE INDEX-NODE)

Source Code

;; Defined in /usr/src/emacs/lisp/info.el.gz
(defun Info-extract-menu-node-name (&optional multi-line index-node)
  (skip-chars-forward " \t\n")
  (when (looking-at (concat Info-menu-entry-name-re ":\\(:\\|"
			    (Info-following-node-name-re
                             (cond
                              (index-node "^,\t\n")
                              (multi-line "^.,\t")
                              (t          "^.,\t\n")))
                            "\\)"
                            (if index-node
                                "\\.\\(?:[ \t\n]+(line +\\([0-9]+\\))\\)?"
                              "")))
    (if index-node
        (setq Info-point-loc
              (if (match-beginning 5)
                  (string-to-number (match-string 5))
                (buffer-substring-no-properties
		 (match-beginning 0) (1- (match-beginning 1)))))
;;; Uncomment next line to use names of cross-references in non-index nodes:
;;;       (setq Info-point-loc
;;;             (buffer-substring (match-beginning 0) (1- (match-beginning 1))))
      )
    (info--node-canonicalize-whitespace
     (or (and (not (equal (match-string-no-properties 2) ""))
	      (match-string-no-properties 2))
	 ;; If the node name is the menu entry name (using `entry::').
	 (buffer-substring-no-properties
	  (match-beginning 0) (1- (match-beginning 1)))))))