Skip to content

Commit 823addd

Browse files
committed
Protect alias function from missing final slash.
1 parent 3355e62 commit 823addd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pythonic.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@
103103
(if (null alias-tuple)
104104
alias
105105
(concat (car alias-tuple)
106-
(substring alias (length (cadr alias-tuple)))))))
106+
(substring alias (min (length (cadr alias-tuple))
107+
(length alias)))))))
107108

108109
(defun pythonic-python-readable-file-name (filename)
109110
"Emacs to Python FILENAME conversion.

0 commit comments

Comments
 (0)