emacs-devel
[Top][All Lists]
Advanced

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

Re: turn-on-*-mode


From: Richard Stallman
Subject: Re: turn-on-*-mode
Date: Wed, 17 May 2006 16:08:11 -0400

    Stefan had a (what I thought was) clever suggestion to deal with this:
    Make "...-mode" functions toggle only when used interactively (just as
    they only print a message when used interactively), and otherwise have
    them just enable the state unconditionally.

This is an interesting idea.

It would mean that there is no longer an argument you could use,
noninteractively, to toggle the mode.  But that is not a big loss,
practically speaking; that is not something people want to do in code
very often, and it is not very hard to toggle the mode by testing its
value.

Another drawback is simply that the interactive and noninteractive
behavior of these commands will be different.  I am not sure
how big a problem that is.

    A possible variant of this idea that might be more compatible is to have
    `run-hooks' bind a global variable to t when running a hook
    (e.g. `running-hook'), and have mode function unconditionally enable the
    mode when that variable is non-nil.

I like that less, because I think that special behavior for run-hooks
is a bigger anomaly than different behavior for interactive and
noninteractive calls.

Anyway, these changes should not be considered until after the release.




reply via email to

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