aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2007-09-13 08:01:54 +0000
committerGlenn Morris <[email protected]>2007-09-13 08:01:54 +0000
commit162a12b1d7b1e985a8810bad24d068c825286f56 (patch)
tree584510272fa8a1a840a19b23c7fa6f7d9c438142 /lisp
parent14bc401e0d5afef54f7fe8b310991cab92e68a25 (diff)
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/man.el8
2 files changed, 12 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 522704335a..477723cdb1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-13 Jari Aalto <[email protected]>
+
+ * man.el (Man-default-man-entry): At end of line, continue looking
+ to the next line for possible end of hyphenated command.
+
2007-09-13 Chris Moore <[email protected]>
* shell.el (shell-resync-dirs): Don't move the cursor relative to
diff --git a/lisp/man.el b/lisp/man.el
index c7593e88dd..52172a5ee2 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -652,7 +652,13 @@ If POS is nil, the current point is used."
(skip-chars-backward "-a-zA-Z0-9._+:")
(let ((start (point)))
(skip-chars-forward "-a-zA-Z0-9._+:")
- (setq word (buffer-substring-no-properties start (point))))
+ ;; If there is a continuation at the end of line, check the
+ ;; following line too, eg:
+ ;; see this-
+ ;; command-here(1)
+ (setq word (buffer-substring-no-properties start (point)))
+ (if (looking-at "[ \t\r\n]+\\([-a-zA-Z0-9._+:]+\\)([0-9])")
+ (setq word (concat word (match-string 1)))))
(if (string-match "[._]+$" word)
(setq word (substring word 0 (match-beginning 0))))
;; If looking at something like *strcat(... , remove the '*'