From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bob Proulx Newsgroups: gmane.emacs.help Subject: Re: syntax highlighting Date: Sun, 16 Nov 2014 22:04:18 -0700 Message-ID: <20141116220147423535443@bob.proulx.com> References: <87d28m1usd.fsf@robertthorpeconsulting.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1416200936 4932 80.91.229.3 (17 Nov 2014 05:08:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Nov 2014 05:08:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 17 06:08:46 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XqEYM-0005vw-B8 for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Nov 2014 06:08:42 +0100 Original-Received: from localhost ([::1]:46137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqEYL-0001ZI-Hz for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Nov 2014 00:08:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqEUF-0002rJ-Gn for help-gnu-emacs@gnu.org; Mon, 17 Nov 2014 00:04:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqEU9-0004YO-0X for help-gnu-emacs@gnu.org; Mon, 17 Nov 2014 00:04:27 -0500 Original-Received: from joseki.proulx.com ([216.17.153.58]:33246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqEU8-0004XZ-Og for help-gnu-emacs@gnu.org; Mon, 17 Nov 2014 00:04:20 -0500 Original-Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id E5FDB21846 for ; Sun, 16 Nov 2014 22:04:18 -0700 (MST) Original-Received: by hysteria.proulx.com (Postfix, from userid 1000) id B91932DC3A; Sun, 16 Nov 2014 22:04:18 -0700 (MST) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87d28m1usd.fsf@robertthorpeconsulting.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 216.17.153.58 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:100982 Archived-At: 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