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

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

bug#18241: 24.4.50; [PATCH] I can now highlight-lines-matching-regexp fr


From: Juri Linkov
Subject: bug#18241: 24.4.50; [PATCH] I can now highlight-lines-matching-regexp from isearch
Date: Mon, 01 Jul 2019 00:12:47 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

> Given that 'M-s h r' is handled specially in isearch already, it only
> makes sense that 'M-s h l' would be too. And there's no down side to
> supporting this at all.

Yes, it makes sense to do the same that 'M-s h r' already does.

> I'm attaching a new patch. It does away with the weird macro thing I was
> doing (don't know why I was doing that), and adds notes in the NEWS and
> the documentation.

Thanks, indeed better to avoid macros: we have 2 macros in isearch,
and they are more of a hindrance than a help especially during development.

> +@kindex M-s h l @r{(Incremental Search)}
> +@findex isearch-highlight-lines-matching-regexp
> +  Similarly, you can exit the search while highlighting whole lines
> +containing matches of the last search string.  To this end, type
> +@kbd{M-s h l} (@code{isearch-highlight-lines-matching-regexp}), which
> +will run @code{highlight-lines-matching-regexp} (@pxref{Highlight
> +Interactively}) passing it the regexp derived from the last search
> +string and prompting you for the face to use for highlighting.  To
> +remove the highlighting, type @kbd{M-s h u} (@code{unhighlight-regexp}).

Maybe it's possible to make the text shorter by just adding a new sentence
about 'M-s h l' to the middle of the paragraph that describes 'M-s h r'?

> -(defun isearch-highlight-regexp ()
> +(defun isearch--highlight-regexp-or-lines-internal (hi-lock-func)

The suffix '-internal' is not necessary here because the double dash
in 'isearch--' implies that the function is internal.





reply via email to

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