]> git.eshelyaron.com Git - emacs.git/commitdiff
(Man-default-man-entry): Don't look for all word chars,
authorRichard M. Stallman <rms@gnu.org>
Sat, 26 Oct 2002 22:37:54 +0000 (22:37 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 26 Oct 2002 22:37:54 +0000 (22:37 +0000)
look only for characters that are normally part of a shell command.

lisp/man.el

index 1cf5f498ca23500ec2d6f4cff349eda009d8f59b..c5a5acd1282e6fa23dc72fb67d3a0b6df2931c9a 100644 (file)
@@ -497,7 +497,10 @@ This guess is based on the text surrounding the cursor."
     (save-excursion
       ;; Default man entry title is any word the cursor is on, or if
       ;; cursor not on a word, then nearest preceding word.
-      (setq word (current-word))
+      (skip-chars-backward "-a-zA-Z0-9._+:")
+      (let ((start (point)))
+       (skip-chars-forward "-a-zA-Z0-9._+:")
+       (setq word (buffer-substring start (point))))
       (if (string-match "[._]+$" word)
          (setq word (substring word 0 (match-beginning 0))))
       ;; If looking at something like ioctl(2) or brc(1M), include the