From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Alexandre Oberlin" Newsgroups: gmane.emacs.help Subject: Re: Why is it not possible to use "nil" any more in init files ? Date: Tue, 25 Nov 2014 17:10:21 +0100 Organization: http://www.migo.info Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Trace: ger.gmane.org 1416932130 27950 80.91.229.3 (25 Nov 2014 16:15:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2014 16:15:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 25 17:15:23 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 1XtIls-0007qH-8a for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Nov 2014 17:15:20 +0100 Original-Received: from localhost ([::1]:58216 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtIlr-00008O-Gx for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Nov 2014 11:15:19 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!feeder1-2.proxad.net!cleanfeed2-a.proxad.net!nnrp2-2.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Opera Mail/12.16 (Linux) Original-Lines: 82 Original-NNTP-Posting-Date: 25 Nov 2014 17:10:26 CET Original-NNTP-Posting-Host: 80.215.210.246 Original-X-Trace: 1416931826 news-4.free.fr 2123 80.215.210.246:35725 Original-X-Complaints-To: abuse@proxad.net Original-Xref: usenet.stanford.edu gnu.emacs.help:208896 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:101175 Archived-At: Toggling functions are obviously not always suitable for config files or= = scripts, though there are situations where they simplify code. Toggling functions remain quite convenient on the command line, with the= = new state displaying in the minibuffer, and I am glad to see that this h= as = been respected. Now IMHO, it is fundamental that toggling functions like= = all functions behave the same when called from a file or interactively. = = They could maybe report a warning in the former case, but trigger a = revolution and create unending and potentially serious problems in legac= y = code? How many million users had reported to have trouble with such = functions in scripts? Were they not able to learn good principles? On top of that, not having the explicit arguments work as once expected = = does not help. Really, ain=E2=80=99t it a bit confusing to have (cua-mode -1) return nil and (cua-mode nil) return t ? Downgrading ASAP, Alexandre -- = In the long run, every program becomes rococco, and then rubble. Alan Perlis >> Thanks Stefan for this explanation. So IIUC that trick broke some = >> correct >> .emacs in order to magically fix some broken ones? > > Yup, and not just for .emacs files but also for calls made from one > package to another. Basically, experience shows that *toggling* is > very rarely what we want when writing the Elisp code. > > 99.9% of calls of the form (foo-mode nil) or (foo-mode) either were > meant to enable the mode (the vast majority), or were meant to disable= > the mode (a minority, but not an insignificant one). > > A small proportion of those calls were correct (because the context > made sure that the mode was always either enabled or disabled), but > after yet-another bug report of someone not understanding why his > font-lock was not enabled in such and such circumstance, I decided tha= t > it was time to break the small proportion of those minority cases whic= h > expected (and with reason) the call to disable the mode. > > This change was made more than 5 years ago, and it hasn't caused much = of > a ruckus and even fewer bug reports, so I think I made the right call.= > > > Stefan > > --