Hot answers tagged

6

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 ...


4

@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. For example: (setq ss (propertize "abcde" 'face '(:foreground "red"))) or (setq ss &...


3

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 ...


2

This can be achieved with the package org-superstar-mode. Previously there was another package org-bullets which is no longer maintained. This seems to be the successor.


2

[The answer version of my comment on the question.] Check the value of org-fontify-quote-and-verse-block, which is nil by default, meaning those blocks should be fontified like regular org.


2

(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 ...


2

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 (...


1

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 ...


1

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.


1

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 ...


1

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 ...


1

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 ...


1

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-...


1

See org-headline-done. 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.


1

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. Using: (set-face-attribute 'mode-line-inactive nil :box t) renders the straight line with foreground color: ...


1

It's ivy-highlight-face. According to the source code: "Forward to `describe-function'. Interactive functions (i.e., commands) are highlighted according to `ivy-highlight-face'."


1

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`). or (setq hi-lock-face-defaults ; Set to just these 3 faces. '("dired-flagged" "highlight" "hi-yellow")) or (setq hi-lock-face-defaults ; Add multiple faces. (...


1

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 ...


1

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 ...


1

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 ...


1

If wavy underlines are barely visible on a HiDPI display, consider upgrading to Emacs 26 as this issue has been fixed there. (I tried Emacs 26.3 specifically.)


1

Add this to the end of your config file. (custom-set-faces '(hl-line ((t (:background "#476047604760" :height 1.0)))) '(org-level-1 ((t (:inherit header-line :height 1.0)))) '(org-level-2 ((t (:inherit header-line :height 1.0)))) '(org-level-3 ((t (:inherit header-line :height 1.0)))))


1

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 ...


Only top voted, non community-wiki answers of a minimum length are eligible