Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 788789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:25:23+00:00 2026-05-14T21:25:23+00:00

I am using emacs on MacOS 10.6 with Terminal. I have a white background.

  • 0

I am using emacs on MacOS 10.6 with Terminal. I have a white background.

It’s very hard to read quoted C++ strings. They are coming up in pale green. Keywords are in turquoise.

After searching through the source I cam across cpp.el and have determined that I am using the cpp-face-light-name-list instead of cpp-face-dark-name-list.

Apparently this function is supposed to chose the correct list based on the background color:

(defcustom cpp-face-default-list nil
  "Alist of faces you can choose from for cpp conditionals.                                                           
Each element has the form (STRING . FACE), where STRING                                                               
serves as a name (for `cpp-highlight-buffer' only)                                                                    
and FACE is either a face (a symbol)                                                                                  
or a cons cell (background-color . COLOR)."
  :type '(repeat (cons string (choice face (cons (const background-color) string))))
  :group 'cpp)

But it doesn’t seem to be working.

What should I put in my .emacs file so that I get the cpp-face-dark-list instead of cpp-face-light-list?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T21:25:23+00:00Added an answer on May 14, 2026 at 9:25 pm

    I have the same problem, my chosen themes are always unreadable on the terminal. The answer is to use the color-theme package, as others have said, then select one theme for Emacs in a terminal, and another theme for Emacs running in its own window, just like this:

    (require 'color-theme)
    (setq color-theme-is-global t)
    (if window-system
        (color-theme-deep-blue)   ;; Emacs in own window
        (color-theme-dark-laptop) ;; Emacs in tty
    )
    

    In Emacs, you can type M-x color-theme-Tab to get a list of available themes. Equally, you could add hooks for major modes to change the color-theme depending on what sort of code you are editing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When using the terminal in emacs (M-x term) under MacOS for some reason it
I'm using emacs in terminal under OSX Lion, and for some reason I can't
I have started using emacs org-mode recently to maintain my TODO lists. I have
I have just started using Emacs for the specific purpose of editing latex documents.
I am using emacs I find that sometimes I have 2 files separated into
Using Emacs/Magit, I had first a very smooth git experience in another project, but
I am using emacs 22.2.1 and Ubuntu 9.04 I have done this in my
I'm using emacs 24 on OS X and have the strange problem that I'm
I'm using emacs for python, and I'd like to have a nice useable shell
I am using Mac OS and emacs -nw (the terminal mode). I don't know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.