emacs-emojify

fork of https://github.com/iqbalansari/emacs-emojify
Log | Files | Refs | LICENSE

commit 8e14d6f59084ec745731830b57a4f7471b7b1c69
parent 2bc4ffd39b9674486b8799ab6eedbb7fa8ba5743
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date:   Thu, 23 Mar 2017 19:59:05 +0530

Display progress while displaying emoji in `emojiy-list-emojis`

Diffstat:
Memojify.el | 14++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/emojify.el b/emojify.el @@ -1810,20 +1810,26 @@ See `tabulated-list-print-entry' to understand the arguments ID and COLS." (insert ?\n) (add-text-properties beg (point) - `(tabulated-list-id ,id tabulated-list-entry ,cols)))) + `(tabulated-list-id ,id tabulated-list-entry ,cols)) + + (message "Listing emojis (%d of %d) ..." (1- (line-number-at-pos)) (aref cols 5)))) (defun emojify-list-entries () "Return entries to display in tabulated list." - (let (entries) + (let (entries count) (emojify-emojis-each (lambda (emoji data) - (push (list emoji (vector emoji (push (list emoji (vector (ht-get data "name") emoji (ht-get data "style") (if (ht-get data "custom") "Yes" "No") emoji)) entries))) - entries)) + + (setq count (length entries)) + + (mapcar (lambda (entry) + (list (car entry) (vconcat (cadr entry) (vector count)))) + entries))) (define-derived-mode emojify-list-mode tabulated-list-mode "Emoji-List" "Major mode for listing emojis.