2136 |
(defun mouse-set-font (&rest fonts) |
(defun mouse-set-font (&rest fonts) |
2137 |
"Select an emacs font from a list of known good fonts and fontsets." |
"Select an emacs font from a list of known good fonts and fontsets." |
2138 |
(interactive |
(interactive |
2139 |
(x-popup-menu |
(and (display-multi-font-p) |
2140 |
last-nonmenu-event |
(x-popup-menu |
2141 |
;; Append list of fontsets currently defined. |
last-nonmenu-event |
2142 |
(append x-fixed-font-alist (list (generate-fontset-menu))))) |
;; Append list of fontsets currently defined. |
2143 |
|
(append x-fixed-font-alist (list (generate-fontset-menu)))))) |
2144 |
(if fonts |
(if fonts |
2145 |
(let (font) |
(let (font) |
2146 |
(while fonts |
(while fonts |
2152 |
(error |
(error |
2153 |
(setq fonts (cdr fonts))))) |
(setq fonts (cdr fonts))))) |
2154 |
(if (null font) |
(if (null font) |
2155 |
(error "Font not found"))))) |
(error "Font not found"))) |
2156 |
|
(message "Cannot change fonts on this display"))) |
2157 |
|
|
2158 |
;;; Bindings for mouse commands. |
;;; Bindings for mouse commands. |
2159 |
|
|