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

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

Re: describe-char


From: Juri Linkov
Subject: Re: describe-char
Date: Sat, 24 Dec 2005 22:14:54 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

>> It is called before the old contents of the help buffer is replaced with
>> the output of `describe-char'.  This is necessary to record the previous
>> position of point.  But since at this moment the help buffer doesn't contain
>> the new output of `describe-char', we should use nil for the first
>> argument `item' of the function `help-setup-xref' here, and should set
>> `help-xref-stack-item' explicitly later when the help buffer is ready.
>
> AFAICT it's the exact same situation as in all other cases, except that you
> use (buffer-string).

All other cases call `help-setup-xref' with the same function name and its
arguments just before calling `(with-output-to-temp-buffer (help-buffer) ...)'
and replacing old contents of the help buffer with the new contents.
But this is not possible when the new contents should be stored in the
help xref stack.

> Instead of using (help-insert-string (buffer-string)) I'd use
> (describe-char pos buf), which admittedly forces you to add a `buf'
> optional argument.

This is not reliable way to restore the old output of `describe-char'
since the original buffer might be killed or the character at the old
position might be deleted, and also this won't work when `describe-char'
was called on a character in the help buffer itself.

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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