3

Gray text highlighting no longer works on my Debian/stretch system. While this is particularly annoying in Emacs, it's not a specific Emacs problem; gray background is also gone from other applications, including the web browser. Therefore I asked for help at Unix SO.

I do however have an Emacs-specific question: Are there ways of active-region highlighting other than gray background? I would like to try them out in order to narrow down the gray-background-is-gone bug.

4
  • This might help you out. Commented Jan 1, 2016 at 16:22
  • 1
    Thank you, this fully answers my question. If you repost it as an answer, I'll accept it at once.
    – Joachim W
    Commented Jan 1, 2016 at 16:25
  • No problem, glad I could help. :) Commented Jan 1, 2016 at 16:30
  • FWIW, I think this question is a duplicate, but I don't have time to search for it.
    – Drew
    Commented Jan 4, 2016 at 6:32

1 Answer 1

4

What you're looking for is the region face. Put this in your .emacs file and change #666 to any color you want:

(set-face-attribute 'region nil :background "#666")

You could also then change the font color to make it more readable. E.g. to white

(set-face-attribute 'region nil :background "#666" :foreground "#ffffff")

Sources: This Question answered by tungd and Philippe.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.