# HG changeset patch # User Richard M. Stallman # Date 947646314 0 # Node ID dbaaa90ea0eb9a83a2b1a80a51ed6d9dd4fc9f02 # Parent f5713c3976369b3f3a87896efc31ef969a704261 (with-syntax-table): Moved to subr.el. diff -r f5713c397636 -r dbaaa90ea0eb lisp/simple.el --- a/lisp/simple.el Wed Jan 12 03:04:55 2000 +0000 +++ b/lisp/simple.el Wed Jan 12 03:05:14 2000 +0000 @@ -4132,25 +4132,4 @@ (if display-flag (pop-to-buffer new)) new)) - -(defmacro with-syntax-table (table &rest body) - "Evaluate BODY with syntax table of current buffer set to a copy of TABLE. -The syntax table of the current buffer is saved, BODY is evaluated, and the -saved table is restored, even in case of an abnormal exit. -Value is what BODY returns." - (let ((old-table (gensym)) - (old-buffer (gensym))) - `(let ((,old-table (syntax-table)) - (,old-buffer (current-buffer))) - (unwind-protect - (progn - (set-syntax-table (copy-syntax-table ,table)) - ,@body) - (save-current-buffer - (set-buffer ,old-buffer) - (set-syntax-table ,old-table)))))) - -(put 'with-syntax-table 'lisp-indent-function 1) -(put 'with-syntax-table 'edebug-form-spec '(form body)) - ;;; simple.el ends here