Function: hmail:init

hmail:init is a byte-compiled function defined in hmail.el.

Signature

(hmail:init CLASS-PREFIX FUNC-SUFFIX-LIST)

Documentation

Set up CLASS-PREFIX functions with aliases for FUNC-SUFFIX-LIST.

hmail:reader should be set appropriately before this is called.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hmail.el
(defun hmail:init (class-prefix func-suffix-list)
  "Set up CLASS-PREFIX functions with aliases for FUNC-SUFFIX-LIST.
`hmail:reader' should be set appropriately before this is called."
  (when hmail:reader
    (let* ((reader-name (symbol-name hmail:reader))
	   (reader-prefix (capitalize
			   (substring reader-name
				      0 (string-match "-" reader-name))))
	   hmail-func)
      (mapcar (lambda (func-suffix)
		(setq hmail-func (replace-regexp-in-string
				  "Summ-" "" func-suffix nil t))
		(defalias (intern (concat class-prefix hmail-func))
		  (intern (concat reader-prefix "-" func-suffix))))
	      func-suffix-list))))