Skip to content

Commit 7e5d613

Browse files
committed
Add alias detection function.
1 parent 1e2c801 commit 7e5d613

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pythonic.el

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@
106106
(substring alias (min (length (cadr alias-tuple))
107107
(length alias)))))))
108108

109+
(defun pythonic-has-alias-p (path)
110+
"Check if given PATH has alias."
111+
(not (null (cl-find-if
112+
(lambda (it)
113+
(or (f-same-p (car it) path)
114+
(f-ancestor-of-p (car it) path)))
115+
pythonic-directory-aliases))))
116+
109117
(defun pythonic-python-readable-file-name (filename)
110118
"Emacs to Python FILENAME conversion.
111119
Take FILENAME from the perspective of the localhost and translate

0 commit comments

Comments
 (0)