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: Sat, 6 Apr 2013 16:22:02 -0500 Message-ID: <20832.37370.297168.937525@gargle.gargle.HOWL> References: <20130405175032.GA29138@saturn> <20831.7759.573008.165973@gargle.gargle.HOWL> <20832.3369.138812.620060@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 1365283332 11070 80.91.229.3 (6 Apr 2013 21:22:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Apr 2013 21:22:12 +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 Sat Apr 06 23:22:16 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 1UOaYy-0001vv-1G for ged-emacs-devel@m.gmane.org; Sat, 06 Apr 2013 23:22:16 +0200 Original-Received: from localhost ([::1]:50184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOaYx-00087W-IU for ged-emacs-devel@m.gmane.org; Sat, 06 Apr 2013 17:22:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOaYs-00087O-3n for emacs-devel@gnu.org; Sat, 06 Apr 2013 17:22:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOaYn-0001V6-F3 for emacs-devel@gnu.org; Sat, 06 Apr 2013 17:22:09 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOaYn-0001Uf-BC for emacs-devel@gnu.org; Sat, 06 Apr 2013 17:22:05 -0400 Original-Received: from adsl-68-77-17-140.dsl.emhril.ameritech.net ([68.77.17.140]:46076 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1UOaYm-0000Xu-GO; Sat, 06 Apr 2013 17:22:04 -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:158737 Archived-At: On Sat Apr 6 2013 Stefan Monnier wrote: > Just for the record: the reason for this "all faces" argument is so that > M-x customize-face prompts with "Customize face (default `all faces'):" ...This is the previous behavior that any string value of DEFAULT (unless it gets magically overridden by a "face at point") gets displayed as default in the prompt. But if this value of DEFAULT is not a face, it is ignored in the end, that is, read-face-name returns nil. Instead of "all faces", one could use also "Hello World" to get the same final result. This behavior of read-face-name appears a bit of a kludge to me, though I understand the rationale for this in the context of customize-face. But at least such behavior needs to be documented in the doc string of read-face-name. I'd prefer if customize-face called read-face-name with DEFAULT being nil and a prompt that said something like "Customize face (use `' for `all faces')" But this doesn't work with the current code of read-face-name that may replace a DEFAULT value of nil by a "face at point". 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. Roland