Subject: bug#68268: 30.0.50; [PATCH] use special mode in checkdoc status buffer

From: No Wayman <[email-masked]>
Date: Fri, 05 Jan 2024 16:00:17 -0500

Stefan Kangas <[email-masked]> writes:

> No Wayman <[email-masked]> writes:
>
>> It'd be nice if the checkdoc status buffer were in 
>> special-mode.
>> Always annoys me when it hangs around and I don't have the
>> quit-window bindings available.
>> See attached patch.
>
> Indeed, this has been a constant annoyance for years.  Thanks 
> for
> addressing it.
 
> Your patch LGTM to me (assuming that it works ;-), but it is 
> missing a
> NEWS entry.  Could you please add one?

I didn't add one because I didn't see entries for the following 
commits which made similar changes elsewhere:

- f947b20a1926ffc5b0553297dfc26d8390bcb328
- 02a2fba7869db7ae23c65ab1ea47db7ba556ffac
- 97abe8511a829861f6efb865209ac2dd0e7ae129
- ab5468e1a01ede3d571765ab491ce2c933ace70f
- 02a2fba7869db7ae23c65ab1ea47db7ba556ffac

Grepping etc/NEWS files for "special-mode" doesn't turn up much 
either:

> TODO
> 57:** Convert modes that use view-mode to be derived from 
> special-mode instead
> 
> NEWS.23
> 2543:** The new major mode 'special-mode' is intended as a 
> parent for
> 
> NEWS.27
> 1093:links to most ordinary special-mode buffers that display 
> text that
> 
> NEWS.28
> 786:doesn't turn on 'display-fill-column-indicator-mode' in 
> special-mode
> 
> NEWS.29
> 302:** 'show-paren-mode' is now disabled in 'special-mode' 
> buffers.
> 306:buffers, but not in buffers that inherit from 
> 'special-mode'.  To go
> 3829:like '(and "\\`\\*.+\\*\\'" (major-mode . special-mode))'.
> 
> NEWS.21
> 1279:See the documentation of variable 'hs-special-modes-alist'.

Let me know if you still think one is necessary and I'll add it in 
the next patch.
 
> Please also add the bug number to the commit message while 
> you're at it.

Addressed in attached patch.

>From 9aeae433bc84315933384c2d56678c9133ff760c Mon Sep 17 00:00:00 2001
From: Nicholas Vollmer <[email-masked]>
Date: Fri, 5 Jan 2024 12:22:10 -0500
Subject: [PATCH] Use special-mode in checkdoc status buffer

* lisp/emacs-lisp/checkdoc.el (checkdoc-display-status-buffer): Use
`special-mode' (bug#68268).
---
 lisp/emacs-lisp/checkdoc.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 80eaf93c3b7..82c6c03a592 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -556,7 +556,8 @@ checkdoc-display-status-buffer
   "Display and update the status buffer for the current checkdoc mode.
 CHECK is a list of four strings stating the current status of each
 test; the nth string describes the status of the nth test."
-  (let (temp-buffer-setup-hook)
+  (let (temp-buffer-setup-hook
+        (temp-buffer-show-hook #'special-mode))
     (with-output-to-temp-buffer "*Checkdoc Status*"
       (mapc #'princ
             (list "Buffer comments and tags:  " (nth 0 check)
-- 
2.43.0