File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -586,10 +586,10 @@ on an uppercase identifier."
586586 (goto-char (1+ (point )))))))
587587 ; ; must return nil here so that it is not fontified again as string
588588 nil ))
589- ; ; Detect literate comment lines starting with syntax class '< '
589+ ; ; Detect literate comment lines starting with syntax class '! '
590590 ((save-excursion
591591 (goto-char (nth 8 state))
592- (equal (string-to-syntax " < " ) (syntax-after (point ))))
592+ (equal (string-to-syntax " ! " ) (syntax-after (point ))))
593593 'haskell-literate-comment-face )
594594 ; ; Detect pragmas. A pragma is enclosed in special comment
595595 ; ; delimiters {-# .. #-}.
Original file line number Diff line number Diff line change @@ -475,7 +475,7 @@ See `haskell-lexeme-classify-by-first-char' for details."
475475 (point (point-marker )))
476476 (or
477477 (and
478- (equal (string-to-syntax " < " )
478+ (equal (string-to-syntax " ! " )
479479 (get-char-property (point ) 'syntax-table ))
480480 (progn
481481 (set-match-data (list point (set-marker (make-marker ) (line-end-position ))))
Original file line number Diff line number Diff line change @@ -505,14 +505,18 @@ be set to the preferred literate style."
505505 (or
506506 (and
507507 (not (equal (string-to-syntax " <" ) (syntax-after (point ))))
508+ (not (equal (string-to-syntax " !" ) (syntax-after (point ))))
508509 (not (looking-at-p " ^>" )))
509510 (looking-at-p " ^\\\\ begin{code}[\t ]*$" )))))))
510511 (while (< (point ) end)
511512 (unless (looking-at-p " ^[\t ]*$" )
512513 (if previous-line-latex-code
513514 (if (looking-at-p " ^\\\\ end{code}[\t ]*$" )
514515 (progn
515- (put-text-property (point ) (1+ (point )) 'syntax-table (string-to-syntax " <" ))
516+ (put-text-property (point ) (1+ (point )) 'syntax-table (string-to-syntax " !" ))
517+ (save-excursion
518+ (end-of-line )
519+ (put-text-property (point ) (1+ (point )) 'syntax-table (string-to-syntax " !" )))
516520 (setq previous-line-latex-code nil ))
517521 ; ; continue latex-code
518522 )
@@ -521,7 +525,10 @@ be set to the preferred literate style."
521525 (put-text-property (point ) (1+ (point )) 'syntax-table (string-to-syntax " -" ))
522526 ; ; this is a literate comment
523527 (progn
524- (put-text-property (point ) (1+ (point )) 'syntax-table (string-to-syntax " <" ))
528+ (put-text-property (point ) (1+ (point )) 'syntax-table (string-to-syntax " !" ))
529+ (save-excursion
530+ (end-of-line )
531+ (put-text-property (point ) (1+ (point )) 'syntax-table (string-to-syntax " !" )))
525532 (when (looking-at-p " ^\\\\ begin{code}[\t ]*$" )
526533 (setq previous-line-latex-code t ))))))
527534 (forward-line 1 ))))
You can’t perform that action at this time.
0 commit comments