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

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

Re: syntax highlighting


From: Bob Proulx
Subject: Re: syntax highlighting
Date: Mon, 17 Nov 2014 19:15:40 -0700
User-agent: Mutt/1.5.23 (2014-03-12)

Stefan Monnier wrote:
> Bruno Felix Rezende Ribeiro wrote:
> > That docstring, and all the others describing minor mode
> > (de)activation commands are somewhat ambiguous to me, because, as in
> > math literature, "positive" could or not include the number '0',
> > depending on author's definition.
> 
> For that reason, I recommend to use -1 and 1 to mean respectively "off"
> and "on".

When I posted my response I almost posted this:

  (setq font-lock-global-modes nil)

But then I checked the documentation to verify that what I was going to
post was accurate.  I found this in the emacs manual.

     Type ‘M-x global-font-lock-mode’ to toggle Font Lock mode in all
  buffers.  To impose this setting for future Emacs sessions, customize
  the variable ‘global-font-lock-mode’ (*note Easy Customization::), or
  add the following line to your init file:

       (global-font-lock-mode 0)

And so I didn't post (setq font-lock-global-modes nil) which I thought
was most plain and simple and instead posted the documented interface.
That is my reward for having read and followed the documentation.

But you are both completely right that 0 is ambiguous there.  That is
terrible.  It should be t or nil to be more consistent.  Or any of a
number of other possibilities.  Unfortunately it is already the
documented interface.  Hate proposing changing it since it will break
anyone who has followed directions.

Bob



reply via email to

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