emacs-diffs
[Top][All Lists]
Advanced

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

master 40c787f 1/4: Indent font-lock-fontify-syntactically-region


From: Lars Ingebrigtsen
Subject: master 40c787f 1/4: Indent font-lock-fontify-syntactically-region
Date: Wed, 30 Oct 2019 08:16:51 -0400 (EDT)

branch: master
commit 40c787ff4e9162d6f1a9a0abac3c83f1d0389810
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Indent font-lock-fontify-syntactically-region
    
    * lisp/font-lock.el (font-lock-fontify-syntactically-region):
    Indent function.
---
 lisp/font-lock.el | 70 +++++++++++++++++++++++++++----------------------------
 1 file changed, 35 insertions(+), 35 deletions(-)

diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 3991a4e..9ae0827 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1590,41 +1590,41 @@ START should be at the beginning of a line."
 START should be at the beginning of a line."
   (syntax-propertize end)  ; Apply any needed syntax-table properties.
   (with-syntax-table (or syntax-ppss-table (syntax-table))
-  (let ((comment-end-regexp
-        (or font-lock-comment-end-skip
-            (regexp-quote
-             (replace-regexp-in-string "^ *" "" comment-end))))
-        ;; Find the `start' state.
-        (state (syntax-ppss start))
-        face beg)
-    (if loudly (message "Fontifying %s... (syntactically...)" (buffer-name)))
-    ;;
-    ;; Find each interesting place between here and `end'.
-    (while
-       (progn
-         (when (or (nth 3 state) (nth 4 state))
-           (setq face (funcall font-lock-syntactic-face-function state))
-           (setq beg (max (nth 8 state) start))
-           (setq state (parse-partial-sexp (point) end nil nil state
-                                           'syntax-table))
-           (when face (put-text-property beg (point) 'face face))
-           (when (and (eq face 'font-lock-comment-face)
-                       (or font-lock-comment-start-skip
-                          comment-start-skip))
-             ;; Find the comment delimiters
-             ;; and use font-lock-comment-delimiter-face for them.
-             (save-excursion
-               (goto-char beg)
-               (if (looking-at (or font-lock-comment-start-skip
-                                   comment-start-skip))
-                   (put-text-property beg (match-end 0) 'face
-                                      font-lock-comment-delimiter-face)))
-             (if (looking-back comment-end-regexp (point-at-bol) t)
-                 (put-text-property (match-beginning 0) (point) 'face
-                                    font-lock-comment-delimiter-face))))
-         (< (point) end))
-      (setq state (parse-partial-sexp (point) end nil nil state
-                                     'syntax-table))))))
+    (let ((comment-end-regexp
+          (or font-lock-comment-end-skip
+              (regexp-quote
+               (replace-regexp-in-string "^ *" "" comment-end))))
+          ;; Find the `start' state.
+          (state (syntax-ppss start))
+          face beg)
+      (if loudly (message "Fontifying %s... (syntactically...)" (buffer-name)))
+      ;;
+      ;; Find each interesting place between here and `end'.
+      (while
+         (progn
+           (when (or (nth 3 state) (nth 4 state))
+             (setq face (funcall font-lock-syntactic-face-function state))
+             (setq beg (max (nth 8 state) start))
+             (setq state (parse-partial-sexp (point) end nil nil state
+                                             'syntax-table))
+             (when face (put-text-property beg (point) 'face face))
+             (when (and (eq face 'font-lock-comment-face)
+                         (or font-lock-comment-start-skip
+                            comment-start-skip))
+               ;; Find the comment delimiters
+               ;; and use font-lock-comment-delimiter-face for them.
+               (save-excursion
+                 (goto-char beg)
+                 (if (looking-at (or font-lock-comment-start-skip
+                                     comment-start-skip))
+                     (put-text-property beg (match-end 0) 'face
+                                        font-lock-comment-delimiter-face)))
+               (if (looking-back comment-end-regexp (point-at-bol) t)
+                   (put-text-property (match-beginning 0) (point) 'face
+                                      font-lock-comment-delimiter-face))))
+           (< (point) end))
+        (setq state (parse-partial-sexp (point) end nil nil state
+                                       'syntax-table))))))
 
 ;;; End of Syntactic fontification functions.
 



reply via email to

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