summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutro <git@eutro.dev>2024-06-24 09:10:24 (GMT)
committerBrad King <brad.king@kitware.com>2024-06-24 13:51:05 (GMT)
commit3ecf6bd1b1bf860f803519bd9084d71e15d7b3c1 (patch)
tree725babfe3ce4300a2de2cba0b1dab216fdaae7eb
parentb14218c9f602dbf215b922fb7fc529984878fe07 (diff)
downloadCMake-3ecf6bd1b1bf860f803519bd9084d71e15d7b3c1.zip
CMake-3ecf6bd1b1bf860f803519bd9084d71e15d7b3c1.tar.gz
CMake-3ecf6bd1b1bf860f803519bd9084d71e15d7b3c1.tar.bz2
cmake-mode.el: fix bracket string/comment syntax-propertize
With `lexical-binding: t`, the `end` variable is undefined in `cmake--syntax-propertize-until-bracket-close`, causing syntax highlighting errors. This fixes that by passing `end` from the caller.
-rw-r--r--Auxiliary/cmake-mode.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el
index cfa0173..893c0d4 100644
--- a/Auxiliary/cmake-mode.el
+++ b/Auxiliary/cmake-mode.el
@@ -279,7 +279,7 @@ Return t unless search stops due to end of buffer."
;------------------------------------------------------------------------------
-(defun cmake--syntax-propertize-until-bracket-close (syntax)
+(defun cmake--syntax-propertize-until-bracket-close (syntax end)
;; This function assumes that a previous search has matched the
;; beginning of a bracket_comment or bracket_argument and that the
;; second capture group has matched the equal signs between the two
@@ -307,10 +307,10 @@ Return t unless search stops due to end of buffer."
(syntax-propertize-rules
("\\(#\\)\\[\\(=*\\)\\["
(1
- (prog1 "!" (cmake--syntax-propertize-until-bracket-close "!"))))
+ (prog1 "!" (cmake--syntax-propertize-until-bracket-close "!" end))))
("\\(\\[\\)\\(=*\\)\\["
(1
- (prog1 "|" (cmake--syntax-propertize-until-bracket-close "|"))))))
+ (prog1 "|" (cmake--syntax-propertize-until-bracket-close "|" end))))))
;; Syntax table for this mode.
(defvar cmake-mode-syntax-table nil