;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; Created: 1997/3/4
-;; Version: $Id: emh-face.el,v 0.4 1997-05-22 03:24:36 morioka Exp $
+;; Version: $Id: emh-face.el,v 0.5 1997-09-25 15:11:34 morioka Exp $
;; Keywords: header, highlighting
;; This file is part of emh.
(med (match-end 0))
(end (std11-field-end))
(field-name (buffer-substring beg med))
- (rule (cdr (or (assoc-if (function
- (lambda (key)
- (and (stringp key)
- (string-match key field-name)
- )))
- emh-header-face)
- (assq t emh-header-face)
- )))
+ (rule (catch 'found
+ (let ((rest emh-header-face))
+ (while rest
+ (let* ((rule (car rest))
+ (key (car rule)))
+ (if (and (stringp key)
+ (string-match key field-name))
+ (throw 'found (cdr rule))
+ ))
+ (setq rest (cdr rest))
+ )
+ (cdr (assq t emh-header-face))
+ )))
)
(overlay-put (make-overlay beg med) 'face (car rule))
- (overlay-put (make-overlay med end) 'face (second rule))
+ (overlay-put (make-overlay med end) 'face (cadr rule))
)
(forward-char)
))