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

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

[elpa] master df0d980 267/399: Modify counsel-unicode-char's copy action


From: Oleh Krehel
Subject: [elpa] master df0d980 267/399: Modify counsel-unicode-char's copy action to use actual result
Date: Sat, 20 Jul 2019 14:57:37 -0400 (EDT)

branch: master
commit df0d980e95bcf0ada54460ef24cce570ddd1997d
Author: James Ferguson <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Modify counsel-unicode-char's copy action to use actual result
    
    Fixes #2075
---
 counsel.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/counsel.el b/counsel.el
index 6f78620..3e5de37 100644
--- a/counsel.el
+++ b/counsel.el
@@ -4573,6 +4573,14 @@ COUNT defaults to 1."
                         (setq ivy-completion-end (point))))
             :caller 'counsel-unicode-char))
 
+(defun counsel-unicode-copy (name)
+  "Ivy action to copy the unicode from NAME to the kill ring."
+  (kill-new (char-to-string (get-text-property 0 'code name))))
+
+(ivy-set-actions
+ 'counsel-unicode-char
+ '(("w" counsel-unicode-copy "copy")))
+
 ;;** `counsel-colors'
 (defun counsel-colors-action-insert-hex (color)
   "Insert the hexadecimal RGB value of COLOR."



reply via email to

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