From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#51040: No curved quotes in format-prompt and minibuffer-default-prompt-format Date: Wed, 13 Oct 2021 15:07:35 +0300 Message-ID: <835yu1p1q0.fsf@gnu.org> References: <87o883776l.fsf@gnus.org> <87fstefs2u.fsf@gnus.org> <83lf2yquan.fsf@gnu.org> <83r1cqp5l7.fsf@gnu.org> <83ily2ozhr.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13830"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51040@debbugs.gnu.org, larsi@gnus.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 13 14:10:50 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mad5t-0003Tf-PK for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Oct 2021 14:10:49 +0200 Original-Received: from localhost ([::1]:36942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mad5s-0007oh-79 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Oct 2021 08:10:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mad3E-0006GZ-DM for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2021 08:08:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47265) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mad3C-0004Ul-3s for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2021 08:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mad3B-0007Mc-VT for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2021 08:08: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: Wed, 13 Oct 2021 12:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51040 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51040-submit@debbugs.gnu.org id=B51040.163412686928282 (code B ref 51040); Wed, 13 Oct 2021 12:08:01 +0000 Original-Received: (at 51040) by debbugs.gnu.org; 13 Oct 2021 12:07:49 +0000 Original-Received: from localhost ([127.0.0.1]:58811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mad2z-0007M6-2E for submit@debbugs.gnu.org; Wed, 13 Oct 2021 08:07:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mad2x-0007Lr-7x for 51040@debbugs.gnu.org; Wed, 13 Oct 2021 08:07:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55804) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mad2r-0004HZ-Tr; Wed, 13 Oct 2021 08:07:41 -0400 Original-Received: from [87.69.77.57] (port=1992 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mad2r-0003pQ-G1; Wed, 13 Oct 2021 08:07:41 -0400 In-Reply-To: (message from Stefan Kangas on Tue, 12 Oct 2021 16:21:52 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217111 Archived-At: > From: Stefan Kangas > Date: Tue, 12 Oct 2021 16:21:52 -0700 > Cc: larsi@gnus.org, 51040@debbugs.gnu.org > > > . the doc string of text-quoting-style the function doesn't document > > its return values, but refers to the variable, so it's easy to > > conclude that it also returns nil > > . that doc string says "effective style", without explaining the > > special processing of nil > > . the function is not in the ELisp manual, but the variable is, > > twice(!) > > Yeah, it's a mess. I suggest we address the documentation issues on > emacs-28 with the attached patch. Thanks. > +@defun text-quoting-style > +You should not read the value of the variable > +@code{text-quoting-style} directly. Instead, use this function with > +the same name to correctly handle the nil case described above. > +@end defun This should explain why we recommend using the function. > DEFUN ("text-quoting-style", Ftext_quoting_style, > Stext_quoting_style, 0, 0, 0, > doc: /* Return the current effective text quoting style. > -See variable `text-quoting-style'. */) > +If the variable `text-quoting-style' is `grave', `straight' or > +`curve', just return that value. If it is nil (the default), return > +`grave' if curved quotes cannot be displayed, otherwise return > +`quote'. Any other value is invalid; in that case return `grave'. This is okay, with the exception of the "invalid" part: if we allow it, it is not invalid. Just say something like "Any other value is treated as `grave'." Also, perhaps we should say more about "cannot be displayed". At least the manual should elaborate about that, but I think the doc string should also at least hint what it means. (Btw, this whole feature has a bug, in that we determine the "cannot be displayed" part only once, at startup, whereas it in general can be different on each frame. But that's a separate issue.) > +You should never read the value of this variable directly from a Lisp > +program. Use the function `text-quoting-style' instead, as that will > +handle the default nil value. */); Again, "handle" is too vague. Either tell what it means, or perhaps refer to the doc string of the function for these details.