2017-08-06 73 views

回答

1

添加以下~/.emacs,這將其綁定到C-x C-s

(defun save-buffer-maybe-show-errors() 
    "Save buffer and show errors if any." 
    (interactive) 
    (save-buffer) 
    (when (not flycheck-current-errors) 
    (flycheck-list-errors))) 
;; Bind it to some key: 
(global-set-key (kbd "C-x C-s") 'save-buffer-maybe-show-errors)