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

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

[nongnu] elpa/raku-mode 9fa9e3968e 091/253: pcase is more straightforwar


From: ELPA Syncer
Subject: [nongnu] elpa/raku-mode 9fa9e3968e 091/253: pcase is more straightforward than let+cond here
Date: Sat, 29 Jan 2022 08:28:45 -0500 (EST)

branch: elpa/raku-mode
commit 9fa9e3968ea16c92b4dc65de7c7898628d9028b0
Author: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
Commit: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>

    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.



reply via email to

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