[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode e184d60 070/495: Replace go--directory-dirs with f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode e184d60 070/495: Replace go--directory-dirs with find-lisp-find-files-internal |
Date: |
Sat, 7 Aug 2021 09:04:45 -0400 (EDT) |
branch: elpa/go-mode
commit e184d60acbe6c9715bc71bcc685e8b310924e46c
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>
Replace go--directory-dirs with find-lisp-find-files-internal
This serves two purposes:
1) There is no point in implementing this ourselves if it already exists
2) find-lisp ignores symlinks, so this avoids getting confused by symlink
loops
This might be a possible fix for gh-18
---
go-mode.el | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index b45fd8a..b04c4e5 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -15,6 +15,7 @@
(require 'cl))
(require 'ffap)
+(require 'find-lisp)
(defconst go-dangling-operators-regexp "[^-]-\\|[^+]\\+\\|[/*&><.=|^]")
(defconst gofmt-stdin-tag "<standard input>")
@@ -616,21 +617,6 @@ uncommented, otherwise a new import will be added."
('single (insert "import " line "\n"))
('none (insert "\nimport (\n\t" line "\n)\n")))))))
-(defun go--directory-dirs (dir)
- (if (file-directory-p dir)
- (let ((dir (directory-file-name dir))
- (dirs '())
- (files (directory-files dir nil nil t)))
- (dolist (file files)
- (unless (member file '("." ".."))
- (let ((file (concat dir "/" file)))
- (when (file-directory-p file)
- (setq dirs (append (cons file
- (go--directory-dirs file))
- dirs))))))
- dirs)
- '()))
-
(defun go--flatten (lst)
(if (atom lst)
(list lst)
@@ -673,7 +659,7 @@ uncommented, otherwise a new import will be added."
))
(if (file-directory-p dir)
(directory-files dir t "\\.a$"))))
- (go--directory-dirs pkgdir))))
+ (find-lisp-find-files-internal pkgdir
'find-lisp-file-predicate-is-directory
'find-lisp-default-directory-predicate))))
(go-root-and-paths)))) 'string<))
(defun go-unused-imports-lines ()
- [nongnu] elpa/go-mode a55aa42 168/495: add pledgie to the readme, (continued)
- [nongnu] elpa/go-mode a55aa42 168/495: add pledgie to the readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 115b2eb 171/495: add go-coverage to readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b0d4379 175/495: fix for eea3ccf, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 2089798 200/495: ignore backquote in comment or string, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6b5fe38 204/495: write our own implementation of go--delete-whole-line, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1319be5 210/495: simplify godoc-at-point, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 61aafe9 218/495: Allow spaces after "chan<-", ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 078d5d8 229/495: Use utf-8 when calling godef, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d900f72 060/495: extend indentation_tests/gh-15.go, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 846ed32 063/495: optimizations, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode e184d60 070/495: Replace go--directory-dirs with find-lisp-find-files-internal,
ELPA Syncer <=
- [nongnu] elpa/go-mode 56ab2c8 088/495: make sure kill-line in go-remove-unused-imports includes \n, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 0b32caa 093/495: fix usage of url-* functions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1fdbcbf 095/495: use line-number-at-pos isntead of count-lines, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7512759 104/495: Merge branch 'master' of https://github.com/imarko/go-mode.el into imarko-master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode a52724b 116/495: use own history for godoc command, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode fb3e413 118/495: fix list markup in readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 0f0fe35 127/495: actually avoid using process-lines, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 5c3a797 129/495: Handle indentation for multi-line function declarations correctly, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f5c445c 130/495: improve godef related documentation, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 97f55b8 131/495: style changes, ELPA Syncer, 2021/08/07