changeset 89127:3e0204a3fcb8

(generate-fontset-menu): Exclude the defualt fontset.
author Kenichi Handa <handa@m17n.org>
date Fri, 27 Sep 2002 04:54:02 +0000
parents 3bbfb5d2bb52
children 7c5a163f62f3
files lisp/international/fontset.el
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/fontset.el	Fri Sep 27 04:51:34 2002 +0000
+++ b/lisp/international/fontset.el	Fri Sep 27 04:54:02 2002 +0000
@@ -427,14 +427,12 @@
 ;; Return a list to be appended to `x-fixed-font-alist' when
 ;; `mouse-set-font' is called.
 (defun generate-fontset-menu ()
-  (let ((fontsets (fontset-list))
-	fontset-name
-	l)
-    (while fontsets
-      (setq fontset-name (car fontsets) fontsets (cdr fontsets))
-      (setq l (cons (list (fontset-plain-name fontset-name) fontset-name) l)))
+  (let (l)
+    (dolist (fontset (fontset-list))
+      (or (string-match "fontset-default$" fontset)
+	  (push (list (fontset-plain-name fontset) fontset) l)))
     (cons "Fontset"
-	  (sort l (function (lambda (x y) (string< (car x) (car y))))))))
+	  (sort l #'(lambda (x y) (string< (car x) (car y)))))))
 
 (defun fontset-plain-name (fontset)
   "Return a plain and descriptive name of FONTSET."