branch: elpa/raku-mode
commit 9fa9e3968ea16c92b4dc65de7c7898628d9028b0
Author: Hinrik Örn Sigurðsson <[email protected]>
Commit: Hinrik Örn Sigurðsson <[email protected]>
pcase is more straightforward than let+cond here
---
perl6-font-lock.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/perl6-font-lock.el b/perl6-font-lock.el
index 64691ccc9f..b6e4816d8d 100644
--- a/perl6-font-lock.el
+++ b/perl6-font-lock.el
@@ -396,10 +396,9 @@ Takes arguments START and END which delimit the region to
propertize."
"Specify font lock faces based on syntax table entries.
Takes STATE, the parse state."
- (let ((context (perl6-syntax-context state)))
- (cond
- ((eq context 'string) 'perl6-string)
- ((eq context 'comment) 'perl6-comment))))
+ (pcase (perl6-syntax-context state)
+ (`string 'perl6-string)
+ (`comment 'perl6-comment)))
(defun perl6-search-when (regex condition limit)
"Search forward for REGEX if the match satisfies CONDITION.