From: Heime <heimeborgia@protonmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Special hilighting for comments
Date: Sat, 10 Dec 2022 11:26:58 +0000 [thread overview]
Message-ID: <8G5PuSmODWraw7jK0Q3tIPzI7XiRoO5CQG3_gHh5Egkz_9nS3nRGR31nkkL-vrXl-u9rSo4QjMc72tefBKxMMsP2H6A9A7D_1rPkfeGU-lA=@protonmail.com> (raw)
In-Reply-To: <837cyzy0fw.fsf@gnu.org>
------- Original Message -------
On Saturday, December 10th, 2022 at 11:15 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> > Date: Sat, 10 Dec 2022 10:53:42 +0000
> > From: Heime heimeborgia@protonmail.com
> > Cc: help-gnu-emacs@gnu.org
> >
> > > > Emacs is missing out on a beneficial capability beyond just highlight symbols in other programming language modes.
> > >
> > > I don't think that's true: have you tried using the capabilities in
> > > hi-lock.el, as I suggested up-thread? That package can let you
> > > highlight anything.
> >
> > What do I need to do?
>
>
> Type "M-s h l" (or "M-x highlight-lines-matching-regexp RET").
How can I do it with elisp code. Highlighting lines starting with
";; [".
Thus in elisp-mode, how to achieve the following
;; [Highlighted line]
;; Some comment
;; Other comment
Have started with the following, whilst you suggest "highlight-lines-matching-regexp".
(defun hl-regexp ()
(interactive)
(highlight-regexp ";; [.*" some-face))
(defun hl-elisp ()
(add-to-list 'auto-mode-alist '("\\.el\\'" . hi-lock-mode))
(add-hook 'hi-lock-mode-hook 'hlregexp))
next prev parent reply other threads:[~2022-12-10 11:26 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-10 2:42 Special hilighting for comments Heime
2022-12-10 6:12 ` Marcin Borkowski
2022-12-10 6:23 ` Heime
2022-12-10 8:13 ` Eli Zaretskii
2022-12-10 8:14 ` Eli Zaretskii
2022-12-10 8:30 ` Heime
2022-12-10 8:49 ` Eli Zaretskii
2022-12-10 10:53 ` Heime
2022-12-10 11:15 ` Eli Zaretskii
2022-12-10 11:26 ` Heime [this message]
2022-12-10 14:21 ` Eli Zaretskii
2022-12-10 14:28 ` Heime
2022-12-10 15:52 ` Jean Louis
2022-12-10 17:11 ` Heime
2022-12-10 17:16 ` Eli Zaretskii
2022-12-10 17:39 ` Heime
2022-12-10 17:57 ` Thibaut Verron
2022-12-10 18:32 ` Eli Zaretskii
2022-12-12 0:59 ` Heime
2022-12-10 19:44 ` Jean Louis
2022-12-11 2:10 ` Heime
2022-12-11 2:37 ` Heime
2022-12-11 4:23 ` Jean Louis
2022-12-11 5:06 ` Heime
2022-12-11 9:06 ` Jean Louis
2022-12-11 6:54 ` tomas
2022-12-11 6:59 ` Heime
2022-12-11 7:24 ` tomas
2022-12-11 7:33 ` Heime
2022-12-11 7:47 ` tomas
2022-12-11 7:52 ` Heime
2022-12-11 8:55 ` tomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='8G5PuSmODWraw7jK0Q3tIPzI7XiRoO5CQG3_gHh5Egkz_9nS3nRGR31nkkL-vrXl-u9rSo4QjMc72tefBKxMMsP2H6A9A7D_1rPkfeGU-lA=@protonmail.com' \
--to=heimeborgia@protonmail.com \
--cc=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.