[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tmr e7e7a4225c 3/4: tmr-tabulated: Bind "c" to clone th
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tmr e7e7a4225c 3/4: tmr-tabulated: Bind "c" to clone the timer at point |
Date: |
Fri, 13 May 2022 13:57:57 -0400 (EDT) |
branch: externals/tmr
commit e7e7a4225c696522de0d5a6a8a346423f0cc87f0
Author: Damien Cassou <damien@cassou.me>
Commit: Protesilaos Stavrou <info@protesilaos.com>
tmr-tabulated: Bind "c" to clone the timer at point
---
tmr-tabulated.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tmr-tabulated.el b/tmr-tabulated.el
index f0d89d823c..3bef253a20 100644
--- a/tmr-tabulated.el
+++ b/tmr-tabulated.el
@@ -60,6 +60,7 @@
(let ((map (make-sparse-keymap)))
(define-key map "k" #'tmr-tabulated-cancel)
(define-key map "+" #'tmr)
+ (define-key map "c" #'tmr-tabulated-clone)
map)
"Keybindings for `tmr-tabulated-mode-map'.")
@@ -82,6 +83,13 @@ Interactively, use the timer at point."
(tmr-tabulated--move-point-to-closest-entry)
(revert-buffer))
+(defun tmr-tabulated-clone (timer)
+ "Create a new timer by cloning TIMER.
+Interactively, use the timer at point."
+ (interactive (list (tmr-tabulated--get-timer-at-point)))
+ (tmr-clone timer)
+ (revert-buffer))
+
(defun tmr-tabulated--move-point-to-closest-entry ()
"Move the point to the next entry if there is one or to the previous one.
Point isn't moved if point is on the only entry."