[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v |
Date: |
Tue, 01 Apr 2008 07:25:43 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 08/04/01 07:25:42
Index: calendar.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/calendar.el,v
retrieving revision 1.239
retrieving revision 1.240
diff -u -b -r1.239 -r1.240
--- calendar.el 1 Apr 2008 04:09:41 -0000 1.239
+++ calendar.el 1 Apr 2008 07:25:42 -0000 1.240
@@ -2390,27 +2390,35 @@
(defun calendar-make-temp-face (attrlist)
"Return a temporary face based on the attributes in ATTRLIST.
ATTRLIST is a list with elements of the form :face face :foreground color."
- (let ((temp-face (make-symbol
+ (let ((attrs attrlist)
+ faceinfo face temp-face)
+ ;; Separate :face from the other attributes. Use the last :face
+ ;; if there are more than one. FIXME is merging meaningful?
+ (while attrs
+ (if (eq (car attrs) :face)
+ (setq face (intern-soft (cadr attrs))
+ attrs (cddr attrs))
+ (push (car attrs) faceinfo)
+ (setq attrs (cdr attrs))))
+ (or (facep face) (setq face 'default))
+ (if (not faceinfo)
+ ;; No attributes to apply, so just use an existing-face.
+ face
+ ;; FIXME should we be using numbered temp-faces, re-using where poss?
+ (setq temp-face
+ (make-symbol
+ (concat ":caltemp"
(mapconcat (lambda (sym)
(cond
((symbolp sym) (symbol-name sym))
((numberp sym) (number-to-string sym))
(t sym)))
- attrlist "")))
- (faceinfo attrlist))
+ attrlist ""))))
(make-face temp-face)
- ;; Remove :face info, copy into temp-face.
- (while (setq faceinfo (memq :face faceinfo))
- ;; FIXME is there any point doing this multiple times, or could we
- ;; just take the last?
- (condition-case nil
- (copy-face (intern-soft (cadr faceinfo)) temp-face)
- (error nil))
- (setq faceinfo (cddr faceinfo)))
- (setq attrlist (delq nil attrlist))
+ (copy-face face temp-face)
;; Apply the font aspects.
- (apply 'set-face-attribute temp-face nil attrlist)
- temp-face))
+ (apply 'set-face-attribute temp-face nil (nreverse faceinfo))
+ temp-face)))
(defun mark-visible-calendar-date (date &optional mark)
"Mark DATE in the calendar window with MARK.
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/04/01
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v,
Glenn Morris <=
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/04/01
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/04/03
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/04/03
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/04/03
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/04/04
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/04/04
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/04/05
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/04/05
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/04/05
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/04/05