blob: 37da9e45ddc6b5bfee2399f42ed1b65c870323f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
;;; -*- lexical-binding: t -*-
;; Time-stamp: <2026-08-26 20h27 BST (anker)>
(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"))
(defun my-log-edit-mode ()
(when (derived-mode-p 'log-edit-mode)
(auto-fill-mode -1)
(visual-line-mode 1)))
(add-hook 'log-edit-mode-hook 'my-log-edit-mode)
|