From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: list-faces-display Date: Mon, 30 May 2005 15:39:28 +0200 Message-ID: Reply-To: Juanma Barranquero NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1117460316 3707 80.91.229.2 (30 May 2005 13:38:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 30 May 2005 13:38:36 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 30 15:38:35 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DckTO-0006et-IN for ged-emacs-devel@m.gmane.org; Mon, 30 May 2005 15:38:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DckYH-0000Ii-ID for ged-emacs-devel@m.gmane.org; Mon, 30 May 2005 09:43:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DckXj-0000DS-Ss for emacs-devel@gnu.org; Mon, 30 May 2005 09:43:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DckXj-0000Cf-0A for emacs-devel@gnu.org; Mon, 30 May 2005 09:42:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DckXi-0000Bu-Rh for emacs-devel@gnu.org; Mon, 30 May 2005 09:42:58 -0400 Original-Received: from [64.233.184.196] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DckVs-0005SK-7E for emacs-devel@gnu.org; Mon, 30 May 2005 09:41:04 -0400 Original-Received: by wproxy.gmail.com with SMTP id 50so1557094wri for ; Mon, 30 May 2005 06:39:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=CGwqvznMJvU5ZFy4EJpAxZhyTumdXCz2f09EXM+d/dBBTa28QBp7BCVMeMmADlFXIzcYRSDmVewbUOUHIj89dK32yu2VLBjUzT/m5mQLypIr6E3AHu8O2PElBHxn8IkNe3Oy4pNXY9eTk4ewKq3wKM5vU+HnVPcgo8LMqvvyIzA= Original-Received: by 10.54.52.61 with SMTP id z61mr2655748wrz; Mon, 30 May 2005 06:39:28 -0700 (PDT) Original-Received: by 10.54.82.6 with HTTP; Mon, 30 May 2005 06:39:28 -0700 (PDT) Original-To: emacs-devel@gnu.org Content-Disposition: inline X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:37891 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37891 The new regexp argument for list-faces-display is not documented on NEWS. Should it? And if yes, in what section? "Changes in Specialized Modes and Packages in Emacs 22.1" and "Lisp Changes in Emacs 22.1" both seem in order. Somewhat related: on 1999-07-21 Gerd committed lots and lots of changes (possibly he was synchronizing from a branch). faces.el got an almost complete rewrite, and in particular list-faces-display lost the following ability: 1999-01-11 Richard Stallman * faces.el (list-faces-display): Improve the formatting by computing the maximum length required for any face-name. (I'm attaching a patch that shows the changes done to list-faces-display; line numbers are wrong because I've cut out just the code for the function) Question is, should this change be reverted? And, it is that a bugfix or a new feature? /L/e/k/t/u --- faces-1.138=09Mon May 30 13:35:15 2005 +++ faces-1.139=09Mon May 30 13:35:29 2005 @@ -1,2 +1 @@ -=0C (defvar list-faces-sample-text @@ -5,4 +4,6 @@ =20 -;; The name list-faces would be more consistent, but let's avoid a conflic= t -;; with Lucid, which uses that name differently. + +;; The name list-faces would be more consistent, but let's avoid a +;; conflict with Lucid, which uses that name differently. + (defun list-faces-display () @@ -10,16 +11,8 @@ The sample text is a string that comes from the variable -`list-faces-sample-text'. - -It is possible to give a particular face name different appearances in -different frames. This command shows the appearance in the -selected frame." +`list-faces-sample-text'." (interactive) - (let ((faces (sort (face-list) (function string-lessp))) + (let ((faces (sort (face-list) #'string-lessp)) =09(face nil) =09(frame (selected-frame)) -=09disp-frame window - (face-name-max-length - (car (sort (mapcar (function string-width) -=09=09=09 (mapcar (function symbol-name) (face-list))) - (function >))))) +=09disp-frame window) (with-output-to-temp-buffer "*Faces*" @@ -31,6 +24,3 @@ =09 (setq faces (cdr faces)) -=09 (insert (format=20 - (format "%%-%ds " - face-name-max-length) - (symbol-name face))) +=09 (insert (format "%25s " (face-name face))) =09 (let ((beg (point))) @@ -43,3 +33,3 @@ =09 (while (not (eobp)) -=09 (insert-char ? (1+ face-name-max-length)) +=09 (insert " ") =09 (forward-line 1))))