diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-11-19 00:35:26 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-11-19 00:35:26 -0500 |
commit | db4b3e65bdfb957b90fa81c5c4fcdaca1859e781 (patch) | |
tree | f8beed28c962e81be1651e733929d028bec16ad9 /lisp | |
parent | c5239d61bf425157d3cc1a3b13ac5110c6a884c8 (diff) | |
download | emacs.d-db4b3e65bdfb957b90fa81c5c4fcdaca1859e781.tar.gz |
project-filename-at-point: Return nil if no file
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-projectile.el | 4 |
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) |