Skip to content

Commit 22c3a82

Browse files
committed
Remove reference to my del script
1 parent f960f4a commit 22c3a82

File tree

1 file changed

+37
-42
lines changed

1 file changed

+37
-42
lines changed

Diff for: git-dired.el

+37-42
Original file line numberDiff line numberDiff line change
@@ -37,48 +37,43 @@
3737

3838
(defun dired-omit-regexp ()
3939
(let ((file (expand-file-name ".git"))
40-
parent-dir)
41-
(while (and (not (file-exists-p file))
42-
(progn
43-
(setq parent-dir
44-
(file-name-directory
45-
(directory-file-name
46-
(file-name-directory file))))
47-
;; Give up if we are already at the root dir.
48-
(not (string= (file-name-directory file)
49-
parent-dir))))
50-
;; Move up to the parent dir and try again.
51-
(setq file (expand-file-name ".git" parent-dir)))
52-
;; If we found a change log in a parent, use that.
53-
(if (file-exists-p file)
54-
(let ((regexp (funcall dired-omit-regexp-orig))
55-
(omitted-files (shell-command-to-string
56-
"git clean -d -x -n")))
57-
(if (= 0 (length omitted-files))
58-
regexp
59-
(concat
60-
regexp
61-
(if (> (length regexp) 0)
62-
"\\|" "")
63-
"\\("
64-
(mapconcat
65-
#'(lambda (str)
66-
(concat "^"
67-
(regexp-quote
68-
(substring str 13
69-
(if (= ?/ (aref str (1- (length str))))
70-
(1- (length str))
71-
nil)))
72-
"$"))
73-
(split-string omitted-files "\n" t)
74-
"\\|")
75-
"\\)")))
76-
(funcall dired-omit-regexp-orig))))
77-
78-
(defun dired-delete-file (file &optional recursive)
79-
(if recursive
80-
(call-process "/Users/johnw/bin/del" nil nil nil "-fr" file)
81-
(call-process "/Users/johnw/bin/del" nil nil nil file)))))
40+
parent-dir)
41+
(while (and (not (file-exists-p file))
42+
(progn
43+
(setq parent-dir
44+
(file-name-directory
45+
(directory-file-name
46+
(file-name-directory file))))
47+
;; Give up if we are already at the root dir.
48+
(not (string= (file-name-directory file)
49+
parent-dir))))
50+
;; Move up to the parent dir and try again.
51+
(setq file (expand-file-name ".git" parent-dir)))
52+
;; If we found a change log in a parent, use that.
53+
(if (file-exists-p file)
54+
(let ((regexp (funcall dired-omit-regexp-orig))
55+
(omitted-files (shell-command-to-string
56+
"git clean -d -x -n")))
57+
(if (= 0 (length omitted-files))
58+
regexp
59+
(concat
60+
regexp
61+
(if (> (length regexp) 0)
62+
"\\|" "")
63+
"\\("
64+
(mapconcat
65+
#'(lambda (str)
66+
(concat "^"
67+
(regexp-quote
68+
(substring str 13
69+
(if (= ?/ (aref str (1- (length str))))
70+
(1- (length str))
71+
nil)))
72+
"$"))
73+
(split-string omitted-files "\n" t)
74+
"\\|")
75+
"\\)")))
76+
(funcall dired-omit-regexp-orig))))))
8277

8378
(provide 'git-dired)
8479

0 commit comments

Comments
 (0)