Skip to content

Commit b681c54

Browse files
Fix a small bug in font locking for active records
This commit fixes a bug in which only the final name in a multi-symbol active record would be font locked. The trouble is that the regexp requires the closing banana clip |) as part of the pattern; the final paren should be _optional_. Thus, the only meaningful change is adding a ? inside the regexp. A newline is introduced to make the whole thing slightly more readable.
1 parent f643505 commit b681c54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fsharp-mode-font.el

+2-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ with initial value INITVALUE and optional DOCSTRING."
293293
(,fsharp-pattern-function-regexp 1 font-lock-function-name-face)
294294
;; Active records
295295
("(|" (0 'fsharp-ui-operator-face)
296-
("\\([A-Za-z'_]+\\)\\(|)\\)" nil nil
296+
("\\([A-Za-z'_]+\\)\\(|)?\\)"
297+
nil nil
297298
(1 font-lock-function-name-face)
298299
(2 'fsharp-ui-operator-face)))
299300
(,fsharp-operator-pipe-regexp . 'fsharp-ui-operator-face)

0 commit comments

Comments
 (0)