From: Ken Raeburn Date: Wed, 1 Feb 2017 04:44:30 +0000 (-0500) Subject: Dump and restore the standard syntax table. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a47fa80166198097596c134e43acc632078d854a;p=emacs.git Dump and restore the standard syntax table. * src/syntax.c (Finternal_set_standard_syntax_table): New function. (syms_of_syntax): Make it know. * lisp/loadup.el: Generate a call, supplying the table definition at dump time. --- diff --git a/lisp/loadup.el b/lisp/loadup.el index cb328ddacd8..76e0a21508b 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -494,6 +494,9 @@ lost after dumping"))) (charsets '()) (charset-aliases '()) (cmds '())) (setcdr global-buffers-menu-map nil) ;; Get rid of buffer objects! + (push `(internal--set-standard-syntax-table + ,(standard-syntax-table)) + cmds) (mapatoms (lambda (s) (when (fboundp s) diff --git a/src/syntax.c b/src/syntax.c index dcaca22f0e2..209acc2aed0 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -1029,6 +1029,18 @@ It is a copy of the TABLE, which defaults to the standard syntax table. */) return copy; } +DEFUN ("internal--set-standard-syntax-table", + Finternal_set_standard_syntax_table, + Sinternal_set_standard_syntax_table, 1, 1, 0, + doc: /* Replace the standard syntax table, used for new buffers. */) + (Lisp_Object table) +{ + check_syntax_table (table); + Vstandard_syntax_table = table; + Fset_char_table_parent (table, Qnil); + return table; +} + DEFUN ("set-syntax-table", Fset_syntax_table, Sset_syntax_table, 1, 1, 0, doc: /* Select a new syntax table for the current buffer. One argument, a syntax table. */) @@ -3769,6 +3781,7 @@ In both cases, LIMIT bounds the search. */); defsubr (&Sstring_to_syntax); defsubr (&Smodify_syntax_entry); defsubr (&Sinternal_describe_syntax_value); + defsubr (&Sinternal_set_standard_syntax_table); defsubr (&Sforward_word);