[erc] Refactor window purpose allocation to use official form
In the old form the wrong type of extension was added, this prevented any reconfiguration of purpose allocations in the dotfile. Now the right type of allocation is used allowing users to overwrite the config easily. How this is done is described in the purpose layer.
This commit is contained in:
parent
c4e420cf36
commit
689244821c
|
@ -1,6 +1,6 @@
|
|||
;;; config.el --- erc Layer configuration File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; funcs.el --- Spacemacs ERC Layer functions File
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; packages.el --- erc Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -224,7 +224,7 @@
|
|||
"find current erc channel's log file in `erc-view-log-mode'"
|
||||
(interactive)
|
||||
(when (erc-logging-enabled)
|
||||
(find-file-existing (erc-current-logfile)))))))
|
||||
(find-file-existing (erc-current-logfile)))))))
|
||||
|
||||
(defun erc/init-erc-image ()
|
||||
(use-package erc-image
|
||||
|
@ -256,6 +256,7 @@
|
|||
(erc/default-servers)
|
||||
(call-interactively 'erc)))))))
|
||||
|
||||
(defun erc/pre-init-window-purpose ()
|
||||
(spacemacs|use-package-add-hook window-purpose
|
||||
:pre-config (add-to-list 'purpose-user-mode-purposes '(erc-mode . chat))))
|
||||
(defun erc/post-init-window-purpose ()
|
||||
(purpose-set-extension-configuration
|
||||
:erc-layer
|
||||
(purpose-conf :mode-purposes '((erc-mode . chat)))))
|
||||
|
|
Loading…
Reference in a new issue