emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/mouse.el,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/mouse.el,v
Date: Tue, 10 Jun 2008 19:57:10 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      08/06/10 19:57:10

Index: mouse.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mouse.el,v
retrieving revision 1.334
retrieving revision 1.335
diff -u -b -r1.334 -r1.335
--- mouse.el    6 May 2008 07:57:44 -0000       1.334
+++ mouse.el    10 Jun 2008 19:57:09 -0000      1.335
@@ -2425,8 +2425,25 @@
     )
   "X fonts suitable for use in Emacs.")
 
+(defun mouse-select-font ()
+  "Prompt for a font name, using `x-popup-menu', and return it."
+  (interactive)
+  (unless (display-multi-font-p)
+    (error "Cannot change fonts on this display"))
+  (x-popup-menu
+   (if (listp last-nonmenu-event)
+       last-nonmenu-event
+     (list '(0 0) (selected-window)))
+   (append x-fixed-font-alist
+          (list (generate-fontset-menu)))))
+
 (defun mouse-set-font (&rest fonts)
-  "Select an Emacs font from a list of known good fonts and fontsets."
+  "Set the default font for the selected frame.
+The argument FONTS is a list of font names; the first valid font
+in this list is used.
+
+When called interactively, pop up a menu and allow the user to
+choose a font."
   (interactive
    (progn (unless (display-multi-font-p)
            (error "Cannot change fonts on this display"))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]