branch: master commit 6c014aecddf1be4be16e6096cad8dbf3690e1d53 Author: Ian Dunn <du...@gnu.org> Commit: Ian Dunn <du...@gnu.org>
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))