mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
(make-glyph-code): Don't test the result of `face-id',
which already signals an error for invalid faces. (glyph-face): Simplify.
This commit is contained in:
parent
7ee480ce4f
commit
e0c8ae101a
2 changed files with 11 additions and 10 deletions
|
|
@ -1,5 +1,9 @@
|
|||
2008-03-01 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* disp-table.el (make-glyph-code): Don't test the result of
|
||||
`face-id', which already signals an error for invalid faces.
|
||||
(glyph-face): Simplify.
|
||||
|
||||
* desktop.el (desktop-read): Set `desktop-dirname' to nil before
|
||||
running `desktop-not-loaded-hook' to allow modifying it.
|
||||
Don't show warning message if `desktop-dirname' was modified.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue