From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "WJ" Newsgroups: gmane.emacs.help Subject: Re: Why is it not possible to use "nil" any more in init files ? Date: Mon, 19 Jan 2015 10:31:42 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1421663736 26373 80.91.229.3 (19 Jan 2015 10:35:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Jan 2015 10:35:36 +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 Jan 19 11:35:35 2015 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 1YD9gF-0007YJ-9I for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Jan 2015 11:35:35 +0100 Original-Received: from localhost ([::1]:36573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YD9gE-0006K8-Dp for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Jan 2015 05:35:34 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!feeder1-2.proxad.net!137.226.75.22.MISMATCH!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 49 Injection-Date: Mon, 19 Jan 2015 10:31:42 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="813958e629c25dbd3d51642b5a568490"; logging-data="23345"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nBnqrPVqoBhwUBWwO3oH6" User-Agent: XanaNews/1.18.1.6 X-Antivirus-Status: Clean X-Antivirus: avast! (VPS 150118-1, 01/18/2015), Outbound message Cancel-Lock: sha1:7ECXbmdHZ9j3Vv/fhq/kF6fN5fE= Original-Xref: usenet.stanford.edu gnu.emacs.help:209876 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:102155 Archived-At: Stefan Monnier wrote: > 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 that > it was time to break the small proportion of those minority cases which > expected (and with reason) the call to disable the mode. > 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 that > it was time to break the small proportion of those minority cases which > expected (and with reason) the call to disable the mode. Passing nil as an argument is not the same as passing no arguments. Don't you know how to tell the difference? This won't work: (defun foo (&optional arg) (print (if arg arg "no arg. given"))) This will work: (defun foo (&rest args) (if args (message "arg. is %s" (car args)) (message "no arg. given"))) : (foo) no arg. given : (foo nil) arg. is nil When mediocre programmers bow to the wishes of the most ignorant users, the result is indeed sad.