aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2007-04-04 15:34:43 +0000
committerChong Yidong2007-04-04 15:34:43 +0000
commit6a978be38dbc0d43ce73a8f8431feda7bc7e2cd1 (patch)
tree11ea271ee98ba4df744407cbb6f93972dc228702
parentb43415662777538d8869bce069d32673cdbd6224 (diff)
downloademacs-6a978be38dbc0d43ce73a8f8431feda7bc7e2cd1.tar.gz
emacs-6a978be38dbc0d43ce73a8f8431feda7bc7e2cd1.zip
* subr.el (with-case-table): New macro.
-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