>> 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/



_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to