diff options
author | Richard M. Stallman <rms@gnu.org> | 2002-10-26 22:37:54 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2002-10-26 22:37:54 +0000 |
commit | 146afb5f31f4caaca64629909f8b79f490e6aa57 (patch) | |
tree | 0cf50fab34410597519ccd0393693f231469ad0d /lisp/man.el | |
parent | 3def0d249326998b8353178cf14088f4b890e2b4 (diff) | |
download | emacs-146afb5f31f4caaca64629909f8b79f490e6aa57.tar.gz |
(Man-default-man-entry): Don't look for all word chars,
look only for characters that are normally part of a shell command.
Diffstat (limited to 'lisp/man.el')
-rw-r--r-- | lisp/man.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/man.el b/lisp/man.el index 1cf5f498ca2..c5a5acd1282 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -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 |