Created
September 29, 2011 20:58
-
-
Save nicferrier/1251933 to your computer and use it in GitHub Desktop.
macro for doing lexically scoped sentinels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; -*- lexical-binding: t -*- | |
(defmacro with-process-shell-command (name buffer command &rest sentinel-forms) | |
`(let ((proc (start-process-shell-command ,name ,buffer ,command))) | |
(let ((sentinel-cb (lambda (process signal) | |
,@sentinel-forms))) | |
(set-process-sentinel proc sentinel-cb) | |
))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment