unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Alexandre Oberlin" <email_via_web@migo.info>
To: help-gnu-emacs@gnu.org
Subject: Re: Why is it not possible to use "nil" any more in init files ?
Date: Tue, 25 Nov 2014 17:10:21 +0100	[thread overview]
Message-ID: <op.xpv1vjumfjdmwo@tournesol> (raw)
In-Reply-To: mailman.14536.1416925359.1147.help-gnu-emacs@gnu.org

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 has  
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 legacy  
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’t 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 that
> it was time to break the small proportion of those minority cases which
> 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
>
>


--


  parent reply	other threads:[~2014-11-25 16:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-22 12:57 Why is it not possible to use "nil" any more in init files ? Alexandre Oberlin
2014-11-22 14:37 ` Stefan Monnier
     [not found] ` <mailman.14325.1416667223.1147.help-gnu-emacs@gnu.org>
2014-11-25 13:19   ` Alexandre Oberlin
2014-11-25 13:50     ` Phillip Lord
2014-11-25 14:22     ` Stefan Monnier
     [not found]     ` <mailman.14534.1416923435.1147.help-gnu-emacs@gnu.org>
2014-11-25 15:07       ` Alexandre Oberlin
2014-11-26 14:15         ` Phillip Lord
     [not found]         ` <mailman.14661.1417011326.1147.help-gnu-emacs@gnu.org>
2014-11-26 20:45           ` Alexandre Oberlin
2014-11-27  3:00             ` Stefan Monnier
2015-01-20  1:03       ` WJ
2015-01-21  6:50         ` Thien-Thi Nguyen
     [not found]     ` <mailman.14536.1416925359.1147.help-gnu-emacs@gnu.org>
2014-11-25 16:10       ` Alexandre Oberlin [this message]
2014-11-26 14:18         ` Phillip Lord
     [not found]         ` <mailman.14663.1417011535.1147.help-gnu-emacs@gnu.org>
2014-11-26 14:39           ` Alexandre Oberlin
2014-11-26 21:12           ` Alexandre Oberlin
2015-01-19 10:31       ` WJ
2015-01-19 14:38         ` Stefan Monnier
     [not found]         ` <mailman.18143.1421678302.1147.help-gnu-emacs@gnu.org>
2015-01-19 14:56           ` Rusi
2014-11-25 15:07 ` Emacs User

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=op.xpv1vjumfjdmwo@tournesol \
    --to=email_via_web@migo.info \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).