[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: syntax highlighting
From: |
Bob Proulx |
Subject: |
Re: syntax highlighting |
Date: |
Sun, 16 Nov 2014 22:04:18 -0700 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Robert Thorpe wrote:
> M P writes:
> > Thanks, I had (global-font-lock-mode) which worked previously,
>
> Doing just M-x global-font-lock-mode toggles font-lock. That means that
> if it's off it's turned on and vice-versa. All of the global
> minor-modes work like that. As I understand it, this behaviour was
> found to be confusing in lisp programs. Anyway, now M-x global-xxx-mode
> still toggles, but in a lisp program (global-xxx-mode) now always means
> "turn function xxx on".
I rather dislike controls that toggle. Whether they are programmatic
interfaces or physical buttons. For programs is always the problem
that you must ensure that they are in a particular state before
toggling. For physical buttons I always seem to fat-finger them and
hit them multiple times. I much prefer set buttons such as off or on
that it doesn't matter if you have contact bounce that they will still
do exactly what you want regardless of the number of events or not.
However for font lock mode it takes an optional argument.
(global-font-lock-mode 0)
The docs say:
(global-font-lock-mode &optional ARG)
Toggle Font-Lock mode in all buffers.
With prefix ARG, enable Global-Font-Lock mode if ARG is positive;
otherwise, disable it. If called from Lisp, enable the mode if
ARG is omitted or nil.
So giving it a 0 argument definitely turns it off and does not toggle
it.
Bob
- syntax highlighting, mzp3769, 2014/11/15
- Re: syntax highlighting, Emanuel Berg, 2014/11/16
- Re: syntax highlighting, M P, 2014/11/16
- Re: syntax highlighting, Bob Proulx, 2014/11/16
- Re: syntax highlighting, Emanuel Berg, 2014/11/16
- Message not available
- Re: syntax highlighting, M P, 2014/11/16
- Re: syntax highlighting, Robert Thorpe, 2014/11/16
- Re: syntax highlighting,
Bob Proulx <=
- Re: syntax highlighting, Bruno Félix Rezende Ribeiro, 2014/11/17
- Re: syntax highlighting, Stefan Monnier, 2014/11/17
- Re: syntax highlighting, Bob Proulx, 2014/11/17
- Re: syntax highlighting, Bruno Félix Rezende Ribeiro, 2014/11/18
- Re: syntax highlighting, Bob Proulx, 2014/11/18
- Message not available
- Re: syntax highlighting, Emanuel Berg, 2014/11/17
- Message not available
- Re: syntax highlighting, Emanuel Berg, 2014/11/17
Re: syntax highlighting, Robert Thorpe, 2014/11/16