Subject: Re: bug#53910: 29.0.50; context-menu-mode breaks help in read-only buffers

From: martin rudalics <[email-masked]>
Date: Thu, 10 Feb 2022 09:26:45 +0100

> `describe-buffer-bindings: Args out of range: #<buffer *scratch*>, 173, 174`

Please try the attached diff.

martin

diff --git a/lisp/help.el b/lisp/help.el
index 975be497e7..5b70474958 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1349,7 +1349,8 @@ describe-map-tree
       (save-excursion
         (goto-char start-point)
         (when (eolp)
-          (delete-region (point) (1+ (point))))
+          (delete-region
+           (point) (min (1+ (point)) (point-max))))
         (insert
          (concat
           (if title