blob: ed83477ddbb283c00ba0e80b515c28775468521c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
;;; -*- lexical-binding: t -*-
;; Time-stamp: <2026-01-02 16h59 GMT (d63c23ed)>
(defun revert-all-file-buffers ()
"Refresh all open file buffers without confirmation"
(interactive)
(dolist (buf (buffer-list))
(let ((filename (buffer-file-name buf)))
(when (and filename (not (buffer-modified-p buf)))
(if (file-readable-p filename)
(with-current-buffer buf (revert-buffer :ignore-auto :noconfirm :preserve-modes))
(let (kill-buffer-query-functions)
(kill-buffer buf)
(message "Killed non-existing/unreadable file bufffer: %s" filename))))))
(message "Finished reverting buffers containing unmodified files."))
(require 'project)
(setq project-vc-extra-root-markers '("Cargo.toml" "pyproject.toml"))
|