aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Leung <bkleung89@gmail.com>2019-03-28 05:30:06 +0100
committerOleg Pykhalov <go.wigust@gmail.com>2019-04-05 18:44:05 +0300
commit3dbd240937a7fb4322db21bc1bf6189a1a512223 (patch)
tree82dda6ad69e8df5199759559ced19d8c1727754b
parent3a665637afc32a142dc24a77ce7ce9235eb6a3af (diff)
downloadpatches-3dbd240937a7fb4322db21bc1bf6189a1a512223.tar
patches-3dbd240937a7fb4322db21bc1bf6189a1a512223.tar.gz
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>
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/emacs-xyz.scm23
-rw-r--r--gnu/packages/patches/emacs-undohist-ignored.patch27
3 files changed, 51 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 54882b3571..cec746bcb1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -751,6 +751,7 @@ dist_patch_DATA = \
%D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \
%D%/packages/patches/emacs-source-date-epoch.patch \
%D%/packages/patches/emacs-realgud-fix-configure-ac.patch \
+ %D%/packages/patches/emacs-undohist-ignored.patch \
%D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \
%D%/packages/patches/emacs-zones-called-interactively.patch \
%D%/packages/patches/enlightenment-fix-setuid-path.patch \
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 17cbbf4166..6de4fc4d20 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -4535,6 +4535,29 @@ Emacs default configuration in uncontroversial ways that nearly everyone can
agree upon.")
(license license:gpl3+)))
+(define-public emacs-undohist-el
+ (let ((commit "d2239a5f736724ceb9e3b6bcaa86f4064805cda0")
+ (revision "1"))
+ (package
+ (name "emacs-undohist-el")
+ (version (git-version "0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/m2ym/undohist-el")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1c0daw246ky7b1x5b8h55x79pl1pjqk1k348l487bdd8zdj4w9wx"))))
+ (build-system emacs-build-system)
+ (home-page "https://github.com/m2ym/undohist-el")
+ (synopsis "Save undo history between sessions")
+ (description "This package allows persistent use of undo history for
+individual file buffers.")
+ (license license:gpl3+))))
+
(define-public emacs-eprime
(let ((commit "17a481af26496be91c07139a9bfc05cfe722506f"))
(package
diff --git a/gnu/packages/patches/emacs-undohist-ignored.patch b/gnu/packages/patches/emacs-undohist-ignored.patch
new file mode 100644
index 0000000000..c1ad827a26
--- /dev/null
+++ b/gnu/packages/patches/emacs-undohist-ignored.patch
@@ -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
+