diff options
| author | Karl Heuer | 1994-04-16 04:07:43 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-04-16 04:07:43 +0000 |
| commit | df4de8c63ece4ef4bd2734675a499a3485d534ef (patch) | |
| tree | 3a441031ecce75bac2ca1ac3d5a229232b96e937 | |
| parent | 5964e4506617613f833e333483ae099489fbc427 (diff) | |
| download | emacs-df4de8c63ece4ef4bd2734675a499a3485d534ef.tar.gz emacs-df4de8c63ece4ef4bd2734675a499a3485d534ef.zip | |
(mouse-set-font): Don't error if no selection.
| -rw-r--r-- | lisp/mouse.el | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 3528280edb9..37dec0fa498 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -1302,18 +1302,18 @@ and selects that window." | |||
| 1302 | "Select an emacs font from a list of known good fonts" | 1302 | "Select an emacs font from a list of known good fonts" |
| 1303 | (interactive | 1303 | (interactive |
| 1304 | (x-popup-menu last-nonmenu-event x-fixed-font-alist)) | 1304 | (x-popup-menu last-nonmenu-event x-fixed-font-alist)) |
| 1305 | (let (font) | 1305 | (if fonts |
| 1306 | (setq foo font bar fonts) | 1306 | (let (font) |
| 1307 | (while fonts | 1307 | (while fonts |
| 1308 | (condition-case nil | 1308 | (condition-case nil |
| 1309 | (progn | 1309 | (progn |
| 1310 | (modify-frame-parameters (selected-frame) | 1310 | (modify-frame-parameters (selected-frame) |
| 1311 | (list (cons 'font (car fonts)))) | 1311 | (list (cons 'font (car fonts)))) |
| 1312 | (setq font (car fonts)) | 1312 | (setq font (car fonts)) |
| 1313 | (setq fonts nil)) | 1313 | (setq fonts nil)) |
| 1314 | (error (setq fonts (cdr fonts))))) | 1314 | (error (setq fonts (cdr fonts))))) |
| 1315 | (if font | 1315 | (if (null font) |
| 1316 | (progn | 1316 | (error "Font not found") |
| 1317 | ;; Update some standard faces too. | 1317 | ;; Update some standard faces too. |
| 1318 | (set-face-font 'bold nil (selected-frame)) | 1318 | (set-face-font 'bold nil (selected-frame)) |
| 1319 | (make-face-bold 'bold (selected-frame) t) | 1319 | (make-face-bold 'bold (selected-frame) t) |
| @@ -1336,9 +1336,7 @@ and selects that window." | |||
| 1336 | (if italic | 1336 | (if italic |
| 1337 | (make-face-italic (car (car rest)) (selected-frame))))))) | 1337 | (make-face-italic (car (car rest)) (selected-frame))))))) |
| 1338 | (error nil)) | 1338 | (error nil)) |
| 1339 | (setq rest (cdr rest)))) | 1339 | (setq rest (cdr rest)))))))) |
| 1340 | ) | ||
| 1341 | (error "Font not found")))) | ||
| 1342 | 1340 | ||
| 1343 | ;;; Bindings for mouse commands. | 1341 | ;;; Bindings for mouse commands. |
| 1344 | 1342 | ||