anonymous function instead of using flet
* lisp/ob-comint.el (org-babel-comint-with-output): Don't name the filter function, but rather pass through the anonymous lambda directly.
This commit is contained in:
parent
5b9cbe9291
commit
2817f68c17
|
@ -75,10 +75,10 @@ or user `keyboard-quit' during execution of body."
|
|||
(full-body (cadr (cdr (cdr meta)))))
|
||||
`(org-babel-comint-in-buffer ,buffer
|
||||
(let ((string-buffer "") dangling-text raw)
|
||||
(org-flet ((my-filt (text)
|
||||
(setq string-buffer (concat string-buffer text))))
|
||||
;; setup filter
|
||||
(add-hook 'comint-output-filter-functions 'my-filt)
|
||||
(setq comint-output-filter-functions
|
||||
(cons (lambda (text) (setq string-buffer (concat string-buffer text)))
|
||||
comint-output-filter-functions))
|
||||
(unwind-protect
|
||||
(progn
|
||||
;; got located, and save dangling text
|
||||
|
@ -107,7 +107,8 @@ or user `keyboard-quit' during execution of body."
|
|||
(goto-char (process-mark (get-buffer-process (current-buffer))))
|
||||
(insert dangling-text))
|
||||
;; remove filter
|
||||
(remove-hook 'comint-output-filter-functions 'my-filt)))
|
||||
(setq comint-output-filter-functions
|
||||
(cdr comint-output-filter-functions)))
|
||||
;; remove echo'd FULL-BODY from input
|
||||
(if (and ,remove-echo ,full-body
|
||||
(string-match
|
||||
|
|
Loading…
Reference in New Issue