emacs-devel
[Top][All Lists]
Advanced

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

Re: utf-translate-cjk only settable via Customize


From: Kai Großjohann
Subject: Re: utf-translate-cjk only settable via Customize
Date: Sun, 23 Mar 2003 11:56:42 +0100
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     It ought to be easy to augment define-minor-mode to grok more keyword
>     args.  But is this the right approach?  Do we want a
>     :extra-defcustom-args thing that contains a list of those additional
>     args to defcustom?
>
> Would you please explain what you are trying to achieve?
> I don't see what purpose any of this would serve.

The variable utf-translate-cjk must be set via Customize to achieve
the desired effect.  Stefan suggested to make a minor mode such that
people can just invoke that via Lisp and don't have to use Customize.
I was following this discussion and looked at define-minor-mode to do
that.  So I wanted to replace the current (defcustom utf-translate-cjk
...) statement with a (define-minor-mode utf-translate-cjk-mode ...)
statement.

The defcustom for utf-translate-cjk contains several keyword args:
:set, :version, :type, :set-after, and :group.  define-minor-mode is
a macro that expands to a defcustom statement.  I couldn't see how to
inject the :version and :set-after keywords into the defcustom
statement generated by define-minor-mode.

Of course, I could also do it manually, as follows:

* Change the :set arg for the current defcustom utf-translate-cjk to
  invoke utf-translate-cjk-mode, instead of the current code.

* Write a new function utf-translate-cjk-mode that does what the
  current lambda expression for :set does.

But what's the point of a convenience macro like define-minor-mode
when I circumvent it?
-- 
A preposition is not a good thing to end a sentence with.





reply via email to

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