From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#16483: 24.3.50; `read-face-name' is a mess now (regression) Date: Fri, 29 Apr 2016 11:09:35 -0700 (PDT) Message-ID: <8f8ef28b-84c6-4205-8720-2711b1a8368b@default> References: <55d774e6-27f4-4e9f-a3e5-4aa1e43f0a0e@default> <871t5o2zqb.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1461953444 5702 80.91.229.3 (29 Apr 2016 18:10:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Apr 2016 18:10:44 +0000 (UTC) Cc: 16483@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 29 20:10:31 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1awCs2-0001hB-E9 for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Apr 2016 20:10:31 +0200 Original-Received: from localhost ([::1]:55767 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awCry-000607-8Q for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Apr 2016 14:10:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awCro-0005ma-US for bug-gnu-emacs@gnu.org; Fri, 29 Apr 2016 14:10:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awCrd-0006Av-6L for bug-gnu-emacs@gnu.org; Fri, 29 Apr 2016 14:10:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awCrd-00068n-4C for bug-gnu-emacs@gnu.org; Fri, 29 Apr 2016 14:10:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1awCrZ-000249-OC for bug-gnu-emacs@gnu.org; Fri, 29 Apr 2016 14:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Apr 2016 18:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16483 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 16483-submit@debbugs.gnu.org id=B16483.14619533897919 (code B ref 16483); Fri, 29 Apr 2016 18:10:01 +0000 Original-Received: (at 16483) by debbugs.gnu.org; 29 Apr 2016 18:09:49 +0000 Original-Received: from localhost ([127.0.0.1]:55718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awCrN-00023f-53 for submit@debbugs.gnu.org; Fri, 29 Apr 2016 14:09:49 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:47491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awCrK-00023R-Vq for 16483@debbugs.gnu.org; Fri, 29 Apr 2016 14:09:47 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u3TI9evB000876 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 29 Apr 2016 18:09:41 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u3TI9ewb023048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 29 Apr 2016 18:09:40 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u3TI9bJN021771; Fri, 29 Apr 2016 18:09:40 GMT In-Reply-To: <871t5o2zqb.fsf@gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] 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:117230 Archived-At: > > 1. The doc string no longer says what the behavior is if DEFAULT is nil= . > > In Emacs 24.3, it said this for that case: > > > > If DEFAULT is nil, the list of default face names is taken from > > the `read-face-name' property of the text at point, or, if that > > is nil, from the `face' property of the text at point. > > > > What happens now? No information about that. See below for my guess. > > Please tell users of the function what its behavior is. >=20 > As far as I can see, if DEFAULT is nil, there is no list of default face > names? Yes, and so no default value is put in the prompt. Note: This handling of the prompt and the default value(s) for this function have a long and torturous history. This stuff has been changed a zillion times, with each time being something arcane and incomprehensible for users (IMHO). It is simpler (better) now. This item (#1) can be closed: if DEFAULT is nil now, the only effect it has is on the return value (`nil').=20 > > 2. The doc string says that DEFAULT is returned if the user enters the > > empty string. That is clearly wrong, at least when DEFAULT is a list o= f > > faces or face names. DEFAULT is not returned in such cases. The most > > that can be said in general is that DEFAULT _determines_ what is > > returned for empty input - not that DEFAULT _is_ what is returned. >=20 > I've now made the doc string more correct, if more difficult to parse. I trust it must be better. It can always be improved more in the future if not completely satisfactory. Thx. > > 8. What happened to the useful defaulting of previous Emacs versions? > > Yes, I know why you made the change, but now any existing code that use= s > > `read-face-name' is broken if it depends on `r-f-n' to provide such > > defaulting. Too bad. > > > > Please consider: There is more Elisp code in the world than just what i= s > > distributed by Emacs Dev. `read-face-name' has been and continues to b= e > > a poster child of how not to evolve code. It has morphed in incompatib= le > > ways from version to version. The right way to do what you wanted to d= o > > for Emacs 24.4 would have been to go ahead and define `face-at-point', > > but to *use* it in `read-face-name', so that that function continues to > > provide the expected defaulting when DEFAULT is nil: > > > > (unless default (setq default (face-at-point))) > > > > I somehow doubt that that part of the regression will be fixed, but > > perhaps some of the other points above have a chance of being addressed= . >=20 > Yes, that's outside the scope of read-face-name, I think.