unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* list-faces-display
@ 2005-05-30 13:39 Juanma Barranquero
  2005-05-31 11:15 ` list-faces-display Juanma Barranquero
  2005-06-01  9:39 ` list-faces-display Richard Stallman
  0 siblings, 2 replies; 6+ messages in thread
From: Juanma Barranquero @ 2005-05-30 13:39 UTC (permalink / raw)


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  <rms@psilocin.ai.mit.edu>

        * 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	Mon May 30 13:35:15 2005
+++ faces-1.139	Mon May 30 13:35:29 2005
@@ -1,2 +1 @@
-\f
  (defvar list-faces-sample-text
@@ -5,4 +4,6 @@
 
-;; The name list-faces would be more consistent, but let's avoid a conflict
-;; 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))
 	(face nil)
 	(frame (selected-frame))
-	disp-frame window
-        (face-name-max-length
-         (car (sort (mapcar (function string-width)
-			    (mapcar (function symbol-name) (face-list)))
-                    (function >)))))
+	disp-frame window)
     (with-output-to-temp-buffer "*Faces*"
@@ -31,6 +24,3 @@
  	  (setq faces (cdr faces))
-	  (insert (format 
-                   (format "%%-%ds "
-                           face-name-max-length)
-                   (symbol-name face)))
+	  (insert (format "%25s " (face-name face)))
 	  (let ((beg (point)))
@@ -43,3 +33,3 @@
  	    (while (not (eobp))
-	      (insert-char ?  (1+ face-name-max-length))
+	      (insert "                          ")
 	      (forward-line 1))))

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-06-02  6:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-30 13:39 list-faces-display Juanma Barranquero
2005-05-31 11:15 ` list-faces-display Juanma Barranquero
2005-05-31 11:17   ` list-faces-display Juanma Barranquero
2005-06-01  9:39 ` list-faces-display Richard Stallman
2005-06-01 10:04   ` list-faces-display Juanma Barranquero
2005-06-02  6:40     ` list-faces-display Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).