General refactor
This commit is contained in:
parent
2538de1a92
commit
601b422943
3 changed files with 15 additions and 13 deletions
|
@ -34,10 +34,10 @@ provided."
|
|||
(let ((dir (f-dirname path))
|
||||
(fullpath (f-full path))
|
||||
(is-auto t))
|
||||
(when (and bang (not (file-exists-p dir)))
|
||||
(f-mkdir dir))
|
||||
(if (file-exists-p dir)
|
||||
(if (file-exists-p fullpath)
|
||||
(when (and bang (not (f-exists? dir)))
|
||||
(mkdir dir))
|
||||
(if (f-exists? dir)
|
||||
(if (f-exists? fullpath)
|
||||
(error "File already exists: %s" path)
|
||||
(find-file fullpath)
|
||||
(add-hook 'yas-after-exit-snippet-hook 'narf--save-exit)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue