aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck <[email protected]>2004-12-08 01:14:10 +0000
committerLuc Teirlinck <[email protected]>2004-12-08 01:14:10 +0000
commit91c5141258ec8dc828d8b558e3df72696ca9aa4e (patch)
tree7b1ab9f3de0f456812bd1c92f2fa1d08fc168acb
parentb680abcbeb4b5192c35a5602a8d6e9240ffdde74 (diff)
(mouse-set-font): Handle the case where the command was not invoked
using the mouse.
-rw-r--r--lisp/mouse.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 912048cd1d..b2fa71dde2 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -2201,7 +2201,9 @@ and selects that window."
(progn (unless (display-multi-font-p)
(error "Cannot change fonts on this display"))
(x-popup-menu
- last-nonmenu-event
+ (if (listp last-nonmenu-event)
+ last-nonmenu-event
+ (list '(0 0) (selected-window)))
;; Append list of fontsets currently defined.
(append x-fixed-font-alist (list (generate-fontset-menu))))))
(if fonts