emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/helm 029302f7dc 1/2: Keep replacing interactive fn with he


From: ELPA Syncer
Subject: [nongnu] elpa/helm 029302f7dc 1/2: Keep replacing interactive fn with helm-make-persistent-command-from-action
Date: Tue, 27 Sep 2022 08:58:55 -0400 (EDT)

branch: elpa/helm
commit 029302f7dcc96ded20b4a2b4b40d4d5bce91c487
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Keep replacing interactive fn with helm-make-persistent-command-from-action
---
 helm-bookmark.el |  9 ++-------
 helm-buffers.el  | 16 ++++------------
 2 files changed, 6 insertions(+), 19 deletions(-)

diff --git a/helm-bookmark.el b/helm-bookmark.el
index cfd0b7fa83..bf15f4b5eb 100644
--- a/helm-bookmark.el
+++ b/helm-bookmark.el
@@ -188,14 +188,9 @@ will be honored."
                      (regexp-quote trunc)
                    (regexp-quote real)))))
 
-(defun helm-bookmark-toggle-filename ()
+(helm-make-persistent-command-from-action helm-bookmark-toggle-filename
   "Toggle bookmark location visibility."
-  (interactive)
-  (with-helm-alive-p
-    (helm-set-attr 'toggle-filename
-                  '(helm-bookmark-toggle-filename-1 . never-split))
-    (helm-execute-persistent-action 'toggle-filename)))
-(put 'helm-bookmark-toggle-filename 'helm-only t)
+  'toggle-filename 'helm-bookmark-toggle-filename-1)
 
 (defun helm-bookmark-jump (candidate)
   "Jump to bookmark action."
diff --git a/helm-buffers.el b/helm-buffers.el
index f50191b7b6..24b587a8c6 100644
--- a/helm-buffers.el
+++ b/helm-buffers.el
@@ -791,13 +791,9 @@ If REGEXP-FLAG is given use `query-replace-regexp'."
         (user-error "Buffer `%s' is not associated to a file"
                     (buffer-name buf))))))
 
-(defun helm-buffer-diff-persistent ()
+(helm-make-persistent-command-from-action helm-buffer-diff-persistent
   "Toggle diff buffer without quitting helm."
-  (interactive)
-  (with-helm-alive-p
-    (helm-set-attr 'diff-action 'helm-buffer-toggle-diff)
-    (helm-execute-persistent-action 'diff-action)))
-(put 'helm-buffer-diff-persistent 'helm-only t)
+  'diff-action 'helm-buffer-toggle-diff)
 
 (defun helm-revert-buffer (candidate)
   (with-current-buffer candidate
@@ -816,13 +812,9 @@ If REGEXP-FLAG is given use `query-replace-regexp'."
       (when helm-marked-candidates (helm-unmark-all))
       (helm-force-update preselect))))
 
-(defun helm-buffer-revert-persistent ()
+(helm-make-persistent-command-from-action helm-buffer-revert-persistent
   "Revert buffer without quitting helm."
-  (interactive)
-  (with-helm-alive-p
-    (helm-set-attr 'revert-action '(helm-buffer-revert-and-update . 
never-split))
-    (helm-execute-persistent-action 'revert-action)))
-(put 'helm-buffer-revert-persistent 'helm-only t)
+  'revert-action 'helm-buffer-revert-and-update)
 
 (defun helm-buffer-save-and-update (_candidate)
   (with-helm-buffer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]