From: Eli Zaretskii Date: Thu, 26 Jun 2025 14:39:19 +0000 (+0300) Subject: Fix *Help* text when a command is bound to a single key X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=51d5c2f6dff68209bbd3d68fa2e4045c6d3973eb;p=emacs.git 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) (cherry picked from commit 80cb688b04b11a0f2291a3dfb26c16febfdea4cd) --- diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 2ef7be9256e..91ca25401f8 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -650,7 +650,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)))))))