]> git.eshelyaron.com Git - emacs.git/commit
Prevent cache of diff-mode buffers to grow without bounds
authorMattias EngdegÄrd <mattiase@acm.org>
Sat, 3 Feb 2024 15:46:59 +0000 (16:46 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 7 Feb 2024 10:49:47 +0000 (11:49 +0100)
commit6158fe7501a639b54ab99d0a066a0e09fe226676
treea7b061aeb388660144856007d8bcae62e0a7c8e7
parent3856b8946d941a456d4b71e50d08e1341f4d5930
Prevent cache of diff-mode buffers to grow without bounds

Previously, these " *diff-syntax:..." buffers were never removed.
Now we discard the least recently used half of them every hour.

* lisp/vc/diff-mode.el (diff--cached-revision-buffers)
(diff--cache-clean-interval, diff--cache-clean-timer, diff--cache-clean)
(diff--cache-schedule-clean, diff--get-revision-properties): New.
(diff-syntax-fontify-hunk): Use diff--get-revision-properties.

(cherry picked from commit 4d57187a248d3243dcc8b5da5d8365cb1b54a347)
lisp/vc/diff-mode.el