0

I want to use the syntax highlighting that you get when running emacs -Q. If I run emacs -q, or run Emacs with no ~/.emacs file existent, or not load any custom theme, I get a dark-backgrounded color theme. I also tried altering my init file, but to no avail. Disabling a custom theme also leads to the dark theme aforementioned.

How can I get the font-lock colors default in emacs -Q?

1
  • 2
    The difference between -q and -Q is that site-start files are loaded. Start by checking if there is something in the system setup that cause your problems. Sep 28, 2017 at 13:57

1 Answer 1

1

C-hig (emacs)Initial Options tells us:

‘-Q’
‘--quick’
     Start emacs with minimum customizations.  This is similar to using
     ‘-q’, ‘--no-site-file’, ‘--no-site-lisp’, and ‘--no-splash’
     together.  This also stops Emacs from processing X resources by
     setting ‘inhibit-x-resources’ to ‘t’ (*note Resources::).

Hence the difference you're seeing between using -q and -Q is going to be on account of one (or more) of:

  • --no-site-file
  • --no-site-lisp
  • setting inhibit-x-resources to t

You can check the first two by running: emacs -q --no-site-file --no-site-lisp

‘--no-site-file’
     Do not load ‘site-start.el’ (*note Init File::).  The ‘-Q’ option
     does this too, but other options like ‘-q’ do not.

‘--no-site-lisp’
     Do not include the ‘site-lisp’ directories in ‘load-path’ (*note
     Init File::).  The ‘-Q’ option does this too.

I would be more suspicious of the X resources, though. If it's that, you may just be able to add (setq inhibit-x-resources t) in your init file, but my tests for that were not successful, so YMMV.

See also:

1
  • This is it. I checked '--no-site-file' and '--no-site-lisp' options separately, but I never really suspected Xresources because setting the variable didn't work, so I thought Xresources wasn't really relevant. Also some of the colors were different from those set in Xresources.Thanks.
    – reza
    Sep 28, 2017 at 14:41

Your Answer

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

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