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

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

Re: Underscore in filenames and M-x locate


From: Kevin Rodgers
Subject: Re: Underscore in filenames and M-x locate
Date: Thu, 03 May 2007 00:19:54 -0600
User-agent: Thunderbird 1.5.0.10 (Macintosh/20070221)

Holger Sparr wrote:
When using M-x locate the default pattern to use is evaluated by
`locate-word-at-point'.
Why isn't the Underscore included in the expression of characters to
skip for a sensible default value?

Uh, because underscore is not a _word_ constituent character?
Still, locate-word-at-point could be changed to use \sw instead
of [-a-zA-Z0-9.]

In any case, apparently it's been that way since Peter Breton's
original implementation on 2000-03-30.

Possibly the expression could be customized by the user or the active
region could be passed as the search-string.

You could try:

(require 'locate)
(defalias 'locate-word-at-point 'word-at-point)
(autoload 'word-at-point "thingatpt")

or:

(require 'locate)
(defalias 'locate-word-at-point
          (lambda () (symbol-name symbol-at-point)))

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

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