Subject: Re: bug#27890: 26.0.50; describe-font does not use Help buffer history

From: Alex <[email-masked]>
Date: Sat, 05 Aug 2017 20:01:33 -0600

[email-masked] writes:

> tags 27890 + patch
> quit
>
> Alex <[email-masked]> writes:
>
>> Alex <[email-masked]> writes:
>>
>>> describe-font does not add to the *Help* buffer's history. The [Back]
>>> button does appear when there is a non-empty history, but going back and
>>> then forward does not restore the font description.
>>
>> Here's a patch for it.
>>
>> +  (let ((xref-item (list #'describe-font fontname))
> [...]
>> +      (help-setup-xref xref-item (called-interactively-p 'interactive))
>
> Looks fine, personally I wouldn't bother introducing that local
> variable.

I introduced that variable because the procedure conditionally sets
fontname if it's an empty sequence. As it stands, the procedure would
error without capturing that variable ahead of time due to `length' being
called on a font object.

I figured this was the simplest way around that problem. Do you have an
easier way in mind? I could perhaps change the setq line to instead set
fontname to (face-attribute 'default :family), which would allow for
removing the local variable safely.