help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is it not possible to use "nil" any more in init files ?


From: Phillip Lord
Subject: Re: Why is it not possible to use "nil" any more in init files ?
Date: Tue, 25 Nov 2014 13:50:22 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Clearly, if the interface has changed it runs the risk of breaking some
statements which were previously fulfilling the programmers intent.
This, of course, is irritating for those affected, but that doesn't make
it wrong.

>From my perspective, most people who write

(hated-mode nil) 

are likely to be able to work out what is happening, while someone who
accidentally writes

(wanted-mode)

and later

(wanted-mode)

has a more pernicuous problem.

I always used

(hated-mode 0)

which seems to be more intuitive than passing nil. Perhaps this is why
the change did not irritate me.


Alexandre Oberlin <email_via_web@migo.info> writes:

> Thanks Stefan for this explanation. So IIUC that trick broke some correct
> .emacs in order to magically fix some broken ones?
>
> Alexandre
>
>
> On Sat, 22 Nov 2014 15:37:04 +0100, Stefan Monnier <monnier@iro.umontreal.ca>
> wrote:
>
>>> I know that departing from proven approaches for no sensible reason is top
>>> of the art but is there any kind of other rationale to make the thing not
>>> backward-compatible?
>>
>> Of course, there's a reason: All minor modes since Emacs-23 (IIRC)
>> should turn themselves ON when called with a nil argument, so you don't
>> need turn-on-FOO-mode and you can just say:
>>
>>    (add-hook 'bar-mode-hook 'foo-mode)
>>
>> The better part of this incompatible change is that it silently *fixed*
>> many people's .emacs since many people already used:
>>
>>    (add-hook 'bar-mode-hook 'foo-mode)
>>
>> without realizing that this could actually turn the mode OFF in
>> some cases.
>>
>>
>>         Stefan
>>
>>
>
>
> --
>
>

-- 
Phillip Lord,                           Phone: +44 (0) 191 208 7827
Lecturer in Bioinformatics,             Email: phillip.lord@newcastle.ac.uk
School of Computing Science,            
http://homepages.cs.ncl.ac.uk/phillip.lord
Room 914 Claremont Tower,               skype: russet_apples
Newcastle University,                   twitter: phillord
NE1 7RU                                 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]