[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to
From: |
Lars Ingebrigtsen |
Subject: |
bug#18697: 25.0.50; [PATCH] hi-lock interactive functions now default to the active region, if there is one |
Date: |
Sat, 29 Jun 2019 12:14:30 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Juri Linkov <juri@linkov.net> writes:
>> Hm... I think this sounds kinda unusual? We don't have any other
>> prompting functions that default to using the contents of the region (if
>> it's active), I think?
>
> Wouldn't the following patch satisfy the request by allowing to use
> M-n M-n to fetch the active region in the hi-lock command prompt:
[...]
> appends the list returned by this function to the end of values available
> via \\<minibuffer-local-map>\\[next-history-element]."
> (list
> + (when (use-region-p)
> + (buffer-substring-no-properties (region-beginning) (region-end)))
> (find-tag-default-as-regexp)
> (find-tag-default-as-symbol-regexp)
> (car regexp-search-ring)
That's still a rather unusual way for a command to work, I think.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no