Function: Man-possibly-hyphenated-word
Man-possibly-hyphenated-word is a byte-compiled function defined in
man.el.gz.
Signature
(Man-possibly-hyphenated-word)
Documentation
Return a possibly hyphenated word at point.
If the word starts at the first non-whitespace column, and the
previous line ends with a hyphen, return the last word on the previous
line instead. Thus, if a reference to "tcgetpgrp(3V)" is hyphenated
as "tcgetp-grp(3V)", and point is at "grp(3V)", we return
"tcgetp-" instead of "grp".
Source Code
;; Defined in /usr/src/emacs/lisp/man.el.gz
(defun Man-possibly-hyphenated-word ()
"Return a possibly hyphenated word at point.
If the word starts at the first non-whitespace column, and the
previous line ends with a hyphen, return the last word on the previous
line instead. Thus, if a reference to \"tcgetpgrp(3V)\" is hyphenated
as \"tcgetp-grp(3V)\", and point is at \"grp(3V)\", we return
\"tcgetp-\" instead of \"grp\"."
(save-excursion
(skip-syntax-backward "w()")
(skip-chars-forward " \t")
(let ((beg (point))
(word (current-word)))
(when (eq beg (save-excursion
(back-to-indentation)
(point)))
(end-of-line 0)
(if (eq (char-before) ?-)
(setq word (current-word))))
word)))