frontmacs
frontmacs copied to clipboard
Definition of fringe-bitmap might have problems in mixed TTY/GUI sessions
This part of frontmacs-editing.el:
;; make the flycheck arrow look like an exclamation point.
;; but only do it when emacs runs in a window, not terminal
(when window-system
(define-fringe-bitmap 'flycheck-fringe-bitmap-double-arrow
[0 24 24 24 24 24 24 0 0 24 24 0 0 0 0 0 0]))
is wrong: window-system is a global variable, whereas being on a text-mode terminal is a frame-specific attribute. A single Emacs session can have both GUI and TTY frames at the same time.
Thanks @Eli-Zaretskii for a subtle catch! What would the proper way to do it be?
One way is to define a hook function that would be called by flycheck
when it is activated for a buffer, and in that function have a check for whether the frame is a GUI one.
Alternatively, does defining this unconditionally do any harm? Fringe settings are supposed to be ignored on TTY frames.