A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/emacs-eask/cli/commit/524c02dc66e14449f8511d5cfc591e4fae91b3b2 below:

Avoid patching compat functions · emacs-eask/cli@524c02d · GitHub

2 2

;;; Commentary:

3 3

;;; Code:

4 4 5 -

(eask-defvc< 27

6 -

(defun directory-files-recursively (dir regexp

5 +

;; XXX: Support after Emacs 27.1

6 +

(defun eask-directory-files-recursively ( dir regexp

7 7

&optional include-directories predicate

8 8

follow-symlinks)

9 -

"..."

10 -

(let* ((result nil)

11 -

(files nil)

12 -

(dir (directory-file-name dir))

13 -

;; When DIR is "/", remote file names like "/method:" could

14 -

;; also be offered. We shall suppress them.

15 -

(tramp-mode (and tramp-mode (file-remote-p (expand-file-name dir)))))

16 -

(dolist (file (sort (file-name-all-completions "" dir)

17 -

'string<))

18 -

(unless (member file '("./" "../"))

19 -

(if (directory-name-p file)

20 -

(let* ((leaf (substring file 0 (1- (length file))))

21 -

(full-file (concat dir "/" leaf)))

22 -

;; Don't follow symlinks to other directories.

23 -

(when (and (or (not (file-symlink-p full-file))

24 -

(and (file-symlink-p full-file)

25 -

follow-symlinks))

26 -

;; Allow filtering subdirectories.

27 -

(or (eq predicate nil)

28 -

(eq predicate t)

29 -

(funcall predicate full-file)))

30 -

(let ((sub-files

31 -

(if (eq predicate t)

32 -

(ignore-error file-error

33 -

(directory-files-recursively

34 -

full-file regexp include-directories

35 -

predicate follow-symlinks))

36 -

(directory-files-recursively

37 -

full-file regexp include-directories

38 -

predicate follow-symlinks))))

39 -

(setq result (nconc result sub-files))))

40 -

(when (and include-directories

41 -

(string-match regexp leaf))

42 -

(setq result (nconc result (list full-file)))))

43 -

(when (string-match regexp file)

44 -

(push (concat dir "/" file) files)))))

45 -

(nconc result (nreverse files)))))

9 +

"..."

10 +

(let* ((result nil)

11 +

(files nil)

12 +

(dir (directory-file-name dir))

13 +

;; When DIR is "/", remote file names like "/method:" could

14 +

;; also be offered. We shall suppress them.

15 +

(tramp-mode (and tramp-mode (file-remote-p (expand-file-name dir)))))

16 +

(dolist (file (sort (file-name-all-completions "" dir)

17 +

'string<))

18 +

(unless (member file '("./" "../"))

19 +

(if (directory-name-p file)

20 +

(let* ((leaf (substring file 0 (1- (length file))))

21 +

(full-file (concat dir "/" leaf)))

22 +

;; Don't follow symlinks to other directories.

23 +

(when (and (or (not (file-symlink-p full-file))

24 +

(and (file-symlink-p full-file)

25 +

follow-symlinks))

26 +

;; Allow filtering subdirectories.

27 +

(or (eq predicate nil)

28 +

(eq predicate t)

29 +

(funcall predicate full-file)))

30 +

(let ((sub-files

31 +

(if (eq predicate t)

32 +

(ignore-error file-error

33 +

(eask-directory-files-recursively

34 +

full-file regexp include-directories

35 +

predicate follow-symlinks))

36 +

(eask-directory-files-recursively

37 +

full-file regexp include-directories

38 +

predicate follow-symlinks))))

39 +

(setq result (nconc result sub-files))))

40 +

(when (and include-directories

41 +

(string-match regexp leaf))

42 +

(setq result (nconc result (list full-file)))))

43 +

(when (string-match regexp file)

44 +

(push (concat dir "/" file) files)))))

45 +

(nconc result (nreverse files))))

46 46 47 -

(eask-defvc< 28

48 -

(defun always (&rest _arguments)

49 -

"Ignore ARGUMENTS, do nothing, and return t.

50 -

This function accepts any number of arguments in ARGUMENTS.

51 -

Also see `ignore'."

52 -

t))

47 +

;; XXX: Support after Emacs 28.1

48 +

(defun eask-always (&rest _arguments)

49 +

"..."

50 +

t)

53 51 54 52

;;; extern/compat.el ends here


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4