Fix describe-function-1 test failure from previous change
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 8 Feb 2022 07:15:08 +0000 (08:15 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 8 Feb 2022 07:15:08 +0000 (08:15 +0100)
* lisp/help-fns.el (describe-function-1): Fix test failure from
previous patch.

lisp/help-fns.el
test/lisp/help-fns-tests.el

index a7f0c4437fabff4513485e051b80374d87cc5605..e6cc07b471d155752ee2f3c84192e02797d07c3c 100644 (file)
@@ -962,14 +962,15 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
   (let ((pt1 (with-current-buffer (help-buffer) (point))))
     (help-fns-function-description-header function)
     (with-current-buffer (help-buffer)
-      (fill-region-as-paragraph
-       (save-excursion
-         (goto-char pt1)
-         (forward-line 0)
-         (point))
-       (point)
-       nil t)
-      (ensure-empty-lines)))
+      (let ((inhibit-read-only t))
+        (fill-region-as-paragraph
+         (save-excursion
+           (goto-char pt1)
+           (forward-line 0)
+           (point))
+         (point)
+         nil t)
+        (ensure-empty-lines))))
 
   (pcase-let* ((`(,real-function ,def ,_aliased ,real-def)
                 (help-fns--analyze-function function))
index 4df8e3c9ef638cbd01ddd304caed96df51f4835b..e3fed60b4cb21e812d22c7c23cd053f8fa472591 100644 (file)
@@ -25,6 +25,7 @@
 
 (require 'ert)
 (require 'help-fns)
+(require 'subr-x)
 
 (autoload 'help-fns-test--macro "foo" nil nil t)