Conform many modules to new conventions

This commit is contained in:
Henrik Lissner 2019-07-23 12:30:47 +02:00
parent 20e2aa0b18
commit c795a988e6
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
26 changed files with 161 additions and 165 deletions

View file

@ -3,7 +3,8 @@
(def-package! twittering-mode
:commands twit
:config
(setq twittering-private-info-file (expand-file-name "twittering-mode.gpg" doom-etc-dir)
(setq twittering-private-info-file
(expand-file-name "twittering-mode.gpg" doom-etc-dir)
twittering-use-master-password t
twittering-request-confirmation-on-posting t
;; twittering-icon-mode t
@ -35,24 +36,16 @@
(add-hook 'doom-real-buffer-functions #'+twitter-buffer-p)
(when (featurep! :ui popup)
(setq twittering-pop-to-buffer-function #'+twitter-display-buffer))
(setq twittering-pop-to-buffer-function #'+twitter-display-buffer-fn))
(after! solaire-mode
(add-hook 'twittering-mode-hook #'solaire-mode))
;; Custom header-line for twitter buffers
(defun +twitter|switch-mode-and-header-line ()
(setq header-line-format mode-line-format
mode-line-format nil))
(add-hook 'twittering-mode-hook #'+twitter|switch-mode-and-header-line)
(cond ((featurep! :ui doom-modeline +new)
(setq-hook! 'twittering-mode-hook mode-line-format-right nil))
((featurep! :ui doom-modeline)
(def-modeline! 'twitter
'(bar matches " %b " selection-info)
'())
(add-hook! 'twittering-mode-hook (doom-set-modeline 'twitter))))
(add-hook 'twittering-mode-hook
(defun +twitter-switch-mode-and-header-line-h ()
(setq header-line-format mode-line-format
mode-line-format nil)))
;; `epa--decode-coding-string' isn't defined in later versions of Emacs 27
(unless (fboundp 'epa--decode-coding-string)