Skip to content

Error with color-segment function but only when certain faces returned #148

@Cerebus

Description

@Cerebus

OK, I give up.

(setq telephone-line-faces
   '((modified . my/modified-face-fun)))

(setq telephone-line-lhs '((modified . (my/status-segment))))

(telephone-line-defsegment* my/status-segment ()
    `(""
      mode-line-modified))

(defun my/modified-face-fun (active)
    (cond ((not active) 'mode-line-inactive)
	  ((buffer-modified-p) 'error)
	  (t 'mode-line)))

Errors:

Error during redisplay: (eval (telephone-line-add-subseparators '(#[(face) ('("" mode-line-modified)) (t)]) telephone-line-identity-hollow-left 'modified) t) signaled (wrong-type-argument number-or-marker-p nil) [3 times]

Yet if I return ((buffer-modified-p) 'default) instead, it works. error is clearly a face; I can see it in the faces list and I can customize it. Also errors returning other lots of other faces...but not everything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions