Skip to content

Instantly share code, notes, and snippets.

@nicferrier
Created September 29, 2011 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicferrier/1251933 to your computer and use it in GitHub Desktop.
Save nicferrier/1251933 to your computer and use it in GitHub Desktop.
macro for doing lexically scoped sentinels
;;; -*- 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