mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: Add emacs-undohist-el.
* gnu/packages/patches/emacs-undohist-ignored.patch: New file. * gnu/local.mk (dist_patch_DATA): Add this. * gnu/packages/emacs-xyz.scm (emacs-undohist-el): New variable. Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
This commit is contained in:
parent
3a665637af
commit
3dbd240937
3 changed files with 51 additions and 0 deletions
27
gnu/packages/patches/emacs-undohist-ignored.patch
Normal file
27
gnu/packages/patches/emacs-undohist-ignored.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
From 52bfd419bf9022726048f818d955b8ea10a16d5c Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Mosby <info@schreiblogade.de>
|
||||
Date: Mon, 7 Sep 2015 09:05:56 +0200
|
||||
Subject: [PATCH] Don't save undo file for ignored files.
|
||||
|
||||
This fixes #4.
|
||||
---
|
||||
undohist.el | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/undohist.el b/undohist.el
|
||||
index b184a26..de60356 100644
|
||||
--- a/undohist.el
|
||||
+++ b/undohist.el
|
||||
@@ -164,7 +164,8 @@ To use undohist, you just call this function."
|
||||
undohist-ignored-files)))
|
||||
|
||||
(defun undohist-save-1 ()
|
||||
- (when (consp buffer-undo-list)
|
||||
+ (when (and (consp buffer-undo-list)
|
||||
+ (undohist-recover-file-p (buffer-file-name (current-buffer))))
|
||||
(let ((file (make-undohist-file-name (buffer-file-name)))
|
||||
(contents `((digest . ,(md5 (current-buffer)))
|
||||
(undo-list . ,(undohist-encode buffer-undo-list)))))
|
||||
--
|
||||
2.21.0
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue