changeset 48012:73c9cc6e8538

(Man-default-man-entry): Don't look for all word chars, look only for characters that are normally part of a shell command.
author Richard M. Stallman <rms@gnu.org>
date Sat, 26 Oct 2002 22:37:54 +0000
parents 6ee65f935a8c
children d3416b0f856c
files lisp/man.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/man.el	Sat Oct 26 22:37:04 2002 +0000
+++ b/lisp/man.el	Sat Oct 26 22:37:54 2002 +0000
@@ -497,7 +497,10 @@
     (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