[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mon, 26 Nov 2001 17:53:59 +0100
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu)
Kazu Yamamoto (山本和彦) <address@hidden> writes:
> I have a question about wid-edit.el contained in Emacs 21.
> I'm using one Elisp package which requires wid-edit.el even when Emacs
> 21 is executed with the "-nw" option. Since wid-edit.el is using
> the create-image fuction, it loads "image.el".
The glyph code for Emacs was added long after I handed over
'wid-edit.el' to the FSF, so I know very little about it. I have CC'ed
> My goal is to avoid loading "image.el" when "-nw". Would you suggest
> me which one is a right way?
> (1) Packages should not require wid-edit.el if Emacs 21 is executed
> the "-nw" option.
The "wid-edit" functions _ought_ to be autoloaded when used, so it
_ought_ to be unnecessary to explicitly load it. However, whether
this theory holds I'm not sure of.
> (2) It is OK for packages to require wid-edit.el in any cases.
It should be.
> (2.0) The current code of wid-edit.el is correct. "image.el" is
> meaningful even with "-nw".
Does it do any harm? 'image.el' appears to be a rather small file.
> (2.1) wid-edit.el should avoid loading "image.el" and should be
> modified to implement this.
> (2.3) wid-edit.el should avoid loading "image.el", however, to
> make code simple, the current coding style was chosen.
Maybe, the problem seem to be the 'checkbox' widget call
'create-image' for :on-glyph and :off-glyph. These calls could be
"lazy evaled" to delay the actual creation, but it would complicate
the code. I have no opinion on whether that would be worthwhile.
- Re: wid-edit.el,
Per Abrahamsen <=