summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-04-09 13:38:18 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-04-09 13:39:47 -0700
commita235b35a0c71dae2edfbc129b0fff5d8b4852e0b (patch)
tree77b1b6c19abda910804d31b753694fc611c8743d
parent88947081c7f5775e044694f20753dab9fd1bc47d (diff)
downloaddotfiles-a235b35a0c71dae2edfbc129b0fff5d8b4852e0b.tar.gz
spw/add-once-hook: handle hooks which pass arguments
-rw-r--r--.emacs.d/init-spw.el4
1 files 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))))