Adds native comp exception for warnings. Modifies kill-buffer-and-window to keep leftmost widnows.

This commit is contained in:
Mariano Uvalle 2021-05-28 19:31:10 -05:00
parent c3add5d12e
commit b6fa735642

View file

@ -16,6 +16,9 @@
;; Avoid asking confirmation when killing a buffer with a process. ;; Avoid asking confirmation when killing a buffer with a process.
(setq kill-buffer-query-functions nil) (setq kill-buffer-query-functions nil)
;; Don't show warnings when doing async native com.
(setq native-comp-async-report-warnings-errors nil)
#+end_src #+end_src
** Package system setup ** Package system setup
@ -233,10 +236,11 @@ Leader key combinations to deal with buffers.
(cl-remove-if-not 'buffer-file-name (buffer-list))))) ;; Only remove file buffers. (cl-remove-if-not 'buffer-file-name (buffer-list))))) ;; Only remove file buffers.
(defun mariano/kill-buffer-and-window () (defun mariano/kill-buffer-and-window ()
"Kills the current buffer. If there's more than one active window it also closes the current one" "Kills the current buffer. If there's more than one window and it is not the leftmost window, it also kills it."
(interactive) (interactive)
(if (> (count-windows) 1) (if (and (> (count-windows) 1)
(kill-buffer-and-window) (window-left (selected-window)))
(kill-buffer-and-window)
(kill-buffer))) (kill-buffer)))