diff options
author | William Carroll <wpcarro@gmail.com> | 2018-05-29T20·23-0400 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2018-07-19T16·00-0400 |
commit | 32ac66d50b62e77a81866520a40195e3d15b90f2 (patch) | |
tree | 52759f12d0974e8771b9202c49ccbab536f03480 /emacs.d/wpc/functions.el | |
parent | 9b8f0c2da3c018b750daa84438feebffea7ab71f (diff) |
Support Elisp fns for current buffer's dirname
Gets the shorthand version of the buffer's current directory's name.
Diffstat (limited to 'emacs.d/wpc/functions.el')
-rw-r--r-- | emacs.d/wpc/functions.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/emacs.d/wpc/functions.el b/emacs.d/wpc/functions.el index f2514a1bed85..29886b30413d 100644 --- a/emacs.d/wpc/functions.el +++ b/emacs.d/wpc/functions.el @@ -223,5 +223,11 @@ (term-char-mode) (term-line-mode))) +(defun buffer-dirname () + "Return the directory name of the current buffer as a string." + (->> buffer-file-name + f-dirname + f-filename)) + (provide 'functions) ;;; functions.el ends here |