From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.devel Subject: Re: Recent read-face patch breaks `M-x customize-face' Date: Sun, 7 Apr 2013 16:15:17 -0500 Message-ID: <20833.57829.250404.900356@gargle.gargle.HOWL> References: <20130405175032.GA29138@saturn> <20831.7759.573008.165973@gargle.gargle.HOWL> <20832.3369.138812.620060@gargle.gargle.HOWL> <20832.37370.297168.937525@gargle.gargle.HOWL> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1365445705 4768 80.91.229.3 (8 Apr 2013 18:28:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Apr 2013 18:28:25 +0000 (UTC) Cc: Giorgos Keramidas , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 08 20:28:27 2013 Return-path: Envelope-to: ged-emacs-devel@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 1UPGng-0000pw-MI for ged-emacs-devel@m.gmane.org; Mon, 08 Apr 2013 20:28:16 +0200 Original-Received: from localhost ([::1]:39680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOwvv-0001rN-23 for ged-emacs-devel@m.gmane.org; Sun, 07 Apr 2013 17:15:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOwvq-0001rF-Q1 for emacs-devel@gnu.org; Sun, 07 Apr 2013 17:15:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOwvo-0000Vx-9j for emacs-devel@gnu.org; Sun, 07 Apr 2013 17:15:22 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOwvo-0000Vt-54 for emacs-devel@gnu.org; Sun, 07 Apr 2013 17:15:20 -0400 Original-Received: from adsl-68-77-17-140.dsl.emhril.ameritech.net ([68.77.17.140]:48263 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1UOwvn-0000iY-EP; Sun, 07 Apr 2013 17:15:19 -0400 In-Reply-To: X-Mailer: VM 8.2 trial under 24.3.1 (x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158771 Archived-At: On Sat Apr 6 2013 Stefan Monnier wrote: > > Removing this magic from read-face-name would require in turn that > > commands such as make-face-bold call face-at-point for a reasonable > > value of DEFAULT. In my humble opinion, this appears to be the > > cleanest solution. > > I think the for sake of backward compatibility, it is best to just > preserve the kludge. The command customize-face is actually more subtle than I had realized previously. It calls read-face-name with DEFAULT being "all faces". But read-face-name used to ignore and override this value when there was a "face at point". So the value of DEFAULT was really (or (face-at-point) "all faces"). From a user perspective, this behavior is certainly quite reasonable. But for the old implementation it was crucial that read-face-name would replace "all faces" by (face-at-point). This overriding of the value of DEFAULT was rather weird behavior and I'd like to avoid this if somehow possible. Backward compatibilty should not break existing code. But under this umbrella it must be possible to modify and improve the code. So backward compatiblity requires that the arg DEFAULT of read-face-name may be a list of faces (as the docstring says). But a symbol (representing a single face) or a string (which may represent a single face, a comma-separated list of faces, or some "bogus face" such as "all faces") should be accepted, too. But as long as the prompt of read-face-name tells the user the actual value of DEFAULT, this will not break anybody's existing code. - Did I overlook something here? Roland