branch: master commit dcd0c50111c6848060d1c6a30baa47d0373444b1 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
counsel.el (counsel-unicode-char): Use action-style call Fixes #160 --- counsel.el | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/counsel.el b/counsel.el index 27ec9e7..947ac84 100644 --- a/counsel.el +++ b/counsel.el @@ -167,14 +167,15 @@ (defun counsel-unicode-char () "Insert a Unicode character at point." (interactive) - (let* ((minibuffer-allow-text-properties t) - (char (ivy-read "Unicode name: " - (mapcar (lambda (x) - (propertize - (format "% -60s%c" (car x) (cdr x)) - 'result (cdr x))) - (ucs-names))))) - (insert-char (get-text-property 0 'result char)))) + (let ((minibuffer-allow-text-properties t)) + (ivy-read "Unicode name: " + (mapcar (lambda (x) + (propertize + (format "% -60s%c" (car x) (cdr x)) + 'result (cdr x))) + (ucs-names)) + :action (lambda (char) + (insert-char (get-text-property 0 'result char)))))) (declare-function cider-sync-request:complete "ext:cider-client") ;;;###autoload