emacs-devel
[Top][All Lists]
Advanced

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

Enhance progmodes/grep.el:grep-tag-default


From: Evgeny Zajcev
Subject: Enhance progmodes/grep.el:grep-tag-default
Date: Fri, 21 Oct 2016 15:55:53 +0300

Hello, why not use last value from `grep-regexp-history' if `grep-tag-default' is unable to find default tag?

I know user can do it by customizing `find-tag-default-function', but why not make it the default behaivour?  That is quite convenient

So `grep-tag-default' will look like:

    (defun grep-tag-default ()
      (or (and transient-mark-mode mark-active
           (/= (point) (mark))
           (buffer-substring-no-properties (point) (mark)))
          (funcall (or find-tag-default-function
               (get major-mode 'find-tag-default-function)
               'find-tag-default))
          (car grep-regexp-history)
          ""))

thanks

--
lg

reply via email to

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