emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: utf-translate-cjk-mode


From: Kai Großjohann
Subject: Re: utf-translate-cjk-mode
Date: Fri, 04 Apr 2003 12:56:54 +0200
User-agent: Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.3.50 (gnu/linux)

Dave Love <address@hidden> writes:

> address@hidden (Kai Großjohann) writes:
>
>> Hm.  Consider someone trying to avoid Customize.
>
> That's their problem.  I'm considering people using Custom, trying to
> make the options apparent and allow them to be set as well as
> possible.

Well, for Customize users there is no problem... see below.

>> So even if you
>> require to use Customize for this one, you can't say whether
>> (set-language-environment "foo") occurs before or after the
>> (custom-set-variables ...) statement.
>
> Yes I can, if it's invoked according to the locale, which should be
> the normal case.

I guess this means that the language environment is set before .emacs
is loaded?  In that case, it doesn't matter whether
utf-translate-cjk-mode is set via Customize or not.  Right?

>> So I think it won't help people who try to avoid Customize.
>
> ??

Let me try to explain again.  I imagine that people who want to avoid
Customize do it like this: they use Customize where necessary and
avoid it where possible.

This means they put something like

    (set-language-environment ...)
    (custom-set-variables
      ... utf-translate-cjk-mode ...)

in their .emacs, where the second statement comes from Customize.
This works fine.  But if the statements are swapped, then it fails.

So people who do the above don't benefit from your
shooting-in-the-foot protection.

>> People who use Customize for both the language environment and
>> utf-translate-cjk-mode should get the same behavior as previously --
>> the :set-after arg is still there.
>
> Only if define-minor-mode did anything with it.

It does.  I made a first attempt at converting utf-translate-cjk-mode
to define-minor-mode and saw that :set-after was missing.  Then I
mentioned this on emacs-devel.  Stefan said :set-after was
supported.  It turned out that he just forgot to commit one change.
He committed that change, so that define-minor-mode groks :set-after
(in fact, any keyword arg is passed to defcustom unchanged), and then
I committed my change to convert utf-translate-cjk-mode to
define-minor-mode.

Are you happy now, or is there anything missing?

>> set-language-environment could holler if utf-translate-cjk-mode was
>> set when it is called.  That might be useful in some way or other.
>> Or it could look if utf-translate-cjk-mode is on, and if so, turn it
>> off then on again.  That would exhibit more dwimishness.
>
> I think that would be wrong, apart from being very unclean.  Custom
> supports at least the declaration of dependencies, even if it doesn't
> use them fully.  Why do you want to avoid that, presumably at the
> expense of the less sophisticated users Custom is particularly aimed
> at?

Since define-minor-mode groks :set-after, the above change would be
required only for Lisp users.

That means you were protecting Customize users from shooting
themselves in the foot, and I'm proposing to retain this and provide
additional protection for those who abstain from Customize.

-- 
A preposition is not a good thing to end a sentence with.




reply via email to

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