From d18764000f905523ec0c7703b7828463dc9b0a13 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 8 Feb 2022 08:15:08 +0100 Subject: [PATCH] Fix describe-function-1 test failure from previous change * lisp/help-fns.el (describe-function-1): Fix test failure from previous patch. --- lisp/help-fns.el | 17 +++++++++-------- test/lisp/help-fns-tests.el | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index a7f0c4437fa..e6cc07b471d 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -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)) diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el index 4df8e3c9ef6..e3fed60b4cb 100644 --- a/test/lisp/help-fns-tests.el +++ b/test/lisp/help-fns-tests.el @@ -25,6 +25,7 @@ (require 'ert) (require 'help-fns) +(require 'subr-x) (autoload 'help-fns-test--macro "foo" nil nil t) -- 2.39.5