emacs-emojify

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

commit 626749b607e810df29cd24422375f9f322d408c6
parent 40cf301191b1a51ee3dd714b468f62e28e59aca2
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date:   Mon,  5 Sep 2016 23:04:42 +0530

Reduce minor code repetition

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

diff --git a/emojify.el b/emojify.el @@ -1307,6 +1307,8 @@ run the command `emojify-download-emoji'"))) ;; Searching and inserting emojis +(defvar emojify-apropos-buffer-name "*Apropos Emojis*") + (defun emojify-apropos-quit () "Delete the window displaying Emoji search results." (interactive) @@ -1393,7 +1395,7 @@ run the command `emojify-download-emoji'"))) (> (car emoji1) (car emoji2)))))) ;; Insert result in apropos buffer and display it - (with-current-buffer (get-buffer-create "*Apropos Emojis*") + (with-current-buffer (get-buffer-create emojify-apropos-buffer-name) (let ((inhibit-read-only t)) (erase-buffer) (insert (propertize "Emojis matching" 'face 'apropos-symbol)) @@ -1409,7 +1411,7 @@ run the command `emojify-download-emoji'"))) (emojify-apropos-mode) (setq-local line-spacing 7))) - (display-buffer (get-buffer "*Apropos Emojis*") + (display-buffer (get-buffer emojify-apropos-buffer-name) (when in-apropos-buffer-p (cons #'display-buffer-same-window nil)))))