emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/subr.el,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/subr.el,v
Date: Wed, 04 Apr 2007 15:34:44 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      07/04/04 15:34:43

Index: subr.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/subr.el,v
retrieving revision 1.549
retrieving revision 1.550
diff -u -b -r1.549 -r1.550
--- subr.el     19 Mar 2007 18:39:24 -0000      1.549
+++ subr.el     4 Apr 2007 15:34:43 -0000       1.550
@@ -2481,6 +2481,16 @@
         . ,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.
 
 (defmacro dynamic-completion-table (fun)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]