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 14:50:55 +0200
> 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.