mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
General, minor refactor
+ Group hooks with add-hook! + Sharpquote elfeed call + Extract elfeed buffer detector into function and ensure idempotency of doom-real-buffer-functions
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
(defun =rss ()
|
||||
"Activate (or switch to) `elfeed' in its workspace."
|
||||
(interactive)
|
||||
(call-interactively 'elfeed))
|
||||
(call-interactively #'elfeed))
|
||||
|
||||
;;;###autoload
|
||||
(defun +rss/quit ()
|
||||
|
@ -33,8 +33,9 @@ paths.")
|
||||
(make-directory elfeed-db-directory t)
|
||||
|
||||
;; Ensure elfeed buffers are treated as real
|
||||
(push (lambda (buf) (string-match-p "^\\*elfeed" (buffer-name buf)))
|
||||
doom-real-buffer-functions)
|
||||
(defun +rss-buffer-p (buf)
|
||||
(string-match-p "^\\*elfeed" (buffer-name buf)))
|
||||
(add-to-list 'doom-real-buffer-functions #'+rss-buffer-p nil #'eq)
|
||||
|
||||
;; Enhance readability of a post
|
||||
(add-hook 'elfeed-show-mode-hook #'+rss|elfeed-wrap)
|
||||
|
@ -131,5 +131,5 @@ environment variables."
|
||||
;;
|
||||
|
||||
(when (featurep! :feature evil +everywhere)
|
||||
(add-hook 'anaconda-mode-hook #'evil-normalize-keymaps)
|
||||
(add-hook 'nose-mode-hook #'evil-normalize-keymaps))
|
||||
(add-hook! '(anaconda-mode-hook nose-mode-hook)
|
||||
#'evil-normalize-keymaps))
|
||||
|
@ -16,7 +16,7 @@
|
||||
;; Custom modeline that removes useless info and adds page numbers
|
||||
(when (featurep! :ui doom-modeline)
|
||||
(load! "+modeline")
|
||||
(add-hook! pdf-tools-enabled (doom-set-modeline 'pdf-tools-modeline)))
|
||||
(add-hook! #'pdf-tools-enabled-hook (doom-set-modeline 'pdf-tools-modeline)))
|
||||
;; Handle PDF-tools related popups better
|
||||
(set! :popup "^\\*Outline*" '((side . right) (size . 40)) '((select)))
|
||||
;; TODO: Add additional important windows that should be handled differently
|
||||
|
Reference in New Issue
Block a user