emacs-devel
[Top][All Lists]
Advanced

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

Re: Potential redisplay problem [Re: Recursive load of mule-util.elc]


From: Kenichi Handa
Subject: Re: Potential redisplay problem [Re: Recursive load of mule-util.elc]
Date: Wed, 13 Nov 2002 16:36:21 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, Richard Stallman <address@hidden> writes:
>     At first, tool-bar is being autoloaded.  Then, Fload is
>     called, and it calls message_with_string () to show "Loading
>     XXX.." before starting to load a file.  This leads to
>     calling display_mode_element in this sequence.

>     message_with_string -> message3 -> message3_nolog
>       ->  echo_area_display -> redisplay_mode_lines ->
>       ->  display_mode_lines -> display_mode_element
>     In display_mode_element, `(mode-line-eol-desc)' is evaled,

> You need to make it safe to call mode-line-eol-desc.  It
> should never try to autoload anything.

Then, how about this kind of change in the docstring of
mode-line-format?

*** buffer.c.~1.403.~   Fri Nov  8 08:42:22 2002
--- buffer.c    Wed Nov 13 16:26:46 2002
***************
*** 5260,5266 ****
   A string appearing directly as the value of a symbol is processed verbatim
   in that the %-constructs below are not recognized.
  For a list of the form `(:eval FORM)', FORM is evaluated and the result
!  is used as a mode line element.
  For a list whose car is a symbol, the symbol's value is taken,
   and if that is non-nil, the cadr of the list is processed recursively.
   Otherwise, the caddr of the list (if there is one) is processed.
--- 5260,5267 ----
   A string appearing directly as the value of a symbol is processed verbatim
   in that the %-constructs below are not recognized.
  For a list of the form `(:eval FORM)', FORM is evaluated and the result
!  is used as a mode line element.  FORM should not leads to loading of
!  Emacs Lisp file even if it is by autoloading.
  For a list whose car is a symbol, the symbol's value is taken,
   and if that is non-nil, the cadr of the list is processed recursively.
   Otherwise, the caddr of the list (if there is one) is processed.


By the way, is autloading the only way to cause of the above
recursive call?

>     When you moved coding-system-eol-type-mnemonic to mule.el,
>     autoloading of mule-util in display_mode_element is avoided,
>     thus the problem is fixed.

> Yes, exactly.

>     However, this means that the current Emacs has a potential
>     problem.  Anything being autoloaded in display_mode_element
>     cause the same error.

> We could put in code that gets an error if anything autoloaded
> is called from within display_mode_element.

If that is possible, why don't just add a code to suppress
the call of message_with_string when something is being
autoloaded?

---
Ken'ichi HANDA
address@hidden





reply via email to

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