[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specp
From: |
martin rudalics |
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 |
User-agent: |
Thunderbird 2.0.0.16 (Windows/20080708) |
> 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
- bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size), martin rudalics, 2008/09/07
- bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size), Ian Miller, 2008/09/07
- bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size), martin rudalics, 2008/09/07
- bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size), Ian Miller, 2008/09/07
- bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size), martin rudalics, 2008/09/08
- bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size), martin rudalics, 2008/09/14
- bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size), Ian Miller, 2008/09/16
- bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size),
martin rudalics <=
- Message not available
- bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size), martin rudalics, 2008/09/16
- Message not available
- Message not available
- bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size), Ian Miller, 2008/09/17
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- bug#911: 23.0.60; custom-set-faces causes "New Frame" to fail (max-specpdl-size), martin rudalics, 2008/09/21