Optimise spacemacs/last-error further

Noticed that I have used if instead of when
and added an obsolete progn.
This commit is contained in:
smile13241324 2019-11-03 20:35:49 +01:00
parent e74fc70de8
commit 5fdb89d61d
1 changed files with 3 additions and 4 deletions

View File

@ -374,10 +374,9 @@ is not visible. Otherwise delegates to regular Emacs next-error."
(defun spacemacs/last-error ()
"Go to last flycheck or standard emacs error."
(interactive)
(if (save-excursion (spacemacs/next-error))
(progn
(evil-goto-line)
(spacemacs/previous-error))))
(when (save-excursion (spacemacs/next-error))
(evil-goto-line)
(spacemacs/previous-error)))
(defun spacemacs/previous-error (&optional n reset)
"Dispatch to flycheck or standard emacs error."