]> git.eshelyaron.com Git - emacs.git/commitdiff
Dump and restore the standard syntax table.
authorKen Raeburn <raeburn@raeburn.org>
Wed, 1 Feb 2017 04:44:30 +0000 (23:44 -0500)
committerKen Raeburn <raeburn@raeburn.org>
Sat, 22 Jul 2017 08:36:20 +0000 (04:36 -0400)
* 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.

lisp/loadup.el
src/syntax.c

index cb328ddacd8d8cb03e58f632f5e88556269c4aee..76e0a21508bf709cc697af6c99d90fe8e8838e15 100644 (file)
@@ -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)
index dcaca22f0e2c04f22098411f003ae224bbd15961..209acc2aed045b44df7ec7014644d7de893b76a3 100644 (file)
@@ -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);