[Top][All Lists]

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

Re: recursive load case in openp

From: Stefan Monnier
Subject: Re: recursive load case in openp
Date: Thu, 11 Apr 2002 09:01:30 -0400

> Richard Stallman <address@hidden> writes:
> >>  Why does encode_coding_string call
> >> temp_output_buffer_setup?
> >     To run post-read-conversion and pre-write-conversion
> > functions of a coding system.  We must make a temporary
> > working buffer for them.
> > I don't see anything like that in the code of
> > temp_output_buffer_setup.  What exactly in the code of
> > temp_output_buffer_setup do you actually want to do here?
> Here's a copy of temp_output_buffer_setup.  I just need
> lines from Fset_buffer to Ferase_buffer (inclusive).

I would argue that the `run-hooks' part of the function should be
taken out.  Typically, this hook contains help-mode-setup which is
either not what we want (when the buffer is only used internally) or
if it is what we want, it's not enough (we additionally need to call

I've already removed most C calls to with-output-to-temp-buffer
by moving the corresponding code to elisp.

Currently temp_output_buffer_setup is called from bytecode.c,
coding.c and fileio.c (where the calls obviously would rather have
a temp_buffer_setup, with none of that Qtemp_buffer_setup_hook
business) and from Fwith_output_to_temp_buffer which could be recoded
in elisp anyway as well as internal_with_output_to_temp_buffer.

This last one is still used for several things, so we won't
be able to get rid of it immediately:
- " *Danger*" in alloc.c (should this really run temp_buffer_setup_hook ?).
- "*Backtrace*" in eval.c (only used when stack-trace-on-error is non-nil.
  Is this ever used ?  It seems that debug-on-error makes it obsolete).
- "*Help*" in keyboard.c for the help-form (I think this should be
  moved to elisp, but I'm not sure how).
- "*Completions*" in minibuf.c (I have all this code recoded and improved
  in elisp.  And I can't see why *Completions* should use help-mode-setup).
- "*Process List*" in proicess.c (again, should this use help-mode ?).

Of course, in the mean time we should just create
temp_buffer_setup and have temp_output_buffer_setup call it.


reply via email to

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