]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/lisp-mode.el: Give paren syntax to [...] in lisp-data-mode
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 7 Dec 2020 03:18:48 +0000 (22:18 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 7 Dec 2020 03:18:48 +0000 (22:18 -0500)
(lisp-data-mode-syntax-table): Rename from lisp--mode-syntax-table.
Adjust all users.  Set [...] to have paren syntax.
(lisp-data-mode): Don't set `lisp-syntax` arg any more

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-syntax-table):
Don't bother setting [...] to have paren syntax any more.

* lisp/progmodes/inf-lisp.el (inferior-lisp-mode): Don't use
`lisp-syntax` arg of lisp-mode-variables any more.

lisp/emacs-lisp/lisp-mode.el
lisp/progmodes/elisp-mode.el
lisp/progmodes/inf-lisp.el

index 081ef8d441a1c7eaa904b521a9f8a6158b7c9f97..e477ef17000a8d215a7f8990d3b6379b6a028718 100644 (file)
@@ -38,7 +38,7 @@
 (define-abbrev-table 'lisp-mode-abbrev-table ()
   "Abbrev table for Lisp mode.")
 
-(defvar lisp--mode-syntax-table
+(defvar lisp-data-mode-syntax-table
   (let ((table (make-syntax-table))
         (i 0))
     (while (< i ?0)
     (modify-syntax-entry ?\\ "\\   " table)
     (modify-syntax-entry ?\( "()  " table)
     (modify-syntax-entry ?\) ")(  " table)
+    (modify-syntax-entry ?\[ "(]" table)
+    (modify-syntax-entry ?\] ")[" table)
     table)
   "Parent syntax table used in Lisp modes.")
 
 (defvar lisp-mode-syntax-table
-  (let ((table (make-syntax-table lisp--mode-syntax-table)))
+  (let ((table (make-syntax-table lisp-data-mode-syntax-table)))
     (modify-syntax-entry ?\[ "_   " table)
     (modify-syntax-entry ?\] "_   " table)
     (modify-syntax-entry ?# "' 14" table)
@@ -669,7 +671,7 @@ font-lock keywords will not be case sensitive."
 (define-derived-mode lisp-data-mode prog-mode "Lisp-Data"
   "Major mode for buffers holding data written in Lisp syntax."
   :group 'lisp
-  (lisp-mode-variables t t nil)
+  (lisp-mode-variables nil t nil)
   (setq-local electric-quote-string t)
   (setq imenu-case-fold-search nil))
 
index 12788eacf1bdb073e4d0669893cc54865200e33b..fa360a8f3f82ac260e751c8524cb33cf162a49c7 100644 (file)
@@ -38,9 +38,10 @@ It has `lisp-mode-abbrev-table' as its parent."
   :parents (list lisp-mode-abbrev-table))
 
 (defvar emacs-lisp-mode-syntax-table
-  (let ((table (make-syntax-table lisp--mode-syntax-table)))
-    (modify-syntax-entry ?\[ "(]  " table)
-    (modify-syntax-entry ?\] ")[  " table)
+  (let ((table (make-syntax-table lisp-data-mode-syntax-table)))
+    ;; These are redundant, now.
+    ;;(modify-syntax-entry ?\[ "(]  " table)
+    ;;(modify-syntax-entry ?\] ")[  " table)
     table)
   "Syntax table used in `emacs-lisp-mode'.")
 
index 59db646ff328ce24fa91c82c08f1819d41eb1648..93d5d0fbcc2cd20e88fa66d30fc204009ece3f63 100644 (file)
@@ -124,9 +124,9 @@ mode.  Default is whitespace followed by 0 or 1 single-letter colon-keyword
 (define-key lisp-mode-map "\C-c\C-v" 'lisp-show-variable-documentation)
 
 
-;;; This function exists for backwards compatibility.
-;;; Previous versions of this package bound commands to C-c <letter>
-;;; bindings, which is not allowed by the Emacs standard.
+;; This function exists for backwards compatibility.
+;; Previous versions of this package bound commands to C-c <letter>
+;; bindings, which is not allowed by the Emacs standard.
 
 ;;;  "This function binds many inferior-lisp commands to C-c <letter> bindings,
 ;;;where they are more accessible. C-c <letter> bindings are reserved for the
@@ -274,7 +274,8 @@ If you accidentally suspend your process, use \\[comint-continue-subjob]
 to continue it."
   (setq comint-prompt-regexp inferior-lisp-prompt)
   (setq mode-line-process '(":%s"))
-  (lisp-mode-variables t)
+  (lisp-mode-variables)
+  (set-syntax-table lisp-mode-syntax-table)
   (setq comint-get-old-input (function lisp-get-old-input))
   (setq comint-input-filter (function lisp-input-filter)))