[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vundo 6fd7387f03 1/2: Add "vundo-diff-setup-hook" for m
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/vundo 6fd7387f03 1/2: Add "vundo-diff-setup-hook" for manipulating the diff for display |
|
Date: |
Wed, 3 Jan 2024 21:58:58 -0500 (EST) |
branch: externals/vundo
commit 6fd7387f0353658a8e26cc32ca08744d9d3c888c
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>
Add "vundo-diff-setup-hook" for manipulating the diff for display
---
vundo-diff.el | 4 +++-
vundo.el | 7 +++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/vundo-diff.el b/vundo-diff.el
index e6ebb9a80d..97207439d9 100644
--- a/vundo-diff.el
+++ b/vundo-diff.el
@@ -87,7 +87,9 @@ CURRENT node."
(goto-char (point-min))
(dolist (c change-files) ; change the file names in the diff
(when (search-forward (car c) lim t)
- (replace-match (cdr c)))))))))
+ (replace-match (cdr c))))))
+
+ (run-hooks 'vundo-diff-setup-hook))))
;;;###autoload
(defun vundo-diff-mark (&optional node)
diff --git a/vundo.el b/vundo.el
index 6248c7aecd..6e84aa5453 100644
--- a/vundo.el
+++ b/vundo.el
@@ -291,6 +291,13 @@ after all the clean up the exiting function does. Ie, it
is the
very last thing that happens when vundo exists."
:type 'hook)
+(defcustom vundo-diff-setup-hook nil
+ "List of functions to call after creating a diff buffer.
+This hook runs in the ‘vundo-diff’ buffer immediately after it's setup,
+both for new or existing buffers. This may be used to
+manipulate the diff or transform it's contents."
+ :type 'hook)
+
;;; Undo list to mod list
(cl-defstruct vundo-m