branch: externals/hyperbole commit 40f5f900387606e6be7fc8ca41d05858f96ed20f Author: bw <r...@gnu.org> Commit: bw <r...@gnu.org>
hycontrol.el - Eliminate error if frame-cmds library is missing --- ChangeLog | 4 ++++ hycontrol.el | 7 +++++-- test/hact-tests.el | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4f99dc8c9f..4d14abaf84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,10 @@ so does not include extra whitespace and matches the result when 'hui-select-thing' is called interactively. +* hycontrol.el (require 'zoom-frm): Wrap in an 'ignore-errors' so if its + required library, 'frame-cmds' is not installed, no error occurs and + HyControl behaves works without the library. + 2025-02-19 Bob Weiner <r...@gnu.org> * hyrolo.el (hyrolo-expand-path-list): Fix to include a default file name diff --git a/hycontrol.el b/hycontrol.el index 6ab38cd7a8..bb2adb5b8f 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: 29-Jan-25 at 19:05:16 by Mats Lidell +;; Last-Mod: 22-Feb-25 at 09:41:32 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -135,7 +135,10 @@ (require 'windmove)) ;; Frame face enlarging/shrinking (zooming) requires this separately available library. ;; Everything else works fine without it, so don't make it a required dependency. -(require 'zoom-frm nil t) +;; It also requires the separate library, 'frame-cmds', so ignore any +;; errors if that library is not found as well. +(ignore-errors + (require 'zoom-frm nil t)) ;;; ************************************************************************ ;;; Public declarations diff --git a/test/hact-tests.el b/test/hact-tests.el index 00c37b1e0c..7564b3ce10 100644 --- a/test/hact-tests.el +++ b/test/hact-tests.el @@ -3,7 +3,7 @@ ;; Author: Mats Lidell ;; ;; Orig-Date: 16-May-24 at 00:29:22 -;; Last-Mod: 16-May-24 at 23:51:18 by Mats Lidell +;; Last-Mod: 22-Feb-25 at 09:35:56 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -23,8 +23,8 @@ (ert-deftest hact-tests--action-params-with-lambdas () "Lambda used with `action:params' should return the lambda parameters." (should (equal nil (action:params (lambda () nil)))) - (should (equal '(x) (action:params (lambda (x) nil)))) - (should (equal '(x y) (action:params (lambda (x y) nil))))) + (should (equal '(_x) (action:params (lambda (_x) nil)))) + (should (equal '(_x _y) (action:params (lambda (_x _y) nil))))) (ert-deftest hact-tests--actype-act-with-lambdas () "Lambda with `actype:act' should work over versions of Emacs.