aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/subr.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 4cc2a34c1c9..1a49ae6c73e 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2480,6 +2480,16 @@ in BODY."
2480 (let ((combine-after-change-calls t)) 2480 (let ((combine-after-change-calls t))
2481 . ,body) 2481 . ,body)
2482 (combine-after-change-execute))) 2482 (combine-after-change-execute)))
2483
2484(defmacro with-case-table (table &rest body)
2485 "Execute the forms in BODY with TABLE as the current case table.
2486The value returned is the value of the last form in BODY."
2487 (declare (indent 1) (debug t))
2488 `(let ((old-case-table (current-case-table)))
2489 (unwind-protect
2490 (progn (set-case-table ,table)
2491 ,@body)
2492 (set-case-table old-case-table))))
2483 2493
2484;;;; Constructing completion tables. 2494;;;; Constructing completion tables.
2485 2495