Function: Info-apropos-find-node

Info-apropos-find-node is a byte-compiled function defined in info.el.gz.

Signature

(Info-apropos-find-node FILENAME NODENAME &optional NO-GOING-BACK)

Documentation

Apropos-specific implementation of Info-find-node-2.

Source Code

;; Defined in /usr/src/emacs/lisp/info.el.gz
(defun Info-apropos-find-node (_filename nodename &optional _no-going-back)
  "Apropos-specific implementation of `Info-find-node-2'."
  (if (equal nodename "Top")
      ;; Generate Top menu
      (let ((nodes (reverse Info-apropos-nodes)))
	(insert (format "\n\^_\nFile: %s,  Node: %s,  Up: (dir)\n\n"
			Info-apropos-file nodename))
	(insert "Apropos Index\n")
	(insert "*************\n\n")
	(insert "This is a list of search results produced by ‘info-apropos’.\n\n")
	(insert "* Menu:\n\n")
	(dolist (nodeinfo nodes)
	  (insert (format "* %-20s %s.\n"
			  (format "%s::" (nth 0 nodeinfo))
			  (nth 1 nodeinfo)))))
    ;; Else, Generate Index-like menu of matches
    (let* ((nodeinfo (assoc nodename Info-apropos-nodes))
	   (matches (nth 2 nodeinfo)))
      (when matches
	(insert (format "\n\^_\nFile: %s,  Node: %s,  Up: Top\n\n"
			Info-apropos-file nodename))
	(insert "Apropos Index\n")
	(insert "*************\n\n")
	(insert "Index entries that match ‘" (nth 1 nodeinfo) "’:\n\n")
	(insert "\0\b[index\0\b]\n")
	(if (eq matches t)
	    (insert "No matches found.\n")
	  (insert "* Menu:\n\n")
	  (dolist (entry matches)
	    (insert (format "* %-38s (%s)%s.%s\n"
			    (format "%s [%s]:" (nth 1 entry) (nth 0 entry))
			    (nth 0 entry)
			    (nth 2 entry)
			    (if (nth 3 entry)
				(format " (line %s)" (nth 3 entry))
			      "")))))))))