Subject: Re: bug#44885: 28.0.50; [PATCH] ElDoc buffer mode and separator

From: Andrii Kolomoiets <[email-masked]>
Date: Thu, 03 Dec 2020 12:29:05 +0200

"Basil L. Contovounesios" <[email-masked]> writes:

>> * lisp/emacs-lisp/eldoc.el (eldoc-doc-buffer-separator): New option.
>
> Does this need calling out in etc/NEWS?

Sure.  But I left it for later, when the patch will be ready.

>> +    (define-key map [?\S-\ ] 'scroll-down-command)
>
> Nit: please prefer '\s' over '\ '.

This is copy-paste from the `special-mode-map` and will be removed once
eldoc-buffer mode will be derived from special-mode.

>> +(define-derived-mode eldoc-doc-mode fundamental-mode "ElDoc doc"
>> +  "Major mode for ElDoc documentation buffer."
>
> If it's the major mode for the ElDoc buffer, why not call it
> eldoc-buffer-mode so as to avoid the repetition/ambiguity of "doc"?

Indeed.  I think I was confused by the `eldoc-doc-buffer` command name.

>> +  (setq buffer-read-only t))
>> +
>>  (defun eldoc--format-doc-buffer (docs)
>>    "Ensure DOCS are displayed in an *eldoc* buffer."
>>    (interactive (list t))
>> @@ -472,12 +495,13 @@ eldoc--format-doc-buffer
>>                             eldoc--doc-buffer
>>                           (setq eldoc--doc-buffer
>>                                 (get-buffer-create " *eldoc*")))
>> +    (unless (eq major-mode 'eldoc-doc-mode)
>
> Why not derived-mode-p?

You are right.  Will fix.

Thanks!