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: Re: list-faces-display Date: Tue, 31 May 2005 13:15:21 +0200 Message-ID: References: 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 1117538648 11826 80.91.229.2 (31 May 2005 11:24:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 May 2005 11:24:08 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 31 13:24:00 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dd4qV-00082n-Mi for ged-emacs-devel@m.gmane.org; Tue, 31 May 2005 13:23:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dd4va-0001Rc-8Q for ged-emacs-devel@m.gmane.org; Tue, 31 May 2005 07:28:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dd4tz-0000kK-RP for emacs-devel@gnu.org; Tue, 31 May 2005 07:27:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dd4tr-0000hR-Gw for emacs-devel@gnu.org; Tue, 31 May 2005 07:27:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dd4to-0000aN-6x for emacs-devel@gnu.org; Tue, 31 May 2005 07:27:08 -0400 Original-Received: from [64.233.184.195] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dd4kA-0000nX-EN for emacs-devel@gnu.org; Tue, 31 May 2005 07:17:10 -0400 Original-Received: by wproxy.gmail.com with SMTP id 57so2609644wri for ; Tue, 31 May 2005 04:15:21 -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:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AR6O6hdZ9Wkc3dLRJGPimuynTOT+k/O3IgsXcb1OHsUizgxBJ2hydkDRdv6Kkrs5M4YMWFpr619kkK3M4GJ4obsXxsNOy80Nskp3Ze8+hlci5V/i/AVPMHnym0lVXmBWSR0HMU4p2jCmy2uCGKPC/5aMSkIIorUqRYCJYZu+Fu4= Original-Received: by 10.54.51.17 with SMTP id y17mr2994303wry; Tue, 31 May 2005 04:15:21 -0700 (PDT) Original-Received: by 10.54.82.6 with HTTP; Tue, 31 May 2005 04:15:21 -0700 (PDT) Original-To: emacs-devel@gnu.org In-Reply-To: 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:37942 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37942 Anyway, this is the patch I propose, if deemed a fix and not a feature. --=20 /L/e/k/t/u Index: faces.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v retrieving revision 1.310 diff -u -2 -r1.310 faces.el --- faces.el=0931 May 2005 11:10:43 -0000=091.310 +++ faces.el=0931 May 2005 11:07:42 -0000 @@ -1155,16 +1155,21 @@ (interactive (list (and current-prefix-arg (read-string "List faces matching regexp: ")))) - (let ((faces (sort (face-list) #'string-lessp)) + (let ((all-faces (zerop (length regexp))) =09(frame (selected-frame)) +=09(max-length 0) +=09face line-format =09disp-frame window face-name) - (when (> (length regexp) 0) - (setq faces - (delq nil - (mapcar (lambda (f) - (when (string-match regexp (symbol-name f)) - f)) - faces))) - (unless faces - (error "No faces matching \"%s\"" regexp))) + (setq faces +=09 (delq nil +=09=09(mapcar (lambda (f) +=09=09=09 (let ((s (symbol-name f))) +=09=09=09 (when (or all-faces (string-match regexp s)) +=09=09=09 (setq max-length (max (length s) max-length)) +=09=09=09 f))) +=09=09=09(sort (face-list) #'string-lessp)))) + (unless faces + (error "No faces matching \"%s\"" regexp)) + (setq max-length (1+ max-length) +=09 line-format (format "%%-%ds" max-length)) (with-output-to-temp-buffer "*Faces*" (save-excursion @@ -1181,5 +1186,5 @@ =09(dolist (face faces) =09 (setq face-name (symbol-name face)) -=09 (insert (format "%25s " face-name)) +=09 (insert (format line-format face-name)) =09 ;; Hyperlink to a customization buffer for the face. Using =09 ;; the help xref mechanism may not be the best way. @@ -1206,5 +1211,5 @@ =09 (forward-line 1) =09 (while (not (eobp)) -=09 (insert " ") +=09 (insert-char ?\s max-length) =09 (forward-line 1)))) =09(goto-char (point-min)))