Questions tagged [emacs-faces]

A face in GNU Emacs is a text style.

A face can have various attributes, such as foreground and background colors, font, height, and weight. Faces are applied as text properties to characters in a string or buffer, or as overlay properties to buffer positions. Face attribute values can be inherited from one or more faces by another face.

95 questions
1
vote
1 answer

Emacs customize-face loses/fails to recognise font-name it wrote to my .emacs itself

I used the Options/Set Default Font menu item to set my default emacs font to be LMMonoLtCond10 (it brought up a nice font-selector GUI widget to let me do this). My emacs immediately adopted the new font, and I was very happy. I then did…
Michael Norrish
  • 412
  • 2
  • 11
1
vote
1 answer

emacs23 on windows: set-face-foreground seems to get forgotten during load of emacs.el

Just got a new Windows laptop, installing emacs23 on it. My previous computers have used emacs 22 for I-don't-know-how-long. I have a longish emacs.el, which loads various side elisp libraries. I had everything set up just so, in emacs 22. I…
Cheeso
  • 189,189
  • 101
  • 473
  • 713
1
vote
2 answers

Emacs font sizes in pixels for fixed size pixel fonts?

I'm using fixed size pixel fonts in emacs when writing code. When specifying font sizes in emacs, it wants the font size in points. Since I use my .emacs file on several different machines with varying monitor sizes, it means that when the font…
Marius Kjeldahl
  • 6,830
  • 3
  • 33
  • 37
1
vote
1 answer

Highlight function calls but not first in quoted list in emacs

In emacs lisp mode, I want to highlight all function calls one color, and all quoted symbols another color. For example, in (foo 1 2 'bar), foo should be highlighted color 1 and 'bar should be highlighted color 2. I was able to do this with the code…
profesor_tortuga
  • 1,826
  • 2
  • 17
  • 27
1
vote
1 answer

Add and reference new face in Emacs

I defined a new face in Emacs, but the coloring does not take effect. Here is the face and mode definition in ~/.emacs: (defface sml-highlight-operator-face '((t (:foreground "red"))) "SML operator highlighting" :group 'basic-faces) (defvar…
eatonphil
  • 13,115
  • 27
  • 76
  • 133
1
vote
1 answer

How set colors for a specific mode?

I'm trying Emacs. I would like to set colors for Eshell. I tried that first with set-foreground-color. But it affects my other modes too. (add-hook 'eshell-mode-hook (lambda ( default ((t (:foreground "#BD8700")))))) But that's not working…
ReneFroger
  • 484
  • 8
  • 20
1
vote
3 answers

Match string ignoring comments

How might I match a string for Font Lock fontification while ignoring comments within that string? e.g. (setq str-regexp "^foobar$" comment-regexp "/\\*[^*]*\\*/") Now how might I return match data to fontify the string "foobar" in the…
rnkn
  • 495
  • 3
  • 13
1
vote
3 answers

Changing Emacs font color

I'm a bit of an emacs noob. I'm completely satisfied with tomorrow-night-bright-theme except the fluorescent one below I'v read some articles explaining how to change font faces in Emacs. 1. Changing highlight line color in emacs 2. Change Emacs…
1ambda
  • 1,145
  • 8
  • 19
1
vote
1 answer

Scroll bars are turned off and have an empty face, yet still display?

Note this image of my customize settings: You can clearly see what appears to be a scroll bar there along the left (is also on right of screen), despite the indicated settings. Further, I have this in my .emacs: (custom-set-variables ;;…
johnbakers
  • 24,158
  • 24
  • 130
  • 258
1
vote
2 answers

Saved theme in .emacs doesn't load on launch

I can load the solarized-light theme when I go to customize-themes, but even though it is in my .emacs, it never loads on launch. Why is this? (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it…
johnbakers
  • 24,158
  • 24
  • 130
  • 258
1
vote
1 answer

emacs custom php tags highlight syntax

I want to set custom color background in tags, but other do not touch (define-derived-mode php-mode fundamental-mode "php-mode" :syntax-table php-syntax-table (setq font-lock-defaults '(php-keywords))) (defvar php-syntax-table…
guano_code
  • 11
  • 3
1
vote
2 answers

Preserving buffer-face-mode when switching major-modes

Once in a while I manually set the font-family and size different from the default, and I use buffer-face-mode to do it. (To be exact I use the mouse & pick one from the dialog box.) Once I set it, I'd like it to stay set for that buffer, even if I…
Yary
  • 325
  • 2
  • 7
1
vote
3 answers

set text properties

I want to copy a text from one buffer to another with text properties. So I have (with-current-buffer from-buffer (setq text-to-copy (buffer-substring beg end))) How can I insert the text-to-copy to another buffer with all text properties? I'm…
Oleg Pavliv
  • 20,462
  • 7
  • 59
  • 75
1
vote
1 answer

Why is the text font-face setting killed/copied along with the text?

The case I am presenting right here isn't reproducible everywhere in Emacs but the where I was able reproduce it was in nav when telling it the path of a location to jump to, in both Emacs 24.1.x and 24.3.x. So the question is why is it that when…
Bleeding Fingers
  • 6,993
  • 7
  • 46
  • 74
1
vote
1 answer

dired-do-search does not use isearch-face

How can one have dired-do-search use the more visible isearch-face, or at least highlight the entire token found? A blinking cursor would be an alternative, if it weren't so distracting while editing. Restatement If I run isearch-forward on the…
Calaf
  • 10,113
  • 15
  • 57
  • 120