Function: erc--assemble-toggle
erc--assemble-toggle is a byte-compiled function defined in
erc-common.el.gz.
Signature
(erc--assemble-toggle LOCALP NAME ABLSYM MODE VAL BODY)
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-common.el.gz
(defun erc--assemble-toggle (localp name ablsym mode val body)
(let ((arg (make-symbol "arg")))
`(defun ,ablsym ,(if localp `(&optional ,arg) '())
,(concat
(if val "Enable" "Disable")
" ERC " (symbol-name name) " mode."
(when localp
(concat "\nWhen called interactively,"
" do so in all buffers for the current connection.")))
(interactive ,@(when localp '("p")))
,@(if localp
`((when (derived-mode-p 'erc-mode)
(if ,arg
(erc-with-all-buffers-of-server erc-server-process nil
(,ablsym))
(setq ,mode ,val)
,@body)))
`(,(if val
`(cl-pushnew ',(erc--normalize-module-symbol name)
erc-modules)
`(setq erc-modules (delq ',(erc--normalize-module-symbol name)
erc-modules)))
(setq ,mode ,val)
,@body)))))