unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Enhance progmodes/grep.el:grep-tag-default
@ 2016-10-21 12:55 Evgeny Zajcev
  0 siblings, 0 replies; only message in thread
From: Evgeny Zajcev @ 2016-10-21 12:55 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 978 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-10-21 12:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-21 12:55 Enhance progmodes/grep.el:grep-tag-default Evgeny Zajcev

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).