There’s no simple variable you can set to control this, but you can do it with some programming if you want.
There is a variable called redisplay-highlight-region-function whose value is a function to be called whenever the region needs to be shown. It creates an overlay that applies the region face to the selection (or moves it to a new start/end positions ...
@NickD provided a good answer: use a face.
OP's comment to Nick's answer says that he'll try to write a function that, given a string, returns a propertized string. Such functions already exist: propertize does that, and so does add-face-text-property.
(setq ss (propertize "abcde" 'face '(:foreground "red")))
(setq ss &...
You need to create a string with the appropriate face. You do that by attaching a face text property to the string, giving it value of some face (predefined or defined for the specific purpose - you can look at all the predefined faces with M-x list-faces-display and pick one from there, or you can define your own face).
E.g. here's a snippet to use a ...
(set-face-attribute 'show-paren-match-expression nil :background "yellow")
See Faces in the Elisp manual, in particular Face Attribute Functions, and Matching Parentheses.
If you want to tweak a face, positioning the cursor on a character and hitting C-u C-x = (what-cursor-position) will open a buffer with information about the faces used to ...
First, instead of the code you're using to customize face helm-selection, just use M-x customize-face, and save your changes. Using Customize is nearly always a better idea.
To your question:
Put your cursor on the text whose face you want to know, e.g. the face you say is "green and purple", and use C-u C-x =. The *Help* buffer will tell you (...
If the problem persists with emacs -q, and not for emacs -Q, then the source is most likely in site-start.el. site-start.el is sometimes provided by distributions, and you might find it in /usr/local/share/emacs/site-lisp, /etc/emacs/.
On Ubuntu, running the command locate site-start.el from the command line might show you other locations.
Any files in the ...
Put your cursor on a char with that gray foreground, and use C-u C-x =. The *Help* tells you (near the bottom) what face(s) are used there.
Then use M-x customize-face to customize the face(s) to be as you like.
Yes, you can. See the Elisp manual, node Search-based Fontification.
font-lock-keywords (which you set using font-lock-keywords, e.g. font-lock-add-keywords) can use a FACESPEC expression, which is evaluated to provide the face to use.
FACESPEC is an expression whose value
specifies the face to use for highlighting. In the simplest case,
FACESPEC is a Lisp ...
Have you tried a different font? The cursor shape is likely not easy to change, but the font should be.
You can also increase line spacing: See (elisp) Layout Parameters and (elisp) Special Properties.
You can also try to change frame parameter cursor-type or user option cursor-type. (They allow the same values.) You can set the height of the cursor with ...
nxml-mode, which implicitly loads the built-in sgml-mode for a small number of things, is loaded before PSGML. This means a number of names get clobbered before PSGML loads and it can’t properly claim them.
Loading PSGML before nxml-mode fixes the problem since Emacs will think sgml-mode is already there when nxml-mode loads, but nxml-mode will no longer ...
The error message Invalid face comes from an internal C function lface_from_face_name_no_resolve within xfaces.c A face must be defined before an attribute thereof may be changed with set-face-attribute. The library that defines the org-level-... faces is named org-faces, with the Lisp version being org-faces.el and the byte-compiled version being org-...
Documentation: Face used to indicate that a headline is DONE. This
face is only used if `org-fontify-done-headline' is set. If applies
to the part of the headline after the DONE keyword.
IOW you have to set org-fontify-done-headline to nil.
Following @lawlist advise, using :box attribute for mode-line-inactive made it.
The mode lines images shown in the question are from inactive frames.
The second image shows an inactive frame with a mode line that does not render the straight lines.
(set-face-attribute 'mode-line-inactive nil :box t)
renders the straight line with foreground color:
Set variable hi-lock-face-defaults to the names of the faces you want.
(add-to-list 'hi-lock-face-defaults "highlight") ; Add a face (`highlight`).
(setq hi-lock-face-defaults ; Set to just these 3 faces.
'("dired-flagged" "highlight" "hi-yellow"))
(setq hi-lock-face-defaults ; Add multiple faces.
Edit: I've added some Elisp code at the end of the answer that performs all of the changes mentioned and then evaluates the buffer it is run in.
One way to get this effect is by making some simple modifications to Steve Purcell's page-break-lines.el. (To future-proof this answer as much as possible, I am referring specifically to this version of the file ...
The function customize-create-theme only includes the faces listed in custom-theme--listed-faces. I guess you can set it to (face-list) to make it include more faces.
However, there is a risk you might become overwhelmed, in my setup custom-theme--listed-faces contains 44 faces whereas 447 faces are defined.
A side note: Some years ago I was pondering what ...
Sorry that I didn't see this earlier. This should only happen in older hide-ifdef-mode in Emacs v24 or earlier. For any Emacs version newer than 25.1 (released 2016/09/17), the aforementioned Hide If Def that I rewrote is built-in and replace the old implementation, which did have the problem of not being able to evaluate preprocessor macros properly. In ...
In Emacs 27.1, there is a new variable face-near-same-color-threshold, which can be adjusted to control when distant-foreground is chosen over foreground:
Threshold for using distant-foreground color instead of foreground.
The value should be an integer number providing the minimum distance
between two colors that will still qualify them to be used as ...