changeset 6914:569c2c6d812f

(mouse-set-font): Don't error if no selection.
author Karl Heuer <kwzh@gnu.org>
date Sat, 16 Apr 1994 04:07:43 +0000
parents f167828a3ec2
children ffd959526822
files lisp/mouse.el
diffstat 1 files changed, 13 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mouse.el	Sat Apr 16 03:50:38 1994 +0000
+++ b/lisp/mouse.el	Sat Apr 16 04:07:43 1994 +0000
@@ -1302,18 +1302,18 @@
   "Select an emacs font from a list of known good fonts"
   (interactive
    (x-popup-menu last-nonmenu-event x-fixed-font-alist))
-  (let (font)
-    (setq foo font bar fonts)
-    (while fonts
-      (condition-case nil
-	  (progn
-	    (modify-frame-parameters (selected-frame)
-				     (list (cons 'font (car fonts))))
-	    (setq font (car fonts))
-	    (setq fonts nil))
-	(error (setq fonts (cdr fonts)))))
-    (if font
-	(progn
+  (if fonts
+      (let (font)
+	(while fonts
+	  (condition-case nil
+	      (progn
+		(modify-frame-parameters (selected-frame)
+					 (list (cons 'font (car fonts))))
+		(setq font (car fonts))
+		(setq fonts nil))
+	    (error (setq fonts (cdr fonts)))))
+	(if (null font)
+	    (error "Font not found")
 	  ;; Update some standard faces too.
 	  (set-face-font 'bold nil (selected-frame)) 
 	  (make-face-bold 'bold (selected-frame) t)
@@ -1336,9 +1336,7 @@
 			    (if italic
 				(make-face-italic (car (car rest)) (selected-frame)))))))
 		(error nil))
-	      (setq rest (cdr rest))))
-	  )
-      (error "Font not found"))))
+	      (setq rest (cdr rest))))))))
 
 ;;; Bindings for mouse commands.