Skip to content

Commit 3dc8c17

Browse files
Fix racket-syntax-propertize-extend-region; fixes greghendershott#734
It was making an incorrect assumption about point. This (actually) fixes greghendershott#734.
1 parent 3a9675d commit 3dc8c17

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

racket-common.el

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,12 @@
8181
(defun racket-syntax-propertize-extend-region (beg end)
8282
"Value for hook `syntax-propertize-extend-region-functions'.
8383
84-
Expects to be called after `syntax-propertize-wholelines',
85-
adjusting that result to start one line earlier. Ensures
86-
propertization of prefix syntax at BOL; see issue #734."
87-
(let ((inhibit-field-text-motion t))
88-
(let ((new-beg (line-beginning-position 0)))
89-
(unless (eql new-beg beg)
90-
(cons new-beg end)))))
84+
Ensure propertization of # prefix syntax at BOL. Although I don't
85+
understand exactly why, `syntax-propertize-wholelines' is
86+
insufficient. See issue #734."
87+
(when (and (eq ?# (char-after beg))
88+
(< (point-min) beg))
89+
(cons (1- beg) end)))
9190

9291
(defun racket-syntax-propertize (start end)
9392
"Value for variable `syntax-propertize-function'."

0 commit comments

Comments
 (0)