doomemacs/lisp/lib
Ivan 850907ed9a
fix(lib): doom/delete-this-file nil path handling
Fix the handling of a nil path within doom/delete-this-file.

If path is nil (e.g. called interactively when buffer is not visiting a
file), avoid calling abbreviate-file-name on nil, otherwise an error
will be signaled:

  (wrong-type-argument stringp nil)

Additionally, fix the subsequent path checks. These were treating two
distinct scenarios as a "Buffer is not visiting any file" user-error:

- nil path
- non-existent path
- Only the first should result in that error. The second should proceed
  to the next path check (which was previously unreachable), to signal
  the appropriate error, "File doesn't exist: %s".
2022-09-30 22:48:59 +02:00
..
autoloads.el perf: autoloads: remove definition-prefixes & abbreviate paths 2022-09-25 17:52:07 +02:00
buffers.el refactor: replace doom-enlist with ensure-list 2022-08-07 19:43:13 +02:00
config.el fix(lib): doom/reload-*: void-function doom-with-context 2022-09-26 12:06:42 +02:00
debug.el fix(lib): doom-info symlink-path 2022-09-25 18:18:00 +02:00
docs.el fix(docs): if doom-emacs-dir doesn't end w/ slash 2022-09-25 18:21:32 +02:00
files.el fix(lib): doom/delete-this-file nil path handling 2022-09-30 22:48:59 +02:00
fonts.el refactor!: restructure Doom core 2022-07-30 22:41:13 +02:00
git.el refactor(lib): provide doom-libs as subfeatures 2022-09-08 00:20:26 +02:00
help.el fix(lib): doom/help-search-{load-path,loaded-files} 2022-09-20 02:29:08 +02:00
packages.el fix(lib): package! error from doom/bump-* commands 2022-09-25 19:18:05 +02:00
plist.el refactor(lib): provide doom-libs as subfeatures 2022-09-08 00:20:26 +02:00
print.el fix(cli): debug output despite no debug-mode 2022-09-19 17:33:25 +02:00
process.el refactor(lib): provide doom-libs as subfeatures 2022-09-08 00:20:26 +02:00
projects.el refactor!: restructure Doom core 2022-07-30 22:41:13 +02:00
sandbox.el refactor!: redesign module init/config hooks 2022-09-16 01:14:22 +02:00
scratch.el refactor: deprecate doom-etc-dir for doom-data-dir 2022-08-14 20:43:35 +02:00
sessions.el refactor!: restructure Doom core 2022-07-30 22:41:13 +02:00
store.el refactor: deprecate doom-etc-dir for doom-data-dir 2022-08-14 20:43:35 +02:00
system.el refactor(lib): use num-processors 2022-09-08 13:36:17 +02:00
text.el refactor: replace doom-enlist with ensure-list 2022-08-07 19:43:13 +02:00
themes.el refactor: replace doom-enlist with ensure-list 2022-08-07 19:43:13 +02:00
ui.el refactor!: restructure Doom core 2022-07-30 22:41:13 +02:00