branch: elpa/adoc-mode
commit b8a62c9f4be774b391715329fe6e1dc8e36a745e
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Use string-prefix-p instead of string-match for prefix check
    
    string-prefix-p is clearer in intent and slightly faster since
    it doesn't need to compile a regex.
---
 adoc-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/adoc-mode.el b/adoc-mode.el
index 561276eef2..e65620bd53 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -1999,7 +1999,7 @@ TEXTPROPS is an additional plist with textproperties."
             (progn
               (setq meta-p t)
               (setq newfaces (cons (car faces) newfaces)))
-          (if (not (string-match "adoc-" (symbol-name (car faces))))
+          (if (not (string-prefix-p "adoc-" (symbol-name (car faces))))
               (setq newfaces (cons (car faces) newfaces))))
         (setq faces (cdr faces)))
       (if meta-p

Reply via email to