Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Definition of fringe-bitmap might have problems in mixed TTY/GUI sessions #98

Open
Eli-Zaretskii opened this issue Jan 4, 2018 · 2 comments
Labels
Milestone

Comments

@Eli-Zaretskii
Copy link

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.

@cowboyd
Copy link
Member

cowboyd commented Jan 4, 2018

Thanks @Eli-Zaretskii for a subtle catch! What would the proper way to do it be?

@Eli-Zaretskii
Copy link
Author

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.

@Robdel12 Robdel12 added the bug label Jan 4, 2018
@Robdel12 Robdel12 added this to the v0.3.0 milestone Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants