emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

M-x customize-face in colors display buffer causes error


From: Satyaki Das
Subject: M-x customize-face in colors display buffer causes error
Date: Tue, 21 Jan 2003 15:17:29 -0800

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the address@hidden mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I have come across a little bug. To duplicate it:
 1. Start emacs with,
     emacs -q --no-site-file

 2. Then do the following:
      M-x list-colors-display
      C-x o
      M-x customize-face

An error is produced. For me it says (it could be different
based on the colors displayed):
   Wrong type argument: listp, "snow"

The stack trace (after I evaluated the read-face-name function
in emacs) is as follows:

Debugger entered--Lisp error: (wrong-type-argument listp "snow")
  car("snow")
  (setq f (car --dolist-temp--))
  (while --dolist-temp-- (setq f (car --dolist-temp--)) (progn (if ... ...) 
(setq --dolist-temp-- ...)))
  (let ((--dolist-temp-- faceprop) f) (while --dolist-temp-- (setq f ...) 
(progn ... ...)) nil)
  (dolist (f faceprop) (if (symbolp f) (push f faces)))
  (if (listp faceprop) (dolist (f faceprop) (if ... ...)) (if (symbolp 
faceprop) (setq faces ...)))
  (let ((faceprop ...) faces) (if (listp faceprop) (dolist ... ...) (if ... 
...)) (if (and ... ...) (setq faces ...)) (unless multiple (if faces ...)) 
(let* (... ...) (if multiple output ...)))
  read-face-name("Customize face" "all faces" t)
  (list (read-face-name "Customize face" "all faces" t))
* call-interactively(customize-face)
  execute-extended-command(nil)
  call-interactively(execute-extended-command)

The problem is in the read-face-name function where it tries
to come up with a useful default. It is fixed for me with the
following diff (against CVS checked out today morning):

Index: lisp/faces.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v
retrieving revision 1.275
diff -u -r1.275 faces.el
--- lisp/faces.el       21 Dec 2002 20:18:03 -0000      1.275
+++ lisp/faces.el       21 Jan 2003 23:01:39 -0000
@@ -854,13 +854,13 @@
                      (get-char-property (point) 'face)))
        faces)
     ;; Make a list of the named faces that the `face' property uses.
-    (if (listp faceprop)
-       (dolist (f faceprop)
-         (if (symbolp f)
-             (push f faces)))
-      (if (symbolp faceprop)
-         (setq faces (list faceprop))))
-    ;; If there are none, try to get a face name from the buffer.
+    (cond ((and (consp faceprop) (stringp (cdr faceprop))))
+          ((listp faceprop)
+           (dolist (f faceprop)
+             (if (symbolp f)
+                 (push f faces))))
+          ((symbolp faceprop)
+           (setq faces (list faceprop))))
     (if (and (null faces)
             (memq (intern-soft (thing-at-point 'symbol)) (face-list)))
        (setq faces (list (intern-soft (thing-at-point 'symbol)))))

Hope that helps,
Satyaki


In GNU Emacs 21.3.50.16 (i686-pc-linux-gnu)
 of 2003-01-21 on troodon
configured using `configure '--with-gtk''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

Recent input:
<down> <down> C-SPC M-> C-w C-l <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <up> <up> <down> <right> 
<right> <right> <right> <right> M-x e m a c s - b u 
<tab> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> b u 
g <tab> <backspace> <backspace> <backspace> r e p <tab> 
o <tab> r <tab> <tab> b <tab> <return>

Recent messages:
read-face-name
Quit
Mark set
Saving file /usr/local/garnome/emacs/lisp/faces.el...
Wrote /usr/local/garnome/emacs/lisp/faces.el
Mark set [2 times]
call-interactively: End of buffer
Mark set [3 times]
Making completion list... [3 times]
Loading emacsbug...done




reply via email to

[Prev in Thread] Current Thread [Next in Thread]