Add `rcirc-enable-erc-tweet` to rcirc layer
This commit is contained in:
parent
cf12a9ec5b
commit
b654d23b5b
|
@ -1988,6 +1988,8 @@ Other:
|
|||
by default).
|
||||
- New variable =rcirc-enable-erc-image= to enable or disable the =erc-image=
|
||||
package in rcirc for showing linked images in chat (disabled by default).
|
||||
- New variable =rcirc-enable-erc-tweet= to enable or disable the =erc-tweet=
|
||||
package in rcirc for showing linked tweets in chat (disabled by default).
|
||||
- Fixed using multiple lines in =.authinfo= (thanks to Jelle Licht)
|
||||
- Fixed logging where the channel name has =/= in it
|
||||
(thanks to Abdo Roig-Maranges)
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
- [[#enabling-sfoobar][Enabling =s/foo/bar/=]]
|
||||
- [[#enabling-emojify-mode][Enabling emojify-mode]]
|
||||
- [[#enabling-erc-image][Enabling erc-image]]
|
||||
- [[#enabling-erc-tweet][Enabling erc-tweet]]
|
||||
- [[#enabling-rcirc-styles][Enabling rcirc-styles]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
- [[#rcirc-documentation][Rcirc documentation]]
|
||||
|
@ -199,6 +200,15 @@ chat, set the variable =rcirc-enable-erc-image= to =t= in your dotfile:
|
|||
(rcirc :variables rcirc-enable-erc-image t)))
|
||||
#+END_SRC
|
||||
|
||||
** Enabling erc-tweet
|
||||
To enable erc-tweet for fetching and displaying tweets when they are linked in
|
||||
chat, set the variable =rcirc-enable-erc-tweet= to =t= in your dotfile:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq-default dotspacemacs-configuration-layers '(
|
||||
(rcirc :variables rcirc-enable-erc-tweet t)))
|
||||
#+END_SRC
|
||||
|
||||
** Enabling rcirc-styles
|
||||
To enable rcirc-styles for displaying and inserting color and text attribute
|
||||
codes, set the variable =rcirc-enable-styles= to =t= in your dotfile:
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
(defvar rcirc-enable-erc-image nil
|
||||
"if non nil then enable erc-image to display images in rcirc.")
|
||||
|
||||
(defvar rcirc-enable-erc-tweet nil
|
||||
"if non nil then enable erc-tweet to display tweets in rcirc.")
|
||||
|
||||
(defvar rcirc-enable-late-fix nil
|
||||
"if non nil then enable rcirc-late-fix to show s/// fixes in rcirc buffers.")
|
||||
|
||||
|
|
|
@ -174,8 +174,11 @@ This doesn't support the chanserv auth method. "
|
|||
;; erc-image -----------------------------------------------------------------
|
||||
|
||||
(defun spacemacs//rcirc-image-show-url (_sender _response)
|
||||
;; erc-image's url-queue callback uses erc-fill-prefix, so it must be bound
|
||||
;; when the callback runs (it would not suffice simply to let-bind it here).
|
||||
(unless (boundp 'erc-fill-prefix)
|
||||
(setq erc-fill-prefix rcirc-fill-prefix))
|
||||
(erc-image-show-url))
|
||||
|
||||
;; erc-tweet --------------------------------------------------------------------
|
||||
|
||||
(defun spacemacs//rcirc-tweet-show-tweet (_sender _response)
|
||||
(erc-tweet-show-tweet))
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
emoji-cheat-sheet-plus
|
||||
emojify
|
||||
(erc-image :toggle rcirc-enable-erc-image)
|
||||
(erc-tweet :toggle rcirc-enable-erc-tweet)
|
||||
flyspell
|
||||
(helm-rcirc :location local
|
||||
:requires helm)
|
||||
|
@ -56,6 +57,18 @@
|
|||
(add-hook 'rcirc-markup-text-functions
|
||||
#'spacemacs//rcirc-image-show-url)))))
|
||||
|
||||
(defun rcirc/init-erc-tweet ()
|
||||
(spacemacs|use-package-add-hook rcirc
|
||||
:post-config
|
||||
(use-package erc-tweet
|
||||
:if rcirc-enable-erc-tweet
|
||||
:init (with-eval-after-load 'rcirc
|
||||
(setq erc-tweet-cache-dir (concat spacemacs-cache-directory
|
||||
"erc-tweet/"))
|
||||
(make-directory erc-tweet-cache-dir t)
|
||||
(add-hook 'rcirc-markup-text-functions
|
||||
#'spacemacs//rcirc-tweet-show-tweet)))))
|
||||
|
||||
(defun rcirc/post-init-flyspell ()
|
||||
(spell-checking/add-flyspell-hook 'rcirc-mode-hook))
|
||||
|
||||
|
|
Loading…
Reference in New Issue