diff options
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/disp-table.el | 17 |
2 files changed, 11 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4c805de52f5..8f446aead30 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2008-03-01 Juanma Barranquero <lekktu@gmail.com> | 1 | 2008-03-01 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 2 | ||
| 3 | * disp-table.el (make-glyph-code): Don't test the result of | ||
| 4 | `face-id', which already signals an error for invalid faces. | ||
| 5 | (glyph-face): Simplify. | ||
| 6 | |||
| 3 | * desktop.el (desktop-read): Set `desktop-dirname' to nil before | 7 | * desktop.el (desktop-read): Set `desktop-dirname' to nil before |
| 4 | running `desktop-not-loaded-hook' to allow modifying it. | 8 | running `desktop-not-loaded-hook' to allow modifying it. |
| 5 | Don't show warning message if `desktop-dirname' was modified. | 9 | Don't show warning message if `desktop-dirname' was modified. |
diff --git a/lisp/disp-table.el b/lisp/disp-table.el index 9124353884b..5e28e2163e7 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el | |||
| @@ -193,11 +193,9 @@ X frame." | |||
| 193 | (if (not face) | 193 | (if (not face) |
| 194 | char | 194 | char |
| 195 | (let ((fid (face-id face))) | 195 | (let ((fid (face-id face))) |
| 196 | (cond | 196 | (if (< fid 64) ; we have 32 - 3(LSB) - 1(SIGN) - 22(CHAR) = 6 bits for face id |
| 197 | ((not fid) (error "unknown face")) | 197 | (logior char (lsh fid 22)) |
| 198 | ((< fid 64) ; we have 32 - 3(LSB) - 1(SIGN) - 22(CHAR) = 6 bits for face id | 198 | (cons char fid))))) |
| 199 | (logior char (lsh fid 22))) | ||
| 200 | (t (cons char fid)))))) | ||
| 201 | 199 | ||
| 202 | ;;;###autoload | 200 | ;;;###autoload |
| 203 | (defun glyph-char (glyph) | 201 | (defun glyph-char (glyph) |
| @@ -209,13 +207,12 @@ X frame." | |||
| 209 | ;;;###autoload | 207 | ;;;###autoload |
| 210 | (defun glyph-face (glyph) | 208 | (defun glyph-face (glyph) |
| 211 | "Return the face of glyph code GLYPH, or nil if glyph has default face." | 209 | "Return the face of glyph code GLYPH, or nil if glyph has default face." |
| 212 | |||
| 213 | (let ((face-id (if (consp glyph) (cdr glyph) (lsh glyph -22)))) | 210 | (let ((face-id (if (consp glyph) (cdr glyph) (lsh glyph -22)))) |
| 214 | (and (> face-id 0) | 211 | (and (> face-id 0) |
| 215 | (car (delq nil (mapcar (lambda (face) | 212 | (catch 'face |
| 216 | (and (eq (get face 'face) face-id) | 213 | (dolist (face (face-list)) |
| 217 | face)) | 214 | (when (eq (face-id face) face-id) |
| 218 | (face-list))))))) | 215 | (throw 'face face))))))) |
| 219 | 216 | ||
| 220 | ;;;###autoload | 217 | ;;;###autoload |
| 221 | (defun standard-display-european (arg) | 218 | (defun standard-display-european (arg) |