branch: elpa/xkcd
commit e5d4ab24f61df1e1b4d7dd63d2efc37a1df7aae8
Author: Vibhav Pant <[email protected]>
Commit: Vibhav Pant <[email protected]>
Add xkcd-kill-buffer and a keybinding to the function.
---
emacs-xkcd.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/emacs-xkcd.el b/emacs-xkcd.el
index da7c6e38c9..28de911cb4 100644
--- a/emacs-xkcd.el
+++ b/emacs-xkcd.el
@@ -22,6 +22,7 @@
(define-key map (kbd "<left>") 'xkcd-prev)
(define-key map (kbd "C-c r") 'xkcd-rand)
(define-key map (kbd "C-c t") 'xkcd-alt-text)
+ (define-key map (kbd "q") 'xkcd-kill-buffer)
map))
(defun xkcd-get-json (url &optional num)
@@ -126,5 +127,10 @@
(interactive)
(message xkcd-alt))
+(defun xkcd-kill-buffer ()
+ "Kill the xkcd buffer"
+ (interactive)
+ (kill-buffer "*xkcd*"))
+
(provide 'emacs-xkcd)
;;; emacs-xkcd.el ends here