GNU bug report logs - #911
23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size)

Previous Next

Package: emacs;

Reported by: Ian Miller <emacs <at> soroban.fastmail.fm>

Date: Sun, 7 Sep 2008 11:45:04 UTC

Severity: normal

Tags: unreproducible

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Ian Miller <emacs <at> soroban.fastmail.fm>
Cc: 911 <at> debbugs.gnu.org
Subject: bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size)
Date: Tue, 16 Sep 2008 16:54:47 +0200
>> Sorry.  Please append the code below at the end of your .emacs and send
>> me the contents of the *face-spec-set-2* buffer after the bug occurred.
>
> Please see attached for contents of this buffer.

My bad.  When I tried this here it got me a buffer with a couple of
lines.  Yours is 600K :-( apologies to you and everyone on this list.

Please try again with the following (it should print only calls for the
default face and distinguish them according to where they are called in
`face-spec-recalc').  But please don't post it on the list this time if
it gets too large.

martin

;;;; Code starts here
(require 'cl)
(require 'faces)

(defvar face-counter 0)

(defun face-spec-recalc (face frame)
  "Reset the face attributes of FACE on FRAME according to its specs.
This applies the defface/custom spec first, then the custom theme specs,
then the override spec."
  (face-spec-reset-face face frame)
  (setq face-counter (1+ face-counter))
  (let ((face-sym (or (get face 'face-alias) face)))
    (or (get face 'customized-face)
	(get face 'saved-face)
	(progn
	  (when (eq face 'default)
	    (with-current-buffer (get-buffer-create "*face-spec-set-2*")
	      (insert
	       (format "%s-1 face %s frame %s spec %s\n" face-counter face frame spec))))
	  (face-spec-set-2 face frame (face-default-spec face))))
    (let ((theme-faces (reverse (get face-sym 'theme-face))))
      (dolist (spec theme-faces)
	(when (eq face 'default)
	  (with-current-buffer (get-buffer-create "*face-spec-set-2*")
	    (insert
	     (format "%s-2 face %s frame %s spec %s\n" face-counter face frame spec))))
	(face-spec-set-2 face frame (cadr spec))))
    (when (eq face 'default)
      (with-current-buffer (get-buffer-create "*face-spec-set-2*")
	(insert
	 (format "%s-3 face %s frame %s spec %s\n" face-counter face frame spec))))
    (face-spec-set-2 face frame (get face-sym 'face-override-spec))))
;;;; Code ends here




This bug report was last modified 16 years and 234 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.