LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   xemacs syntax highlighting only works on string literals! (Slackware) (https://www.linuxquestions.org/questions/linux-software-2/xemacs-syntax-highlighting-only-works-on-string-literals-slackware-601259/)

turbo_spool 11-20-2007 07:17 PM

xemacs syntax highlighting only works on string literals! (Slackware)
 
Hello all,

Now this is quite a strange problem, and I have only ever ran into with my Slackware installation. After a fresh Slackware install, I downloaded the xemacs packgage from LinuxPackages and it seemed to install fine. The next thing I did was copy my custom.el file from my openSUSE installation to my Slackware directory.

The problem is, when I load up a file, say a c source file, and then enable font-lock-mode only the string literals are highlighted. I know the custom.el file is good because it is the one I used at work, however, with this particular version of Slackware (latest from the site) only strings get highlighted. Normally all my keywords and variables and what not would have their specified color, however all I see is white text on a black background (thats from my config at least) with quoted strings highlighted in green. To be as clear as possible, using my custom.el which I know works, with syntax highlighting enabled my background and foreground turn black and white respectively and any quoted strings turn green. However, my #include's are not highlighted, my for loops are not and so on...

Now I tried reinstalling both Slackware and xemacs. I even used older versions of xemacs for the hell of it. This is really strange because, if it is the same custom.el file, I don't know why any version of xemacs I install under Slackware has this issue.

Please help me stop scratching my head.

Thanks!

bigrigdriver 11-20-2007 09:05 PM

Take a look at ~/.xemacs/init.el. Look for this:
Quote:

;; Load custom file
;; ----------------
(setq custom-file "~/.xemacs/custom.el")
(load "~/.xemacs/custom.el" t t)
I don't know if it's in there by default. If it isn't, you need to add it to be able to use your custom.el.

turbo_spool 11-20-2007 09:17 PM

First off, I appreciate the quick reply.

However, that didn't seem to do it. When I went to edit my init.el file it was completely empty, so I added the lines you posed and saved it with no luck.

Still, with a C++ source file loaded, only quoted strings get highlighted. Quite a strange issue. And it seems to be reading the custom.el properly anyway, because I went to "Edit Faces" and all the colors selected were the ones specified in my custom.el file.

turbo_spool 11-22-2007 10:25 AM

Anyone? Even the emacs gurus at work were stumped on this one. I really don't want to switch editors just while using Slackware.


All times are GMT -5. The time now is 04:39 AM.