From a235b35a0c71dae2edfbc129b0fff5d8b4852e0b Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 9 Apr 2021 13:38:18 -0700 Subject: spw/add-once-hook: handle hooks which pass arguments --- .emacs.d/init-spw.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.emacs.d/init-spw.el b/.emacs.d/init-spw.el index 10751ceb..d8357826 100644 --- a/.emacs.d/init-spw.el +++ b/.emacs.d/init-spw.el @@ -148,9 +148,9 @@ add places the library might be available to `load-path'." which should happen just once." (let ((sym (cl-gensym))) `(progn - (fset ',sym (lambda () + (fset ',sym (lambda (&rest args) (remove-hook ,hook ',sym ,local) - (funcall ,function))) + (apply ,function args))) (add-hook ,hook ',sym ,depth ,local)))) -- cgit v1.2.3