Move neotree advice fns to defuns-neotree.el
This commit is contained in:
parent
d751be7898
commit
a867225eb2
2 changed files with 28 additions and 21 deletions
|
@ -43,5 +43,21 @@
|
|||
(and (eq name 'close) (funcall n-insert-symbol "+ "))
|
||||
(and (eq name 'leaf) (funcall n-insert-symbol " ")))))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf*save-neotree (orig-fun &rest args)
|
||||
"Prevents messing up the neotree buffer on window changes"
|
||||
(narf/neotree-save (apply orig-fun args)))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf*neotree-create-node (orig-fun &rest args)
|
||||
"Don't ask for confirmation when creating files"
|
||||
(cl-letf (((symbol-function 'yes-or-no-p) (lambda (&rest _) t)))
|
||||
(apply orig-fun args)))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf*neotree-shorten-pwd (node)
|
||||
"Shorter pwd in neotree"
|
||||
(list (abbreviate-file-name (car node))))
|
||||
|
||||
(provide 'defuns-neotree)
|
||||
;;; defuns-neotree.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue