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

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

Re: M-x man could better guess neighboring word


From: martin rudalics
Subject: Re: M-x man could better guess neighboring word
Date: Fri, 14 Dec 2007 10:40:55 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

My cursor is at "_":
jidanni@fartzwadd:~$ crontab _
and I do M-x man, and it doesn't prompt me with the default of
crontab, instead I have to move the cursor back a bit and try again.
emacs-version "22.1.1"

Please try the attached patch.  Would you find it useful to
search previous lines, the remainder of the current line,
following lines?  Should we skip any non-whitespace chars?

*** man.el.~1.167.2.6.~ Thu Nov 29 19:51:20 2007
--- man.el      Fri Dec 14 10:22:56 2007
***************
*** 652,657 ****
--- 652,658 ----
        (if pos (goto-char pos))
        ;; Default man entry title is any word the cursor is on, or if
        ;; cursor not on a word, then nearest preceding word.
+       (skip-chars-backward " \t")
        (skip-chars-backward "-a-zA-Z0-9._+:")
        (let ((start (point)))
        (skip-chars-forward "-a-zA-Z0-9._+:")


reply via email to

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