Function: erc--tick-module-checkbox

erc--tick-module-checkbox is a byte-compiled function defined in erc-common.el.gz.

Signature

(erc--tick-module-checkbox NAME &rest _)

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-common.el.gz
;; This exists as a separate, top-level function to prevent the byte
;; compiler from warning about widget-related dependencies not being
;; loaded at runtime.

(defun erc--tick-module-checkbox (name &rest _) ; `name' must be normalized
  (customize-variable-other-window 'erc-modules)
  ;; Move to `erc-modules' section.
  (while (not (eq (widget-type (widget-at)) 'checkbox))
    (widget-move 1 t))
  ;; This search for a checkbox can fail when `name' refers to a
  ;; third-party module that modifies `erc-modules' (improperly) on
  ;; load.
  (let (w)
    (while (and (eq (widget-type (widget-at)) 'checkbox)
                (not (and (setq w (widget-get-sibling (widget-at)))
                          (eq (widget-value w) name))))
      (setq w nil)
      (widget-move 1 t)) ; the `suppress-echo' arg exists in 27.2
    (unless w
      (error "Failed to find %s in `erc-modules' checklist" name))
    (widget-apply-action (widget-at))
    (message "Hit %s to apply or %s to apply and save."
             (substitute-command-keys "\\[Custom-set]")
             (substitute-command-keys "\\[Custom-save]"))))