Fix *Help* text when a command is bound to a single key

* lisp/help-fns.el (help-fns--key-bindings): Don't insert
redundant period.  (Bug#78905)
This commit is contained in:
Eli Zaretskii 2025-06-26 17:39:19 +03:00
parent 2bdcf0250a
commit 80cb688b04

View file

@ -632,7 +632,11 @@ the C sources, too."
(format-message "`%s'" remapped)
"an anonymous command"))
(princ "as well.\n"))
(or remapped (princ "."))
;; The (= (point) start) condition tests whether
;; 'help-fns--insert-menu-bindings' inserted anything;
;; if it didn't, we already have a period from the
;; previous 'princ' call.
(or remapped (= (point) start) (princ "."))
(fill-region-as-paragraph start (point))))
(ensure-empty-lines)))))))