Skip to content

Commit

Permalink
Merge topic 'emacs-bracket-syntax-fix' into release-3.30
Browse files Browse the repository at this point in the history
3ecf6bd cmake-mode.el: fix bracket string/comment syntax-propertize

Acked-by: Kitware Robot <[email protected]>
Merge-request: !9621
  • Loading branch information
bradking authored and kwrobot committed Jun 24, 2024
2 parents f9393aa + 3ecf6bd commit 30d8ead
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Auxiliary/cmake-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 30d8ead

Please sign in to comment.