GNU bug report logs -
#14405
24.3.50; read-regexp-defaults-function
Previous Next
Reported by: Juri Linkov <juri <at> jurta.org>
Date: Wed, 15 May 2013 00:02:01 UTC
Severity: wishlist
Found in version 24.3.50
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
Message #37 received at 14405 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> jurta.org> writes:
>> I depend on occur and rgrep. For occur, I want the symbol delimiters.
>> For rgrep, a mere tag at point will do. If one were to use multi-occur
>> from Buffer menu mode, a symbol match doesn't make sense.
>
> You can use `this-command' for different defaults of different commands
> in a customized function like you wrote in the docstring that is
> still preserved in `read-regexp-defaults-function'.
For the benefit of googler out there.
(setq read-regexp-defaults-function
(lambda nil
(pcase this-command
(`rgrep (find-tag-default-as-regexp))
(_ (find-tag-default-as-symbol-regexp)))))
It would be a good idea to choose a different name for
find-tag-default-*? The function retrieves the tag-at-point but doesn't
find it (as in M-.). So "find" is misleading.
This bug report was last modified 11 years and 143 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.