diff options
| author | Richard M. Stallman | 2002-10-26 22:37:54 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-10-26 22:37:54 +0000 |
| commit | 146afb5f31f4caaca64629909f8b79f490e6aa57 (patch) | |
| tree | 0cf50fab34410597519ccd0393693f231469ad0d | |
| parent | 3def0d249326998b8353178cf14088f4b890e2b4 (diff) | |
| download | emacs-146afb5f31f4caaca64629909f8b79f490e6aa57.tar.gz emacs-146afb5f31f4caaca64629909f8b79f490e6aa57.zip | |
(Man-default-man-entry): Don't look for all word chars,
look only for characters that are normally part of a shell command.
| -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." | |||
| 497 | (save-excursion | 497 | (save-excursion |
| 498 | ;; Default man entry title is any word the cursor is on, or if | 498 | ;; Default man entry title is any word the cursor is on, or if |
| 499 | ;; cursor not on a word, then nearest preceding word. | 499 | ;; cursor not on a word, then nearest preceding word. |
| 500 | (setq word (current-word)) | 500 | (skip-chars-backward "-a-zA-Z0-9._+:") |
| 501 | (let ((start (point))) | ||
| 502 | (skip-chars-forward "-a-zA-Z0-9._+:") | ||
| 503 | (setq word (buffer-substring start (point)))) | ||
| 501 | (if (string-match "[._]+$" word) | 504 | (if (string-match "[._]+$" word) |
| 502 | (setq word (substring word 0 (match-beginning 0)))) | 505 | (setq word (substring word 0 (match-beginning 0)))) |
| 503 | ;; If looking at something like ioctl(2) or brc(1M), include the | 506 | ;; If looking at something like ioctl(2) or brc(1M), include the |