Use a nicer, cleaner syntax calling #'make-glyph
[emchat] / emchat.el
index 89df916..2bab474 100644 (file)
--- a/emchat.el
+++ b/emchat.el
@@ -716,9 +716,9 @@ EXpLhkaHlpUI4zweHNiNrPmTs2I3Stt3XhJfN8TeewlyXACmFbndDGTM6gSvaT+/UgJ7vpfZ
        (donate-help "Make a donation to the EMchat team.")
        (cancel-help
         "Thank you for considering a donation... maybe another time.")
-       donate-glyph-ext
-       cancel-glyph-ext
-       donate-text-ext
+       (donate-glyph (base64-decode-string emchat-paypal-glyph))
+       (cancel-glyph (base64-decode-string emchat-maybe-later-glyph))
+       donate-glyph-ext cancel-glyph-ext donate-text-ext
        cancel-text-ext)
     (switch-to-buffer buf)
     (erase-buffer)
@@ -728,22 +728,12 @@ EXpLhkaHlpUI4zweHNiNrPmTs2I3Stt3XhJfN8TeewlyXACmFbndDGTM6gSvaT+/UgJ7vpfZ
       (setq donate-glyph-ext (make-extent (point-max) (point-max)))
       (set-extent-begin-glyph
        donate-glyph-ext
-       (make-glyph
-       (list (vector 'png ':data (with-temp-buffer
-                                    (insert emchat-paypal-glyph)
-                                    (base64-decode-region (point-min)
-                                                          (point-max))
-                                    (buffer-string))))))
+       (make-glyph `([png :data ,donate-glyph])))
       (insert "\t\t\t")
       (setq cancel-glyph-ext (make-extent (point-max) (point-max)))
       (set-extent-begin-glyph
        cancel-glyph-ext
-       (make-glyph
-       (list (vector 'png ':data (with-temp-buffer
-                                    (insert emchat-maybe-later-glyph)
-                                    (base64-decode-region (point-min)
-                                                          (point-max))
-                                    (buffer-string))))))
+       (make-glyph `([png :data ,cancel-glyph])))
       (set-extent-property donate-glyph-ext 'keymap emchat-donation-map)
       (set-extent-property donate-glyph-ext 'help-echo donate-help)
       (set-extent-property donate-glyph-ext 'balloon-help donate-help)