clean up two macros in ob-comint
commit24fe50671e1150a3915a42b75d0c1aa5765fcd2f
authorAaron Ecay <aaronecay@gmail.com>
Mon, 28 Oct 2013 22:58:44 +0000 (28 18:58 -0400)
committerEric Schulte <schulte.eric@gmail.com>
Wed, 30 Oct 2013 01:52:35 +0000 (29 19:52 -0600)
tree0c125af9ee1653c60ece81af67e5c0ebeba2035d
parent5aaf45ea6d5e2e5d3fd9c07fcb6e1b27d6178f03
clean up two macros in ob-comint

* lisp/ob-comint.el (org-babel-comint-with-output,
org-babel-comint-in-buffer): clean up code.

This patch replaces some deeply nested ca/dr calls with ‘nth’, and
replaces a setq/unwind-protect/setq incantation with a simple let
binding.  Finally, it also restructures ’org-babel-comint-in-buffer’
to not needlessly save/restore match and excursion data if the buffer
process is not live, and to use with-current-buffer instead of
save-excursion+set-buffer
(info "(elisp) Excursions")
lisp/ob-comint.el