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

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

Re: Words with spaces highlighted in elisp-mode comments


From: uzibalqa
Subject: Re: Words with spaces highlighted in elisp-mode comments
Date: Sat, 22 Jul 2023 13:21:11 +0000

------- Original Message -------
On Saturday, July 22nd, 2023 at 6:00 PM, Emanuel Berg <incal@dataswamp.org> 
wrote:


> uzibalqa wrote:
> 
> > > But comments are already font locked into
> > > `font-lock-comment-face' (there is also a`
> > > font-lock-comment-delimiter-face', IMO it is overkill to
> > > have that in another color than `font-lock-comment-face').
> > 
> > I do not see the usefulness of coloring the comment
> > delimiter separately (because that affects all comments in
> > the same way, no distinguishing feature whatsoever ).
> 
> 
> Indeed, I think all comments should be of the same color,
> including the delimiters.
> 
> > We can keep highlighting with a back-quote for things that
> > can be evaluated (e.g. `something')
> 
> 
> Agreed, that is the exception that proves the rule. I could
> also think of hyperlinking them to the help, as has been
> suggested not that long ago. In ERC it is already like that
> BTW, and here is some more work on that:
> 
> https://dataswamp.org/~incal/emacs-init/erc/erc-man.el
> 
> https://dataswamp.org/~incal/emacs-init/erc/erc-show-modes.el
> 
> But putting point at the beginning of `something' and doing` C-h f' isn't 
> that much of a deal, which is the reason I think
> no one has cared about it enough to do it.
> 
> But I like all integration things, big and small, so why not.

It is a very good strategy, and also of that school.

> Here it should be noted that they already get
> `font-lock-constant-face', if it sounds here like nothing at
> all happens to the poor things.
> 
> > and use single-quote for more general case that allows
> > spaces (e.g. 'this and that').
> 
> 
> But what do that express? What's the intended usage? Can you
> provide a piece of Elisp, where you use that proposed syntax
> for us to see?

Besides using comment for descriptive purposes, I use it for FIX-THIS,
IMPROVE-THIS, DEVELOP-THIS, PENDING.

;; PENDING
;;   'OMS GMBL'
;;      1st Fail Y Down
;;      2nd Fail P Down if P not -2.5 to +2.5 
;;   'FF MDM I/O Error'
;;      I/O Reset
 
This is an example for elisp but my intention is to have this
for any language (C, C++, Fortran).  For these types of tasks,
colouring will enhance the visibility of these phrases and make 
them stand out, immediately close to the section of code of 
relevanece.

It is not the routine thing for everybody, but colouring
within comments has benefits for things besides general
description.

> > We should not use multiple comment characters (e.g. ;;;
> > Something) because those are for outlines - something of
> > a completely different orthogonal purpose.
> 
> 
> As long as it has a purpose, it can be font locked in
> a distinguished way. If it should, in this case, is another
> thing, but it could, and it wouldn't be wrong to do. But if it
> should, I don't know, especially since comments in a uniform
> color simply looks much better.

Comments in uniform colour has the advantage that one can change the
intensity of the text in some situations.
 
So perhaps use font lock on the comments as you say.  One just need to be
careful because some modes might reset whatever I try to do.

> --
> underground experts united
> https://dataswamp.org/~incal



reply via email to

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