Advertisement
Guest User

Untitled

a guest
Nov 30th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.31 KB | None | 0 0
  1.  
  2. (defun wrap-fn (fn hook)
  3.            (let ((wrapped-fn (gensym)))
  4.              (setf (symbol-function wrapped-fn)
  5.                    #'(lambda (x)
  6.                        (progn
  7.                          (funcall fn)
  8.                          (stumpwm:remove-hook hook wrapped-fn))))
  9.              wrapped-fn))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement