Function: eca-doom--decorate-segment

eca-doom--decorate-segment is a natively compiled function defined in eca-doom.el.

Signature

(eca-doom--decorate-segment TABLINE INDEX NAME FACE)

Documentation

Apply FACE to the workspace NAME segment at INDEX in TABLINE.

Return the decorated tabline, or TABLINE unchanged when the segment is not found.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-doom.el
(defun eca-doom--decorate-segment (tabline index name face)
  "Apply FACE to the workspace NAME segment at INDEX in TABLINE.
Return the decorated tabline, or TABLINE unchanged when the
segment is not found."
  (let ((regexp (format " \\[%d\\] \\(%s\\) " index (regexp-quote name))))
    (if (string-match regexp tabline)
        (let ((result (copy-sequence tabline)))
          (add-face-text-property (match-beginning 1) (match-end 1)
                                  face nil result)
          result)
      tabline)))