Function: eca-settings-register-tab

eca-settings-register-tab is a natively compiled function defined in eca-settings.el.

Signature

(eca-settings-register-tab KEY LABEL CREATE-FN REFRESH-FN)

Documentation

Register a settings tab identified by KEY.

LABEL is the display name shown in the tab-line. CREATE-FN is called with (session) to create the buffer. REFRESH-FN is called with (session buffer) to re-render. Re-registering an existing KEY updates it in place, preserving tab order.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-settings.el
(defun eca-settings-register-tab (key label create-fn refresh-fn)
  "Register a settings tab identified by KEY.
LABEL is the display name shown in the tab-line.
CREATE-FN is called with (session) to create the buffer.
REFRESH-FN is called with (session buffer) to re-render.
Re-registering an existing KEY updates it in place,
preserving tab order."
  (let ((new-tab (list :key key
                       :label label
                       :create-fn create-fn
                       :refresh-fn refresh-fn))
        (pos (cl-position key eca-settings--tabs
                          :test #'string=
                          :key (lambda (tab)
                                 (plist-get tab :key)))))
    (if pos
        (setf (nth pos eca-settings--tabs) new-tab)
      (setq eca-settings--tabs
            (append eca-settings--tabs
                    (list new-tab))))))