]> git.eshelyaron.com Git - emacs.git/commitdiff
(mouse-set-font): Handle the case where the command was not invoked
authorLuc Teirlinck <teirllm@auburn.edu>
Wed, 8 Dec 2004 01:14:10 +0000 (01:14 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Wed, 8 Dec 2004 01:14:10 +0000 (01:14 +0000)
using the mouse.

lisp/mouse.el

index 912048cd1de769905089fb4e3044023536952b07..b2fa71dde2474a51d69ad4f1851a6b8354f950c8 100644 (file)
@@ -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