Support Elisp fns for current buffer's dirname
Gets the shorthand version of the buffer's current directory's name.
This commit is contained in:
		
							parent
							
								
									9b8f0c2da3
								
							
						
					
					
						commit
						32ac66d50b
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue