mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-22 21:07:36 +00:00
* subr.el (with-case-table): New macro.
This commit is contained in:
parent
b434156627
commit
6a978be38d
1 changed files with 10 additions and 0 deletions
10
lisp/subr.el
10
lisp/subr.el
|
|
@ -2480,6 +2480,16 @@ in BODY."
|
|||
(let ((combine-after-change-calls t))
|
||||
. ,body)
|
||||
(combine-after-change-execute)))
|
||||
|
||||
(defmacro with-case-table (table &rest body)
|
||||
"Execute the forms in BODY with TABLE as the current case table.
|
||||
The value returned is the value of the last form in BODY."
|
||||
(declare (indent 1) (debug t))
|
||||
`(let ((old-case-table (current-case-table)))
|
||||
(unwind-protect
|
||||
(progn (set-case-table ,table)
|
||||
,@body)
|
||||
(set-case-table old-case-table))))
|
||||
|
||||
;;;; Constructing completion tables.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue