Variable: erc-modules

erc-modules is a customizable variable defined in erc.el.gz.

Value

(autojoin button completion fill imenu irccontrols list match menu
	  move-to-prompt netsplit networks readonly ring stamp track)

Documentation

Modules to enable while connecting.

When modifying this option in Lisp code, use a Custom-friendly facilitator, like setopt, or call erc-update-modules afterward. This ensures a consistent ordering and disables removed modules. It also gives packages access to the hook erc-before-connect.

This variable was added, or its default value changed, in ERC version
5.6.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defcustom erc-modules '( autojoin button completion fill imenu irccontrols
                          list match menu move-to-prompt netsplit
                          networks readonly ring stamp track)
  "Modules to enable while connecting.
When modifying this option in Lisp code, use a Custom-friendly
facilitator, like `setopt', or call `erc-update-modules'
afterward.  This ensures a consistent ordering and disables
removed modules.  It also gives packages access to the hook
`erc-before-connect'."
  :get (lambda (sym)
         ;; replace outdated names with their newer equivalents
         (erc-migrate-modules (symbol-value sym)))
  ;; Expect every built-in module to have the symbol property
  ;; `erc--module' set to its canonical symbol (often itself).
  :initialize (lambda (symbol exp)
                ;; Use `cdddr' because (set :greedy t . ,entries)
                (dolist (entry (cdddr (get 'erc-modules 'custom-type)))
                  (when-let* (((eq (car entry) 'const))
                              (s (cadddr entry))) ; (const :tag "..." ,s)
                    (put s 'erc--module s)))
                (custom-initialize-reset symbol exp))
  :set (lambda (sym val)
         ;; disable modules which have just been removed
         (when (and (boundp 'erc-modules) erc-modules val)
           (dolist (module erc-modules)
             (unless (memq module val)
               (let ((f (intern-soft (format "erc-%s-mode" module))))
                 (when (and (fboundp f) (boundp f))
                   (when (symbol-value f)
                     (message "Disabling `erc-%s'" module)
                     (funcall f 0))
                   ;; Disable local module in all ERC buffers.
                   (unless (or (custom-variable-p f)
                               (not (fboundp 'erc-buffer-filter)))
                     (erc-buffer-filter (lambda ()
                                          (when (symbol-value f)
                                            (funcall f 0))
                                          (kill-local-variable f)))))))))
         ;; Calling `set-default-toplevel-value' complicates testing.
         (set sym (erc--sort-modules val))
         ;; Don't initialize modules on load, even though the rare
         ;; third-party module may need it.
         (when (fboundp 'erc-update-modules)
           (unless erc--inside-mode-toggle-p
             (erc-update-modules))))
  :type
  '(set
    :greedy t
    (const :tag "autoaway: Set away status automatically" autoaway)
    (const :tag "autojoin: Join channels automatically" autojoin)
    (const :tag "bufbar: Show ERC buffers in a side window" bufbar)
    (const :tag "button: Buttonize URLs, nicknames, and other text" button)
    (const :tag "capab: Mark unidentified users on servers supporting CAPAB"
           capab-identify)
    (const :tag "command-indicator: Echo command lines." command-indicator)
    (const :tag "completion: Complete nicknames and commands (programmable)"
           completion)
    (const :tag "dcc: Provide Direct Client-to-Client support" dcc)
    (const :tag "fill: Wrap long lines" fill)
    (const :tag "identd: Launch an identd server on port 8113" identd)
    (const :tag "imenu: A simple Imenu integration" imenu)
    (const :tag "irccontrols: Highlight or remove IRC control characters"
           irccontrols)
    (const :tag "keep-place: Leave point above un-viewed text" keep-place)
    (const :tag "list: List channels in a separate buffer" list)
    (const :tag "log: Save buffers in logs" log)
    (const :tag "match: Highlight pals, fools, and other keywords" match)
    (const :tag "menu: Display a menu in ERC buffers" menu)
    (const :tag "move-to-prompt: Move to the prompt when typing text"
           move-to-prompt)
    (const :tag "netsplit: Detect netsplits" netsplit)
    (const :tag "networks: Provide data about IRC networks" networks)
    (const :tag "nickbar: Show nicknames in a dynamic side window" nickbar)
    (const :tag "nicks: Uniquely colorize nicknames in target buffers" nicks)
    (const :tag "noncommands: Deprecated. See module `command-indicator'."
           noncommands)
    (const :tag "notifications: Desktop alerts on PRIVMSG or mentions"
           notifications)
    (const :tag
           "notify: Notify when the online status of certain users changes"
           notify)
    (const :tag "page: Process CTCP PAGE requests from IRC" page)
    (const :tag "readonly: Make displayed lines read-only" readonly)
    (const :tag "replace: Replace text in messages" replace)
    (const :tag "ring: Enable an input history" ring)
    (const :tag "sasl: Enable SASL authentication" sasl)
    (const :tag "scrolltobottom: Scroll to the bottom of the buffer"
           scrolltobottom)
    (const :tag "services: Identify to Nickserv (IRC Services) automatically"
           services)
    (const :tag "smiley: Convert smileys to pretty icons" smiley)
    (const :tag "sound: Play sounds when you receive CTCP SOUND requests"
           sound)
    (const :tag "spelling: Check spelling" spelling)
    (const :tag "stamp: Add timestamps to messages" stamp)
    (const :tag "track: Track channel activity in the mode-line" track)
    (const :tag "truncate: Truncate buffers to a certain size" truncate)
    (const :tag "unmorse: Translate morse code in messages" unmorse)
    (const :tag "xdcc: Act as an XDCC file-server" xdcc)
    (repeat :tag "Others" :inline t symbol))
  :package-version '(ERC . "5.6")
  :group 'erc)