Function: erc-retrieve-catalog-entry

erc-retrieve-catalog-entry is a byte-compiled function defined in erc.el.gz.

Signature

(erc-retrieve-catalog-entry KEY &optional CATALOG)

Documentation

Retrieve format-spec entry for symbol KEY in CATALOG.

Without symbol CATALOG, use erc-current-message-catalog. If lookup fails, try the latter's default-toplevel-value if it's not the same as CATALOG. Failing that, try the english catalog if yet untried.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-retrieve-catalog-entry (key &optional catalog)
  "Retrieve `format-spec' entry for symbol KEY in CATALOG.
Without symbol CATALOG, use `erc-current-message-catalog'.  If
lookup fails, try the latter's `default-toplevel-value' if it's
not the same as CATALOG.  Failing that, try the `english' catalog
if yet untried."
  (unless catalog (setq catalog erc-current-message-catalog))
  (symbol-value
   (or (erc--make-message-variable-name catalog key 'softp)
       (let ((parent catalog)
             last)
         (while (and (setq parent (get parent 'erc--base-format-catalog))
                     (not (setq last (erc--make-message-variable-name
                                      parent key 'softp)))))
         last)
       (let ((default (default-toplevel-value 'erc-current-message-catalog)))
         (or (and (not (eq default catalog))
                  (erc--make-message-variable-name default key 'softp))
             (and (not (memq 'english (list default catalog)))
                  (erc--make-message-variable-name 'english key 'softp)))))))