Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
d01a33cf
Commit
d01a33cf
authored
Nov 16, 1999
by
Gerd Moellmann
Browse files
(with-syntax-table): New.
parent
0a936fe0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
lisp/simple.el
lisp/simple.el
+21
-0
No files found.
lisp/simple.el
View file @
d01a33cf
...
...
@@ -27,6 +27,10 @@
;;; Code:
(
eval-when-compile
(
require
'cl
))
(
defgroup
killing
nil
"Killing and yanking commands"
:group
'editing
)
...
...
@@ -4132,4 +4136,21 @@ after it has been set up properly in other respects."
(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.
Point,
mark,
current
buffer,
and
syntax
table
are
saved,
BODY
is
evaluated,
and
the
saved
values
are
restored,
even
in
case
of
an
abnormal
exit.
Value
is
what
BODY
returns.
"
(
let
((
old-table
(
gensym
)))
'
(
let
((
,
old-table
(
syntax-table
)))
(
unwind-protect
(
save-excursion
(
set-syntax-table
(
copy-syntax-table
,
table
))
,@
body
)
(
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment