bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Emacs CVS: man.el: detect split word at end of line and grab it


From: Jari Aalto
Subject: [PATCH] Emacs CVS: man.el: detect split word at end of line and grab it
Date: Mon, 10 Sep 2007 21:52:37 +0300

2007-09-10  Jari Aalto  <jari.aalto AT cante.net>

        * man.el (Man-default-man-entry): At end of line, continue looking
        to the next line for possible end of hyphenated command.

diff --git a/man.el b/man.el
index c7593e8..338d6de 100644
--- a/man.el
+++ b/man.el
@@ -652,7 +652,16 @@ 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 continuation at the end of line, check
+        ;;  following line too:
+        ;;
+        ;;     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])")
+            (progn
+              (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 '*'





reply via email to

[Prev in Thread] Current Thread [Next in Thread]