|
3 | 3 | ;; Author: Bob Weiner |
4 | 4 | ;; |
5 | 5 | ;; Orig-Date: 1-Jun-16 at 15:35:36 |
6 | | -;; Last-Mod: 13-Oct-25 at 23:47:09 by Mats Lidell |
| 6 | +;; Last-Mod: 26-Oct-25 at 16:04:51 by Bob Weiner |
7 | 7 | ;; |
8 | 8 | ;; SPDX-License-Identifier: GPL-3.0-or-later |
9 | 9 | ;; |
@@ -845,24 +845,26 @@ the hycontrol menu." |
845 | 845 |
|
846 | 846 | (defun hycontrol-frame-zoom (increment) |
847 | 847 | "Change the font size of all faces by INCREMENT. |
848 | | -Use `global-text-scale-adjust' if it exists. If on an older Emacs that |
849 | | -does not have it see if zoom-frm.el is available and use that." |
| 848 | +Use `global-text-scale-adjust' if it exists. If on an older Emacs without |
| 849 | +that function, use \"zoom-frm.el\" if available." |
850 | 850 | (if (fboundp 'global-text-scale-adjust) |
851 | 851 | (hycontrol-global-text-scale-adjust increment) |
852 | | - (if (not (and (fboundp 'zoom-all-frames-in) (fboundp 'zoom-all-frames-out))) |
853 | | - (hycontrol-user-error hycontrol-debug "(HyControl): Zooming requires separate \"zoom-frm.el\" Emacs Lisp library installation") |
854 | | - (if (< 0 increment) |
855 | | - (zoom-all-frames-in) |
856 | | - (zoom-all-frames-out))))) |
| 852 | + (unless (fboundp 'zoom-frm-in) |
| 853 | + (hycontrol-user-error hycontrol-debug "(HyControl): Zooming requires separate \"zoom-frm.el\" Emacs Lisp library installation")) |
| 854 | + (require 'zoom-frm) |
| 855 | + (if (< 0 increment) |
| 856 | + (zoom-all-frames-in) |
| 857 | + (zoom-all-frames-out)))) |
857 | 858 |
|
858 | 859 | (defun hycontrol-frame-zoom-reset () |
859 | 860 | "Reset zoom level back to default." |
860 | 861 | (if (fboundp 'global-text-scale-adjust) |
861 | 862 | (hycontrol-global-text-scale-adjust 0) |
862 | | - (if (not (fboundp 'zoom-frm-unzoom)) |
863 | | - (hycontrol-user-error hycontrol-debug "(HyControl): Zooming requires separate \"zoom-frm.el\" Emacs Lisp library installation") |
864 | | - (dolist (fr (visible-frame-list)) |
865 | | - (zoom-frm-unzoom fr))))) |
| 863 | + (unless (fboundp 'zoom-frm-in) |
| 864 | + (hycontrol-user-error hycontrol-debug "(HyControl): Zooming requires separate \"zoom-frm.el\" Emacs Lisp library installation")) |
| 865 | + (require 'zoom-frm) |
| 866 | + (dolist (fr (visible-frame-list)) |
| 867 | + (zoom-frm-unzoom fr)))) |
866 | 868 |
|
867 | 869 | (defun hycontrol-make-frame () |
868 | 870 | "Create a new frame with the same size and selected buffer as the selected frame. |
|
0 commit comments