refactor(lib): tweak user-error messages
To make these errors more consistent with similar commands/operations, as well as rely less on cl-check-type (cl-lib's understanding of the `font` type is a bit odd; they'd emit warnings/errors about this, but still perform the checks -- I opted to check more explicitly instead).
This commit is contained in:
parent
a3a0629e03
commit
17119c5df7
2 changed files with 3 additions and 3 deletions
|
@ -538,7 +538,7 @@ which case it will save it without prompting."
|
|||
(when (or (derived-mode-p 'dired-mode)
|
||||
(derived-mode-p 'wdired-mode))
|
||||
default-directory)
|
||||
(user-error "Cannot determine the file path of the current buffer"))))
|
||||
(user-error "Current buffer isn't visiting a file"))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/sudo-save-buffer ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue