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

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

[elpa] externals/ivy-hydra f6b3b29 011/395: counsel.el (counsel-compile-


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra f6b3b29 011/395: counsel.el (counsel-compile-forget-command): Add
Date: Thu, 25 Feb 2021 08:31:20 -0500 (EST)

branch: externals/ivy-hydra
commit f6b3b29ad0dd0579ef1e2b1ba3b17b0311663f8b
Author: Andrew Whatson <whatson@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    counsel.el (counsel-compile-forget-command): Add
    
    Adds a delete action to forget commands in
    `counsel-compile-history'. This is particularly useful when persisting
    the history with `savehist'.
    
    Fixes #2290
---
 counsel.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/counsel.el b/counsel.el
index 9966acb..a11bc37 100644
--- a/counsel.el
+++ b/counsel.el
@@ -5996,6 +5996,14 @@ specified by the `blddir' property."
             :action #'counsel-compile--action
             :caller 'counsel-compile))
 
+(ivy-add-actions
+ 'counsel-compile
+ '(("d" counsel-compile-forget-command "delete")))
+
+(defun counsel-compile-forget-command (cmd)
+  "Delete CMD from `counsel-compile-history'."
+  (setq counsel-compile-history
+        (delete cmd counsel-compile-history)))
 
 (defun counsel-compile-env--format-hint (cands)
   "Return a formatter for compile-env CANDS."



reply via email to

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