aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2001-11-28 17:15:33 +0000
committerEli Zaretskii2001-11-28 17:15:33 +0000
commit381e32f064972fed4c786247982e892a4f91bb3d (patch)
treeab9f1608b763f83a74522a1c3e88c70a018de55a
parentbb313871fb2099a0caebb5ee3006013de424a737 (diff)
downloademacs-381e32f064972fed4c786247982e892a4f91bb3d.tar.gz
emacs-381e32f064972fed4c786247982e892a4f91bb3d.zip
(mouse-set-font): Make it a no-op if multiple fonts
aren't supported. Print a message to that effect if invoked.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mouse.el12
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 @@
12001-11-28 Eli Zaretskii <eliz@is.elta.co.il>
2
3 * mouse.el (mouse-set-font): Make it a no-op if multiple fonts
4 aren't supported. Print a message to that effect if invoked.
5
12001-11-27 Stephen Eglen <stephen@gnu.org> 62001-11-27 Stephen Eglen <stephen@gnu.org>
2 7
3 * locate.el (locate): Put point at first matching file rather 8 * 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."
2136(defun mouse-set-font (&rest fonts) 2136(defun mouse-set-font (&rest fonts)
2137 "Select an emacs font from a list of known good fonts and fontsets." 2137 "Select an emacs font from a list of known good fonts and fontsets."
2138 (interactive 2138 (interactive
2139 (x-popup-menu 2139 (and (display-multi-font-p)
2140 last-nonmenu-event 2140 (x-popup-menu
2141 ;; Append list of fontsets currently defined. 2141 last-nonmenu-event
2142 (append x-fixed-font-alist (list (generate-fontset-menu))))) 2142 ;; Append list of fontsets currently defined.
2143 (append x-fixed-font-alist (list (generate-fontset-menu))))))
2143 (if fonts 2144 (if fonts
2144 (let (font) 2145 (let (font)
2145 (while fonts 2146 (while fonts
@@ -2151,7 +2152,8 @@ and selects that window."
2151 (error 2152 (error
2152 (setq fonts (cdr fonts))))) 2153 (setq fonts (cdr fonts)))))
2153 (if (null font) 2154 (if (null font)
2154 (error "Font not found"))))) 2155 (error "Font not found")))
2156 (message "Cannot change fonts on this display")))
2155 2157
2156;;; Bindings for mouse commands. 2158;;; Bindings for mouse commands.
2157 2159