*** empty log message ***
[bpt/emacs.git] / lisp / disp-table.el
index 9124353..5e28e21 100644 (file)
@@ -193,11 +193,9 @@ X frame."
   (if (not face)
       char
     (let ((fid (face-id face)))
-      (cond
-       ((not fid) (error "unknown face"))
-       ((< fid 64) ; we have 32 - 3(LSB) - 1(SIGN) - 22(CHAR) = 6 bits for face id
-       (logior char (lsh fid 22)))
-       (t (cons char fid))))))
+      (if (< fid 64) ; we have 32 - 3(LSB) - 1(SIGN) - 22(CHAR) = 6 bits for face id
+         (logior char (lsh fid 22))
+       (cons char fid)))))
 
 ;;;###autoload
 (defun glyph-char (glyph)
@@ -209,13 +207,12 @@ X frame."
 ;;;###autoload
 (defun glyph-face (glyph)
   "Return the face of glyph code GLYPH, or nil if glyph has default face."
-
   (let ((face-id (if (consp glyph) (cdr glyph) (lsh glyph -22))))
     (and (> face-id 0)
-        (car (delq nil (mapcar (lambda (face)
-                                 (and (eq (get face 'face) face-id)
-                                      face))
-                               (face-list)))))))
+        (catch 'face
+          (dolist (face (face-list))
+            (when (eq (face-id face) face-id)
+              (throw 'face face)))))))
 
 ;;;###autoload
 (defun standard-display-european (arg)