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

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

[nongnu] elpa/go-mode 9f1f94e 113/495: use own implementation of go--str


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 9f1f94e 113/495: use own implementation of go--string-prefix-p because it has been added in Emacs 24 and people are still using Emacs 23
Date: Sat, 7 Aug 2021 09:04:54 -0400 (EDT)

branch: elpa/go-mode
commit 9f1f94e434941615b8a4bc32235165e13666c12a
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    use own implementation of go--string-prefix-p because it has been added in 
Emacs 24 and people are still using Emacs 23
---
 go-mode.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/go-mode.el b/go-mode.el
index a49304d..ce253d3 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -655,6 +655,11 @@ uncommented, otherwise a new import will be added."
          (paths (split-string (car (cdr output)) ":")))
     (append (list root) paths)))
 
+(defun go--string-prefix-p (s1 s2 &optional ignore-case)
+  (eq t (compare-strings s1 nil nil
+                         s2 0 (length s1) ignore-case)))
+
+
 (defun go-packages ()
   (sort
    (delete-dups
@@ -664,7 +669,7 @@ uncommented, otherwise a new import will be added."
          (mapcan (lambda (dir)
                    (mapcar (lambda (file)
                              (let ((sub (substring file (length pkgdir) -2)))
-                               (unless (or (string-prefix-p "obj/" sub) 
(string-prefix-p "tool/" sub))
+                               (unless (or (go--string-prefix-p "obj/" sub) 
(go--string-prefix-p "tool/" sub))
                                  (mapconcat 'identity (cdr (split-string sub 
"/")) "/"))))
                            (if (file-directory-p dir)
                                (directory-files dir t "\\.a$"))))



reply via email to

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