comparison lisp/man.el @ 78771:28d0c39b6c3b

Jari Aalto <jari.aalto at cante.net> (Man-default-man-entry): At end of line, continue looking to the next line for possible end of hyphenated command.
author Glenn Morris <rgm@gnu.org>
date Thu, 13 Sep 2007 08:00:47 +0000
parents 0a3b41825002
children 456d7f1aaa98
comparison
equal deleted inserted replaced
78770:6db70c3a1837 78771:28d0c39b6c3b
650 ;; Default man entry title is any word the cursor is on, or if 650 ;; Default man entry title is any word the cursor is on, or if
651 ;; cursor not on a word, then nearest preceding word. 651 ;; cursor not on a word, then nearest preceding word.
652 (skip-chars-backward "-a-zA-Z0-9._+:") 652 (skip-chars-backward "-a-zA-Z0-9._+:")
653 (let ((start (point))) 653 (let ((start (point)))
654 (skip-chars-forward "-a-zA-Z0-9._+:") 654 (skip-chars-forward "-a-zA-Z0-9._+:")
655 (setq word (buffer-substring-no-properties start (point)))) 655 ;; If there is a continuation at the end of line, check the
656 ;; following line too, eg:
657 ;; see this-
658 ;; command-here(1)
659 (setq word (buffer-substring-no-properties start (point)))
660 (if (looking-at "[ \t\r\n]+\\([-a-zA-Z0-9._+:]+\\)([0-9])")
661 (setq word (concat word (match-string 1)))))
656 (if (string-match "[._]+$" word) 662 (if (string-match "[._]+$" word)
657 (setq word (substring word 0 (match-beginning 0)))) 663 (setq word (substring word 0 (match-beginning 0))))
658 ;; If looking at something like *strcat(... , remove the '*' 664 ;; If looking at something like *strcat(... , remove the '*'
659 (if (string-match "^*" word) 665 (if (string-match "^*" word)
660 (setq word (substring word 1))) 666 (setq word (substring word 1)))