# HG changeset patch # User Richard M. Stallman # Date 1022690215 0 # Node ID 1739a350f81ce01854db28b67bfe0c54a1ecc8b4 # Parent 5a8e504582e3a0ba47b125aabb296ea6607fe089 (mouse-set-font): Avoid misleading error message if user makes no selection. diff -r 5a8e504582e3 -r 1739a350f81c lisp/mouse.el --- a/lisp/mouse.el Wed May 29 16:35:56 2002 +0000 +++ b/lisp/mouse.el Wed May 29 16:36:55 2002 +0000 @@ -2175,11 +2175,12 @@ (defun mouse-set-font (&rest fonts) "Select an emacs font from a list of known good fonts and fontsets." (interactive - (and (display-multi-font-p) - (x-popup-menu - last-nonmenu-event - ;; Append list of fontsets currently defined. - (append x-fixed-font-alist (list (generate-fontset-menu)))))) + (progn (unless (display-multi-font-p) + (error "Cannot change fonts on this display")) + (x-popup-menu + last-nonmenu-event + ;; Append list of fontsets currently defined. + (append x-fixed-font-alist (list (generate-fontset-menu)))))) (if fonts (let (font) (while fonts @@ -2191,8 +2192,7 @@ (error (setq fonts (cdr fonts))))) (if (null font) - (error "Font not found"))) - (message "Cannot change fonts on this display"))) + (error "Font not found"))))) ;;; Bindings for mouse commands.