From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#27230: eldoc doc Date: Sun, 25 Jun 2017 17:26:56 +0300 Message-ID: <83efu8ta6n.fsf@gnu.org> References: <282e174a-e9c0-6bec-32f5-ed9d772e5e1d@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1498400896 13416 195.159.176.226 (25 Jun 2017 14:28:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Jun 2017 14:28:16 +0000 (UTC) Cc: dgutov@yandex.ru, 27230@debbugs.gnu.org To: "Charles A. Roelli" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 25 16:28:11 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dP8WH-00034f-5M for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Jun 2017 16:28:09 +0200 Original-Received: from localhost ([::1]:42776 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dP8WM-0005Up-72 for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Jun 2017 10:28:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dP8WD-0005Ue-9k for bug-gnu-emacs@gnu.org; Sun, 25 Jun 2017 10:28:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dP8WA-0006Ya-2j for bug-gnu-emacs@gnu.org; Sun, 25 Jun 2017 10:28:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34728) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dP8W9-0006YQ-W4 for bug-gnu-emacs@gnu.org; Sun, 25 Jun 2017 10:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dP8W9-0007B6-NQ for bug-gnu-emacs@gnu.org; Sun, 25 Jun 2017 10:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Jun 2017 14:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27230 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27230-submit@debbugs.gnu.org id=B27230.149840084227528 (code B ref 27230); Sun, 25 Jun 2017 14:28:01 +0000 Original-Received: (at 27230) by debbugs.gnu.org; 25 Jun 2017 14:27:22 +0000 Original-Received: from localhost ([127.0.0.1]:37402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dP8VW-00079v-6D for submit@debbugs.gnu.org; Sun, 25 Jun 2017 10:27:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dP8VT-00079i-JH for 27230@debbugs.gnu.org; Sun, 25 Jun 2017 10:27:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dP8VL-0005wS-8H for 27230@debbugs.gnu.org; Sun, 25 Jun 2017 10:27:14 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dP8VL-0005wO-57; Sun, 25 Jun 2017 10:27:11 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2829 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dP8VK-0004HL-7M; Sun, 25 Jun 2017 10:27:10 -0400 In-reply-to: (charles@aurox.ch) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133873 Archived-At: > From: "Charles A. Roelli" > Date: Sun, 25 Jun 2017 11:14:23 +0200 > > Here's a doc patch for ElDoc, with some minor readability fixes. Thanks. Please allow me a few comments below. > -(defun eldoc-message (&rest args) > +(defun eldoc-message (&optional format-string &rest args) > + "Store and display the given message. The first line of a doc string should ideally mention the arguments. > +FORMAT-STRING and ARGS, if given, are passed to `format-message', > +the output of which is stored in `eldoc-last-message'. This leaves me wondering what happens if no arguments are supplied. > (defun eldoc--message-command-p (command) > + "Non-nil if COMMAND is a command in `eldoc-message-commands'." "Return non-nil if ...". The way you wrote it is appropriate for a variable, not for a function. > (defun eldoc-pre-command-refresh-echo-area () > + "Reprint `eldoc-last-message' to the echo area." Are you sure about the "to" part? I'd say "in" sounds more correct. > (defun eldoc-display-message-p () > + "Non-nil when appropriate to display an ElDoc message." "Return non-nil" > (defun eldoc-display-message-no-interference-p () > + "Nil when displaying an ElDoc message would cause interference > +with other features." Likewise. Also, the first line of a doc string should be a complete sentence. > (defun eldoc-print-current-symbol-info () > + "Print the output of `eldoc-documentation-function'." "Print the output" sounds confusing. How about this instead: Print the text produced by `eldoc-documentation-function'. > (defun eldoc-docstring-format-sym-doc (prefix doc &optional face) > + "Concatenate PREFIX and DOC, returning the largest part of the > +resultant string that can fit in the minibuffer window. First line not a complete sentence again. > +When PREFIX is a symbol, apply FACE to it before concatenating. But FACE is optional, so what if it isn't given? Thanks for working on this.