X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Ffont.el;h=db52f882b2b72c8a0b9ee4ceb162d99f517c1034;hb=a72bc64d8117d91300286e043ee2ab85821bfe02;hp=b6baa2980368450685dadf3834f47bb6e9038988;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git diff --git a/lisp/font.el b/lisp/font.el index b6baa29..db52f88 100644 --- a/lisp/font.el +++ b/lisp/font.el @@ -299,7 +299,7 @@ for use in the 'weight' field of an X font string.") w2)))) (defun font-spatial-to-canonical (spec &optional device) - "Convert SPEC (in inches, millimeters, points, or picas) into points" + "Convert SPEC (in inches, millimeters, points, or picas) into points." ;; 1 in = 6 pa = 25.4 mm = 72 pt (cond ((numberp spec) @@ -596,9 +596,10 @@ for use in the 'weight' field of an X font string.") ;;;###autoload (defun font-default-object-for-device (&optional device) (let ((font (font-default-font-for-device device))) - (unless (cdr-safe (assoc font font-default-cache)) - (push (cons font (font-create-object font)) font-default-cache) - (cdr-safe (assoc font font-default-cache))))) + (or (cdr-safe (assoc font font-default-cache)) + (let ((object (font-create-object font))) + (push (cons font object) font-default-cache) + object)))) ;;;###autoload (defun font-default-family-for-device (&optional device)