mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-09 07:40:39 -08:00
(tq-filter): Add unwind-protect and save-match-data.
This commit is contained in:
parent
36cef1b759
commit
14603e08e2
1 changed files with 8 additions and 4 deletions
|
|
@ -87,10 +87,14 @@ that's how we tell where the answer ends."
|
|||
|
||||
(defun tq-filter (tq string)
|
||||
"Append STRING to the TQ's buffer; then process the new data."
|
||||
(set-buffer (tq-buffer tq))
|
||||
(goto-char (point-max))
|
||||
(insert string)
|
||||
(tq-process-buffer tq))
|
||||
(let ((old-buffer (current-buffer)))
|
||||
(unwind-protect
|
||||
(save-match-data
|
||||
(set-buffer (tq-buffer tq))
|
||||
(goto-char (point-max))
|
||||
(insert string)
|
||||
(tq-process-buffer tq))
|
||||
(set-buffer old-buffer))))
|
||||
|
||||
(defun tq-process-buffer (tq)
|
||||
"Check TQ's buffer for the regexp at the head of the queue."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue