Function: Man-build-references-alist
Man-build-references-alist is a byte-compiled function defined in
man.el.gz.
Signature
(Man-build-references-alist)
Documentation
Build the list of references (in the SEE ALSO section).
Source Code
;; Defined in /usr/src/emacs/lisp/man.el.gz
(defsubst Man-build-references-alist ()
"Build the list of references (in the SEE ALSO section)."
(setq Man--refpages nil)
(save-excursion
(if (Man-find-section Man-see-also-regexp)
(let ((start (progn (forward-line 1) (point)))
(end (progn
(Man-next-section 1)
(point)))
hyphenated
(runningpoint -1))
(save-restriction
(narrow-to-region start end)
(goto-char (point-min))
(back-to-indentation)
(while (and (not (eobp)) (/= (point) runningpoint))
(setq runningpoint (point))
(if (re-search-forward Man-hyphenated-reference-regexp end t)
(let* ((word (match-string 0))
(len (1- (length word))))
(if hyphenated
(setq word (concat hyphenated word)
hyphenated nil
;; Update len, in case a reference spans
;; more than two lines (paranoia).
len (1- (length word))))
(if (memq (aref word len) '(?- ?))
(setq hyphenated (substring word 0 len)))
(and (string-match Man-reference-regexp word)
(not (member word Man--refpages))
(push word Man--refpages))))
(skip-chars-forward " \t\n,"))))))
(setq Man--refpages (nreverse Man--refpages)))