summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/init-projectile.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/init-projectile.el b/lisp/init-projectile.el
index 7e511cb..164ff2a 100644
--- a/lisp/init-projectile.el
+++ b/lisp/init-projectile.el
@@ -40,8 +40,8 @@ Interactive arguments are processed according to
(defun km/project-filename-at-point ()
"Return file name relative to `projectile-project-root'."
- (file-relative-name (thing-at-point 'filename)
- (projectile-project-root)))
+ (--when-let (thing-at-point 'filename)
+ (file-relative-name it (projectile-project-root))))
(defun km/projectile-copy-project-filename-as-kill ()
(interactive)