]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix fontification in describe-key
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 21 Jun 2022 11:25:19 +0000 (13:25 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 21 Jun 2022 11:25:19 +0000 (13:25 +0200)
* lisp/help.el (describe-key): Use insert instead of princ so that
text properties on the key descriptions survive.

lisp/help.el

index 2d02b22e5264add9d3658e24cf6221e85f839ff0..1c46f2533819b4d94430ba5720ef868131161f9a 100644 (file)
@@ -966,16 +966,16 @@ current buffer."
       (with-help-window (help-buffer)
         (when (> (length info-list) 1)
           ;; FIXME: Make this into clickable hyperlinks.
-          (princ "There were several key-sequences:\n\n")
-          (princ (mapconcat (lambda (info)
-                              (pcase-let ((`(,_seq ,brief-desc ,_defn ,_locus)
-                                           info))
-                                (concat "  " brief-desc)))
-                            info-list
-                            "\n"))
+          (insert "There were several key-sequences:\n\n")
+          (insert (mapconcat (lambda (info)
+                               (pcase-let ((`(,_seq ,brief-desc ,_defn ,_locus)
+                                            info))
+                                 (concat "  " brief-desc)))
+                             info-list
+                             "\n"))
           (when (delq nil on-link)
-            (princ "\n\nThose are influenced by `mouse-1-click-follows-link'"))
-          (princ "\n\nThey're all described below."))
+            (insert "\n\nThose are influenced by `mouse-1-click-follows-link'"))
+          (insert "\n\nThey're all described below."))
         (pcase-dolist (`(,_seq ,brief-desc ,defn ,locus)
                        info-list)
           (when defn
@@ -983,10 +983,10 @@ current buffer."
               (with-current-buffer standard-output
                 (insert "\n\n" (make-separator-line) "\n")))
 
-            (princ brief-desc)
+            (insert brief-desc)
             (when locus
-              (princ (format " (found in %s)" locus)))
-            (princ ", which is ")
+              (insert (format " (found in %s)" locus)))
+            (insert ", which is ")
            (describe-function-1 defn)))))))
 \f
 (defun search-forward-help-for-help ()