branch: externals/hyperbole
commit e01c187fab9f8d9ab5141f30ffe3dc99ae3974ea
Author: bw <[email protected]>
Commit: bw <[email protected]>

    hycontrol.el - Improve cmd prompt layout and handle zoom reset errs
---
 ChangeLog    |  7 +++++++
 hycontrol.el | 33 +++++++++++++++++++++------------
 2 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5e4093b3b65..237dcab4d9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-07-04  Bob Weiner  <[email protected]>
+
+* hycontrol.el (hycontrol-frame-zoom-reset): Handle 'frame not zoomed'
+    error by displaying a message instead to preven leaving HyControl mode.
+               (hycontrol--frames-prompt-format, 
hycontrol--windows-prompt-format):
+    Reformat for easier readability.
+
 2026-06-30  Bob Weiner  <[email protected]>
 
 * hui-mini.el (hui:menu-maybe-highlight-item-keys): Fix that in
diff --git a/hycontrol.el b/hycontrol.el
index 0645b80df15..f3983b187de 100644
--- a/hycontrol.el
+++ b/hycontrol.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:     1-Jun-16 at 15:35:36
-;; Last-Mod:     31-Dec-25 at 16:02:19 by Mats Lidell
+;; Last-Mod:      4-Jul-26 at 21:39:44 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -476,21 +476,26 @@ for it to be omitted by `list-buffers'."
 ;;; ************************************************************************
 
 (defvar hycontrol--frames-prompt-format
- (concat "FRAMES: (h=heighten, s=shorten, w=widen, n=narrow, %%/H/W=screen 
%%age, arrow=move frame) by %d unit%s, .=clear units\n"
-        ;; d/^/D=delete/iconify frame/others - iconify left out due to some 
bug on macOS (see comment near ^ below)
-        "a/A=cycle adjust width/height, d/D=delete frame/others, o/O=other 
win/frame, I/J/K/M=to frame, [/]=create frame, (/)=save/restore fconfig\n"
-        "@=grid of wins, f/F=clone/move win to new frame, 
-/+=minimize/maximize frame, ==frames same size, u/b/~=un/bury/swap bufs\n"
-        "Frame to edges: c=cycle, i/j/k/m=expand/contract, p/num-keypad=move; 
z/Z/X=zoom out/in/reset, t=to WINDOWS mode, Q=quit")
+  (concat "FRAMES:        (h=heighten, s=shorten, w=widen,  n=narrow, 
%%/H/W=screen %%age, arrow=move frame) by %d unit%s\n"
+          "                .=clear units,                   a/A=cycle frame 
width/height\n"
+          ;; d/^/D=delete/iconify frame/others - iconify left out due to some 
bug on macOS (see comment near ^ below)
+          "                d/D=delete frame/others,         o/O=other 
win/frame,         I/J/K/M=to frame\n"
+          "                [/]=create frame,                (/)=save/restore 
fconfig,    @=grid of wins\n"
+          "                f/F=clone/move win to new frame, 
-/+=minimize/maximize frame, ==frames same size\n"
+          "                u/b/~=un/bury/swap bufs,         z/Z/X=zoom txt 
out/in/reset, t=to WINDOWS mode, Q=quit\n"
+          "Frame to edges: c=cycle,                         
i/j/k/m=expand/contract,     p/num-keypad=move")
  "HyControl frames-mode minibuffer prompt string to pass to format.
 Format it with 2 arguments: `prefix-arg' and a plural string indicating if
 `prefix-arg' is not equal to 1.")
 
 (defvar hycontrol--windows-prompt-format
-  (concat
-   "WINDOWS: (h=heighten, s=shorten, w=widen, n=narrow, arrow=move frame) by 
%d unit%s, .=clear units\n"
-   "a/A=cycle adjust frame width/height, d/D=delete win/others, o/O=other 
win/frame, I/J/K/M=to window, [/]=split win atop/sideways, (/)=save/restore 
wconfig\n"
-   "@=grid of wins, f/F=clone/move win to new frame, -/+=minimize/maximize 
win, ==wins same size, u/b/~=un/bury/swap bufs\n"
-   "Frame to edges: c=cycle, i/j/k/m=expand/contract, p/num-keypad=move; 
z/Z/X=zoom out/in/reset, t=to FRAMES mode, Q=quit")
+  (concat "WINDOWS:       (h=heighten, s=shorten, w=widen,  n=narrow, 
arrow=move frame) by %d unit%s\n"
+          "                .=clear units,                   a/A=cycle frame 
width/height\n"
+          "                d/D=delete win/others,           o/O=other 
win/frame,         I/J/K/M=to window\n"
+          "                [/]=split win atop/sideways,     (/)=save/restore 
wconfig,    @=grid of wins\n"
+          "                f/F=clone/move win to new frame, 
-/+=minimize/maximize win,   ==wins same size\n"
+          "                u/b/~=un/bury/swap bufs,         z/Z/X=zoom 
out/in/reset,     t=to FRAMES mode, Q=quit\n"
+          "Frame to edges: c=cycle,                         
i/j/k/m=expand/contract,     p/num-keypad=move")
   "HyControl windows-mode minibuffer prompt string to pass to format.
 Format it with 2 arguments: `prefix-arg' and a plural string indicating if
 `prefix-arg' is not equal to 1.")
@@ -902,7 +907,11 @@ that function, use \"zoom-frm.el\" if available."
       (hycontrol-user-error hycontrol-debug "(HyControl): Zooming requires 
separate \"zoom-frm.el\" Emacs Lisp library installation"))
     (require 'zoom-frm)
     (dolist (fr (visible-frame-list))
-      (zoom-frm-unzoom fr))))
+      (condition-case nil
+          (zoom-frm-unzoom fr)
+        (error
+         (message "Frame is not zoomed")
+         (sit-for 2))))))
 
 (defun hycontrol-make-frame ()
   "Create a new frame with the same size and selected buffer as the selected 
frame.

Reply via email to