branch: externals/leaf
commit 17d00e7c64fe54f75aa262f23c4bac6b0b11d05e
Author: conao3 <[email protected]>
Commit: conao3 <[email protected]>
use string-match-p instead of string-suffix-p
---
leaf.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/leaf.el b/leaf.el
index 72bd4f4..1cbf3fb 100644
--- a/leaf.el
+++ b/leaf.el
@@ -581,7 +581,7 @@ see `alist-get'."
(defun leaf-mode-sym (sym)
"Return mode like symbol from SYM."
(let ((sym-str (symbol-name sym)))
- (intern (concat sym-str (unless (string-suffix-p "-mode" sym-str)
"-mode")))))
+ (intern (concat sym-str (unless (string-match-p "-mode$" sym-str)
"-mode")))))
(defun leaf-error (message &rest args)
"Raise error with type leaf. MESSAGE and ARGS is same form as `lwarn'."