GNU bug report logs -
#911
23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size)
Previous Next
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
Message #47 received at 911 <at> emacsbugs.donarmstrong.com (full text, mbox):
> When I tried to instrument those two functions, there was no problem
> with face-spec-recalc, but face-spec-set-2 refused to instrument
> with the following complaint:
>
> edebug-syntax-error: Invalid read syntax: "Expected lambda expression"
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.
Thanks, martin.
;;;; Code starts here
(require 'cl)
(require 'faces)
(defun face-spec-set-2 (face frame spec)
"Set the face attributes of FACE on FRAME according to SPEC."
(with-current-buffer (get-buffer-create "*face-spec-set-2*")
(insert
(format "face %s frame %s spec %s" face frame spec))
(insert "\n"))
(let* ((attrs (face-spec-choose spec frame)))
(while attrs
(let ((attribute (car attrs))
(value (car (cdr attrs))))
;; Support some old-style attribute names and values.
(case attribute
(:bold (setq attribute :weight value (if value 'bold 'normal)))
(:italic (setq attribute :slant value (if value 'italic 'normal)))
((:foreground :background)
;; Compatibility with 20.x. Some bogus face specs seem to
;; exist containing things like `:foreground nil'.
(if (null value) (setq value 'unspecified)))
(t (unless (assq attribute face-x-resources)
(setq attribute nil))))
(when attribute
(set-face-attribute face frame attribute value)))
(setq attrs (cdr (cdr attrs))))))
;;;; 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.