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

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

[elpa] master 6c014ae 15/62: Remove rx pcase form for compatibility


From: Ian Dunn
Subject: [elpa] master 6c014ae 15/62: Remove rx pcase form for compatibility
Date: Sat, 9 Dec 2017 14:33:58 -0500 (EST)

branch: master
commit 6c014aecddf1be4be16e6096cad8dbf3690e1d53
Author: Ian Dunn <address@hidden>
Commit: Ian Dunn <address@hidden>

    Remove rx pcase form for compatibility
    
    * paced.el (paced-mode-symbol-p): New defun
      (paced-test-dict-enable-condition): Use it instead of rx form.
---
 paced.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/paced.el b/paced.el
index 067c41f..5a765ff 100644
--- a/paced.el
+++ b/paced.el
@@ -291,13 +291,17 @@ Has the same form as and takes priority over
   (append paced-local-dict-enable-alist
           paced-global-dict-enable-alist))
 
+(defun paced-mode-symbol-p (sym)
+  "Return non-nil if SYM is a mode symbol."
+  (string-match-p (rx "-mode" string-end) (symbol-name sym)))
+
 (defun paced-test-dict-enable-condition (condition)
   "Determines if CONDITION passes in the current buffer.
 
 See `paced-global-dict-enable-alist' for an explanation."
   (pcase condition
     ((and (pred symbolp)
-          (app symbol-name (rx "-mode" string-end)))
+          (pred paced-mode-symbol-p))
      (derived-mode-p condition))
     ((and (pred symbolp)
           (pred boundp))



reply via email to

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