diff mbox series

[bug#39333,1/2] gnu: Add emacs-switch-buffer-functions.

Message ID 20200128234911.8601-1-mab@gnu.org
State Accepted
Headers show
Series [bug#39333,1/2] gnu: Add emacs-switch-buffer-functions. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Amin Bandali Jan. 28, 2020, 11:49 p.m. UTC
* gnu/packages/emacs-xyz.scm (emacs-switch-buffer-functions): New variable.
---
 gnu/packages/emacs-xyz.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

Comments

Nicolas Goaziou Feb. 2, 2020, 2:17 p.m. UTC | #1
Hello,

Amin Bandali <mab@gnu.org> writes:

> * gnu/packages/emacs-xyz.scm (emacs-switch-buffer-functions): New
> variable.

Applied as 2cb9b0453d87aaad15cb5c43702dfa8a109c53cb. Thank you!

Regards,
diff mbox series

Patch

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e834dfffb3..6cd463d582 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -21237,3 +21237,26 @@  mode-line text (lighter) of major and minor modes.")
       (description "@code{unkillable-scratch} helps prevent killing buffers
 matching a given regexp.")
       (license license:gpl2+))))
+
+(define-public emacs-switch-buffer-functions
+  (package
+    (name "emacs-switch-buffer-functions")
+    (version "0.0.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/10sr/switch-buffer-functions-el.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0pq53b8wrjbrxd5hnrcdi0z7mffp4bax55hn90k9ca3j76lhbn1k"))))
+    (build-system emacs-build-system)
+    (home-page "https://github.com/10sr/switch-buffer-functions-el")
+    (synopsis "Hooks run when switching current buffer")
+    (description "This package provides a hook variable
+@code{switch-buffer-functions}.  The hooks will be run when the
+current buffer is changed after an interactive command, i.e. when
+@code{post-command-hook} hooks are run.  The hooked functions will be
+called with both the previous and the current buffer.")
+    (license license:unlicense)))