emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/subed a766de857a 2/3: Modify the syntax of comment delimit


From: ELPA Syncer
Subject: [nongnu] elpa/subed a766de857a 2/3: Modify the syntax of comment delimiters in SRT files
Date: Thu, 8 Sep 2022 09:59:26 -0400 (EDT)

branch: elpa/subed
commit a766de857a86811a9b50c9d2361f4a29e55b1f24
Author: Marcin Borkowski <mbork@mbork.pl>
Commit: Marcin Borkowski <mbork@mbork.pl>

    Modify the syntax of comment delimiters in SRT files
    
    This has a drawback of making `{` and `}` no longer delimiters.  Since
    they don't seem to be very useful in SRT files (and `C-M-f` and
    `C-M-b` are not bound to `forward-sexp` and `backward-sexp` anyway),
    this seems a good choice.
---
 subed/subed-srt.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/subed/subed-srt.el b/subed/subed-srt.el
index ad1404459a..97927ba090 100644
--- a/subed/subed-srt.el
+++ b/subed/subed-srt.el
@@ -395,6 +395,9 @@ Use the format-specific function for MAJOR-MODE."
   (setq-local font-lock-defaults '(subed-srt-font-lock-keywords))
   (setq-local comment-start "{\\")
   (setq-local comment-end "}")
+  (modify-syntax-entry ?\{ ". 1")
+  (modify-syntax-entry ?\\ ". 2")
+  (modify-syntax-entry ?\} ">")
   ;; Support for fill-paragraph (M-q)
   (let ((timestamps-regexp (concat subed--regexp-timestamp
                                    " *--> *"



reply via email to

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