* bug#57250: emacs-lisp-mode not highlighting single characters `k' in comments
@ 2022-08-16 18:57 uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-16 19:11 ` Stefan Kangas
2022-08-17 11:16 ` Lars Ingebrigtsen
0 siblings, 2 replies; 6+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-16 18:57 UTC (permalink / raw)
To: 57250
[-- Attachment #1: Type: text/plain, Size: 600 bytes --]
With emacs-lisp-mode make a comment that includes character sequences enclosed
by tick ` and a single quote ' .
The character sequence within gets highlighted with a different colour than the
usual typeface for comments.
Example:
;; Insert `cog', `col', `com', `con', `cor', `coun', `cum'.
The character sequences cog, col, com, con, cor, coun, and cum get highlighted
But if the character sequence within tick ` and a single quote ' is a single
character, the character does not get highlighted.
Example:
;; Insert `k' for words with initial values.
The character k does not get highlighted.
[-- Attachment #2: Type: text/html, Size: 3446 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#57250: emacs-lisp-mode not highlighting single characters `k' in comments
2022-08-16 18:57 bug#57250: emacs-lisp-mode not highlighting single characters `k' in comments uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-16 19:11 ` Stefan Kangas
2022-08-16 19:17 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-16 19:23 ` Drew Adams
2022-08-17 11:16 ` Lars Ingebrigtsen
1 sibling, 2 replies; 6+ messages in thread
From: Stefan Kangas @ 2022-08-16 19:11 UTC (permalink / raw)
To: uzibalqa, 57250
uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@gnu.org> writes:
> But if the character sequence within tick ` and a single quote ' is a single
> character, the character does not get highlighted.
>
> Example:
>
> ;; Insert `k' for words with initial values.
>
> The character k does not get highlighted.
That's because k here is more likely to be a key than a Lisp symbol.
So I think this is expected.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#57250: emacs-lisp-mode not highlighting single characters `k' in comments
2022-08-16 19:11 ` Stefan Kangas
@ 2022-08-16 19:17 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-16 19:23 ` Drew Adams
1 sibling, 0 replies; 6+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-16 19:17 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 57250
------- Original Message -------
On Tuesday, August 16th, 2022 at 7:11 PM, Stefan Kangas <stefankangas@gmail.com> wrote:
> uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors" bug-gnu-emacs@gnu.org writes:
>
> > But if the character sequence within tick ` and a single quote ' is a single
> > character, the character does not get highlighted.
> >
> > Example:
> >
> > ;; Insert `k' for words with initial values.
> >
> > The character k does not get highlighted.
>
>
> That's because k here is more likely to be a key than a Lisp symbol.
>
> So I think this is expected.
What is the reason for the highlight for more than a single character?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#57250: emacs-lisp-mode not highlighting single characters `k' in comments
2022-08-16 19:11 ` Stefan Kangas
2022-08-16 19:17 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-16 19:23 ` Drew Adams
2022-08-16 20:31 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 6+ messages in thread
From: Drew Adams @ 2022-08-16 19:23 UTC (permalink / raw)
To: Stefan Kangas, uzibalqa, 57250@debbugs.gnu.org
> > But if the character sequence within tick ` and a single quote ' is a
> single
> > character, the character does not get highlighted.
> >
> > Example:
> >
> > ;; Insert `k' for words with initial values.
> >
> > The character k does not get highlighted.
>
> That's because k here is more likely to be a key than a Lisp symbol.
>
> So I think this is expected.
FWIW, I don't think it should be expected.
And even if it were expected to consider it
a key, that's not a reason not to highlight
it. Keys such as `M-x' do get highlighted.
To me, this is a minor bug or a nice-to-have.
If it can be fixed reasonably then that would
be good.
We need not expect, for this bug fix, that
things like `C-x C-x', which contains a SPC
char, would also get fixed (highlighted).
That would be nice, but there's only so much
that reasonably can be done. Highlighting
everything from ` to ' would likely introduce
a fair number of problems. (And then there
are things like a `C-x C-x' that's split
across a newline...)
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#57250: emacs-lisp-mode not highlighting single characters `k' in comments
2022-08-16 19:23 ` Drew Adams
@ 2022-08-16 20:31 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 6+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-16 20:31 UTC (permalink / raw)
To: Drew Adams; +Cc: Stefan Kangas, 57250@debbugs.gnu.org
------- Original Message -------
On Tuesday, August 16th, 2022 at 7:23 PM, Drew Adams <drew.adams@oracle.com> wrote:
> > > But if the character sequence within tick ` and a single quote ' is a
> > > single
> > > character, the character does not get highlighted.
> > >
> > > Example:
> > >
> > > ;; Insert `k' for words with initial values.
> > >
> > > The character k does not get highlighted.
> >
> > That's because k here is more likely to be a key than a Lisp symbol.
> >
> > So I think this is expected.
>
>
> FWIW, I don't think it should be expected.
>
> And even if it were expected to consider it
> a key, that's not a reason not to highlight
> it.
I agree. That has been my argument.
Keys such as `M-x' do get highlighted. To me, this is a minor bug or a nice-to-have. If it can be fixed reasonably then that would be good. We need not expect, for this bug fix, that things like` C-x C-x', which contains a SPC
> char, would also get fixed (highlighted).
>
> That would be nice, but there's only so much
> that reasonably can be done. Highlighting
> everything from `to ' would likely introduce a fair number of problems. (And then there are things like a`C-x C-x' that's split
> across a newline...)
It would valuable to highlight everything from ` to ' if they happen on tho same line.
Or some other mechanism to highlight certain elements in comments that would benefit out of emphasising.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#57250: emacs-lisp-mode not highlighting single characters `k' in comments
2022-08-16 18:57 bug#57250: emacs-lisp-mode not highlighting single characters `k' in comments uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-16 19:11 ` Stefan Kangas
@ 2022-08-17 11:16 ` Lars Ingebrigtsen
1 sibling, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-17 11:16 UTC (permalink / raw)
To: uzibalqa; +Cc: 57250
uzibalqa <uzibalqa@proton.me> writes:
> But if the character sequence within tick ` and a single quote ' is a single
> character, the character does not get highlighted.
>
> Example:
>
> ;; Insert `k' for words with initial values.
This is the case in Emacs 27.1, but not in later versions of Emacs.
Closing.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-08-17 11:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-16 18:57 bug#57250: emacs-lisp-mode not highlighting single characters `k' in comments uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-16 19:11 ` Stefan Kangas
2022-08-16 19:17 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-16 19:23 ` Drew Adams
2022-08-16 20:31 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-17 11:16 ` Lars Ingebrigtsen
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).