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

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

[nongnu] elpa/typescript-mode 3361adad67 093/222: Prevent messing up com


From: ELPA Syncer
Subject: [nongnu] elpa/typescript-mode 3361adad67 093/222: Prevent messing up comment fontification when filling paragraphs.
Date: Sun, 6 Feb 2022 16:59:21 -0500 (EST)

branch: elpa/typescript-mode
commit 3361adad6700344163aa7cf15702f4119c8d65bf
Author: Louis-Dominique Dubeau <ldd@lddubeau.com>
Commit: Louis-Dominique Dubeau <ldd@lddubeau.com>

    Prevent messing up comment fontification when filling paragraphs.
    
    The code taken from js.el had a bug that caused paragraph filling in
    comments to leave parts of the comment with improper
    fontification. This change fixes that problem.
---
 typescript-mode.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/typescript-mode.el b/typescript-mode.el
index 3265cae358..880aafba6e 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -1921,8 +1921,6 @@ This performs fontification according to 
`typescript--class-styles'."
 
 (defun typescript-syntax-propertize (start end)
   ;; JavaScript allows immediate regular expression objects, written /.../.
-  (goto-char start)
-  (typescript-syntax-propertize-regexp end)
   (funcall
    (syntax-propertize-rules
     ;; Distinguish /-division from /-regexp chars (and from /-comment-starter).
@@ -1945,8 +1943,9 @@ This performs fontification according to 
`typescript--class-styles'."
            (put-text-property (match-beginning 1) (match-end 1)
                               'syntax-table (string-to-syntax "\"/"))
            (typescript-syntax-propertize-regexp end)))))
+    ;; Hash-bang at beginning of buffer.
     ("\\`\\(#\\)!" (1 "< b")))
-   (point) end))
+   start end))
 
 ;;; Indentation
 



reply via email to

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