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

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

[nongnu] elpa/racket-mode 3dc8c17f3e 2/2: Fix racket-syntax-propertize-e


From: ELPA Syncer
Subject: [nongnu] elpa/racket-mode 3dc8c17f3e 2/2: Fix racket-syntax-propertize-extend-region; fixes #734
Date: Tue, 17 Dec 2024 16:02:27 -0500 (EST)

branch: elpa/racket-mode
commit 3dc8c17f3e37db744d43ce4bc9906861e2bdf438
Author: Greg Hendershott <git@greghendershott.com>
Commit: Greg Hendershott <git@greghendershott.com>

    Fix racket-syntax-propertize-extend-region; fixes #734
    
    It was making an incorrect assumption about point.
    
    This (actually) fixes #734.
---
 racket-common.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/racket-common.el b/racket-common.el
index 0c0be69881..6085d308c5 100644
--- a/racket-common.el
+++ b/racket-common.el
@@ -81,13 +81,12 @@
 (defun racket-syntax-propertize-extend-region (beg end)
   "Value for hook `syntax-propertize-extend-region-functions'.
 
-Expects to be called after `syntax-propertize-wholelines',
-adjusting that result to start one line earlier. Ensures
-propertization of prefix syntax at BOL; see issue #734."
-  (let ((inhibit-field-text-motion t))
-    (let ((new-beg (line-beginning-position 0)))
-      (unless (eql new-beg beg)
-        (cons new-beg end)))))
+Ensure propertization of # prefix syntax at BOL. Although I don't
+understand exactly why, `syntax-propertize-wholelines' is
+insufficient. See issue #734."
+  (when (and (eq ?# (char-after beg))
+             (< (point-min) beg))
+    (cons (1- beg) end)))
 
 (defun racket-syntax-propertize (start end)
   "Value for variable `syntax-propertize-function'."



reply via email to

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