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

From: Alex <[email-masked]>
Date: Sat, 05 Aug 2017 17:05:29 -0600

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.

>From 658823b3a1adec25283d28e59710aa160afd7908 Mon Sep 17 00:00:00 2001
From: Alexander Gramiak <[email-masked]>
Date: Sat, 5 Aug 2017 16:09:54 -0600
Subject: [PATCH] Use help-mode xrefs in describe-font

* lisp/international/mule-diag.el (describe-font): Use help-setup-xref
(Bug#27890).
---
 lisp/international/mule-diag.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el
index c274621f77..655a5ca6d4 100644
--- a/lisp/international/mule-diag.el
+++ b/lisp/international/mule-diag.el
@@ -838,7 +838,8 @@ describe-font
   (interactive "sFont name (default current choice for ASCII chars): ")
   (or (and window-system (fboundp 'fontset-list))
       (error "No fonts being used"))
-  (let (font-info)
+  (let ((xref-item (list #'describe-font fontname))
+        font-info)
     (if (or (not fontname) (= (length fontname) 0))
 	(setq fontname (face-attribute 'default :font)))
     (setq font-info (font-info fontname))
@@ -850,6 +851,7 @@ describe-font
 	    ;; this problem.
 	    (message "No information about \"%s\"" (font-xlfd-name fontname))
 	  (message "No matching font found"))
+      (help-setup-xref xref-item (called-interactively-p 'interactive))
       (with-output-to-temp-buffer "*Help*"
 	(describe-font-internal font-info)))))
 
-- 
2.13.2