Mercurial > hg > xemacs-beta
diff lisp/x-font-menu.el @ 523:cd662ad69f40
[xemacs-hg @ 2001-05-09 13:43:49 by ben]
regex.c: fix error compiling regexps with back-references in them.
xemacs.mak: do not warn about gtk when we're not trying to compile with it.
font.el, gtk-widget-accessors.el, widgets-gtk.el, x-font-menu.el: fix byte-compilation warnings.
etags.c: temporary fix to avoid crashes with new regex code.
PROBLEMS: i swear i already committed this.
author | ben |
---|---|
date | Wed, 09 May 2001 13:43:58 +0000 |
parents | 7039e6323819 |
children | 8b464283e891 |
line wrap: on
line diff
--- a/lisp/x-font-menu.el Wed May 09 11:48:28 2001 +0000 +++ b/lisp/x-font-menu.el Wed May 09 13:43:58 2001 +0000 @@ -190,7 +190,7 @@ ;; If the user didn't specify one (with "-dt-*-*", for example) ;; get the truename and use the possibly suboptimal data from that. ;;;###autoload -(defun* x-font-menu-font-data (face dcache) +(defun x-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) @@ -207,21 +207,22 @@ (string-match x-font-regexp-foundry-and-family truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) - (when (null entry) - (return-from x-font-menu-font-data (make-vector 5 nil))) - - (when (string-match x-font-regexp name) - (setq weight (capitalize (match-string 1 name))) - (setq size (string-to-int (match-string 6 name)))) + + (if (null entry) + (make-vector 5 nil) + + (when (string-match x-font-regexp name) + (setq weight (capitalize (match-string 1 name))) + (setq size (string-to-int (match-string 6 name)))) - (when (string-match x-font-regexp truename) - (when (not (member weight (aref entry 1))) - (setq weight (capitalize (match-string 1 truename)))) - (when (not (member size (aref entry 2))) - (setq size (string-to-int (match-string 6 truename)))) - (setq slant (capitalize (match-string 2 truename)))) + (when (string-match x-font-regexp truename) + (when (not (member weight (aref entry 1))) + (setq weight (capitalize (match-string 1 truename)))) + (when (not (member size (aref entry 2))) + (setq size (string-to-int (match-string 6 truename)))) + (setq slant (capitalize (match-string 2 truename)))) - (vector entry family size weight slant))) + (vector entry family size weight slant)))) (defun x-font-menu-load-font (family weight size slant resolution) "Try to load a font with the requested properties.