diff options
author | JSDurand <mmemmew@gmail.com> | 2021-02-26 11:48:01 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2021-02-26 11:48:01 +0800 |
commit | 9e48aae2523b75c7913a1b665310fb35155fea76 (patch) | |
tree | 2558cf6c35ab6cc97b89830cc2254c282da55d33 | |
parent | 54fc2884baaf68a8bf5ab8033c64512056215a82 (diff) |
Bind zap-up-to-char and a key to conveniently exit elfeed.
* basic.el (global-map): Bind zap-up-to-char.
* elfeed-conf.el (elfeed-search-mode-map):
(elfeed-search-exit): Bind a key to conveniently exit elfeed.
-rw-r--r-- | basic.el | 4 | ||||
-rw-r--r-- | elfeed-conf.el | 14 |
2 files changed, 18 insertions, 0 deletions
@@ -198,6 +198,10 @@ window, then also delete the selected window." (define-key global-map (vector ?\s-k) #'durand-kill-current-buffer) +;;; zap-up-to-char and zap-to-char are both useful. + +(define-key global-map (vector (logior (ash 1 27) #x5a)) #'zap-up-to-char) + ;;; Repeating pops ;;;###autoload diff --git a/elfeed-conf.el b/elfeed-conf.el index 61e43a9..94c6f72 100644 --- a/elfeed-conf.el +++ b/elfeed-conf.el @@ -37,6 +37,8 @@ (list "https://protesilaos.com/politics.xml" 'prot 'politics))) +(define-key elfeed-search-mode-map (vector #x78) 'elfeed-search-exit) + ;; I still prefer the defaults. (setq elfeed-show-entry-switch #'switch-to-buffer) @@ -56,5 +58,17 @@ ((one-window-p)) ((delete-window (get-buffer-window (current-buffer)))))) +;;;###autoload +(defun elfeed-search-exit () + "Save the database, then kill all related buffers." + (interactive) + (elfeed-db-save) + (mapc + (function + (lambda (buffer) + (cond ((string-match-p "^\\*elfeed" (buffer-name buffer)) + (kill-buffer buffer))))) + (buffer-list))) + (provide 'elfeed-conf) ;;; elfeed-conf.el ends here |