Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If a color is unavailable on a frame, emacs should try and pick something "close", but that's often very wrong on limited color displays. You should ask emacs how many colors it thinks it has in gnome-terminal either using <code>M-x list-colors-display</code> (to actually view the colors) or run <code>(display-color-cells)</code> in the scratch buffer. If it says you only have 8, you might want to consider changing your <code>TERM</code> environment variable to something like <code>xterm-256color</code> before you start emacs (though I'm not sure how well this actually works in gnome-terminal; I use xterm).</p> <p>So that might help emacs be able to find a color that's closer, but if it's still wrong, you'll want to do something more drastic, like set the colors based on the window system.</p> <p>If you're not using daemon mode, you can use something like</p> <blockquote><code>(if window-system<br>&nbsp;&nbsp;&nbsp;&nbsp;(set-face-foreground 'font-lock-function-name-face "LightSkyBlue"))</code></blockquote> <p>If you use <code>M-x describe-face</code>, it will ask which face you want to describe, defaulting to the one currently at point. You can get the name (and usually the color) from there.</p> <p>If you are using daemon mode, then you'll want different colors for each frame, in which case you'll need to set the color for the frame in the new frame hook, something more like:</p> <blockquote><code>(defun set-new-frame-colors (frame)<br> &nbsp;&nbsp;&nbsp;"Set colors based on frame type."<br> &nbsp;&nbsp;&nbsp;(if (window-system frame)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(set-face-forgeground 'font-lock-function-name-face "LightSkyBlue" frame)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(set-face-forgeground 'font-lock-function-name-face "blue" frame)))<br> (add-hook 'after-make-frame-functions 'set-new-frame-colors)</code></blockquote> <p>Alternatively, instead of checking <code>(window-system frame)</code>, you could check <code>(length (defined-colors frame))</code> and base it on how many colors are supported by the system, so that you can have different colors for 8-color vs. 256-color terminals.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload