[Top][All Lists]

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

Re: ¬ notation for not? Ref: Add a couple cells to lisp-prettify-symbols

From: Stefan Monnier
Subject: Re: ¬ notation for not? Ref: Add a couple cells to lisp-prettify-symbols-alist
Date: Mon, 18 Jul 2016 11:07:07 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

SM> Currently it's
SM> (push '("not" . ?√) prettify-symbols-alist)
SM> and hopefully we can keep something similar.  This said, the intention
SM> of having two sets is that adding a new element should be unusual: the
SM> extended set should cover most things that someone might like.

> What about the distinction between global and local (per mode, per
> filename, etc.) prettifications?

Not sure what you mean.

> The UI here is just a programming API, but it becomes hard for
> a casual user to override without writing custom Lisp code, I think?

As mentioned, I assume it'd be considered an unusual need, so I think
it's perfectly OK if it can't be done via Custom.

>>> * how would I remove '("sqrt" . ?√) from the alist?
SM> (push ?√ prettify-symbols-inhibited-chars) or customize
SM> prettify-symbols-inhibited-chars.
> This is a bit easier than adding, if we assume the inhibition will
> always be global.

Right.  I assume here that it's sufficient to allow global inhibition
from Custom.  If you want it more fine grained, you'll need to learn to
use add-hook and setq-local.

> But defcustoms (and the underlying widgets) don't allow dynamically
> sourced choices, do they?  So the user has to copy and paste the
> special symbol?  (I looked in the widget library for dynamic choice
> lists just this morning for the gnus-cloud stuff, where it would be
> nice to offer a dynamic list of all the possible IMAP server as cloud
> hosts.  I couldn't find a way.  Maybe I missed something.)

There's currently no widget that does that, indeed.  The closest is the
support for completion.  AFAIK there's no deep technical reason why this
is the case and I'd welcome someone adding a `dynamic-choice` type.
There are already various places where we could use such a thing.


reply via email to

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