From 381e32f064972fed4c786247982e892a4f91bb3d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 28 Nov 2001 17:15:33 +0000 Subject: [PATCH] (mouse-set-font): Make it a no-op if multiple fonts aren't supported. Print a message to that effect if invoked. --- lisp/ChangeLog | 5 +++++ lisp/mouse.el | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e5152ff1710..af7972964b9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2001-11-28 Eli Zaretskii + + * mouse.el (mouse-set-font): Make it a no-op if multiple fonts + aren't supported. Print a message to that effect if invoked. + 2001-11-27 Stephen Eglen * locate.el (locate): Put point at first matching file rather diff --git a/lisp/mouse.el b/lisp/mouse.el index 0ad52d5d7d7..4ca47e5ccc8 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -2136,10 +2136,11 @@ and selects that window." (defun mouse-set-font (&rest fonts) "Select an emacs font from a list of known good fonts and fontsets." (interactive - (x-popup-menu - last-nonmenu-event - ;; Append list of fontsets currently defined. - (append x-fixed-font-alist (list (generate-fontset-menu))))) + (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)))))) (if fonts (let (font) (while fonts @@ -2151,7 +2152,8 @@ and selects that window." (error (setq fonts (cdr fonts))))) (if (null font) - (error "Font not found"))))) + (error "Font not found"))) + (message "Cannot change fonts on this display"))) ;;; Bindings for mouse commands. -- 2.39.5