Xemacs Custom Syntax Highlighting

326 Views Asked by At

I have some .el files that my professor had created for a VM Linux machine that he gave us. I have just installed Linux on an older laptop and I installed XEmacs on it. However I'm having trouble with XEmacs using the .el files. It won't add any highlighting, tab width of 4 or anything.

I put all the .el files in .xemacs/ directory.

Does anyone know what I'm doing wrong?

I'll also include the code from the .el files so you can all see it.

As far as my OS I'm running 64-bit Fedora 18. Spherical Cow. MOOOOOOOOOOOOOOOOOOOO!!!

Thanks for the help everyone!

init.el file:

;; Turn on line and column numbers
(line-number-mode 1)
(column-number-mode 1)
;;-----------------------------------------------------------------------------
;; Python
;;-----------------------------------------------------------------------------
(add-hook 'python-mode-hook 'turn-on-font-lock t)
;;-----------------------------------------------------------------------------
;; C/C++
;;-----------------------------------------------------------------------------
(setq auto-mode-alist (cons '("\\.C\\'" . c++-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.h\\'" . c++-mode) auto-mode-alist))
(add-hook 'c-mode-hook 'turn-on-font-lock t)
(add-hook 'c++-mode-hook 'turn-on-font-lock t)
(setq c-default-style "bsd"
  c-basic-offset 4)

(defun my-c++-mode-hook ()

;;switch/case:  make each case line indent from switch
  (c-set-offset 'case-label '+)

;; Automatically indent after a newline (like vi)
(local-set-key '[(return)] 'newline-and-indent)

;; Tab sanity: match the C indent, but don't insert new tabs (use spaces)
  (setq tab-width 4)
  (setq indent-tabs-mode nil))

(add-hook 'c++-mode-hook 'my-c++-mode-hook)

;;-----------------------------------------------------------------------------
;; LaTeX
;;-----------------------------------------------------------------------------
;;(setq auto-mode-alist (append '(("\\.tex$"  . LaTeX-mode)) auto-mode-alist))
;;(require 'tex-site)
;;(add-hook 'LaTeX-mode-hook
;;  '(lambda()
;;     (load-file "~/.xemacs/my-latex.el")  ; load these LaTeX preferences
;;     ))

;;-----------------------------------------------------------------------------
;; Abbreviations
;;-----------------------------------------------------------------------------
;;(setq-default abbrev-mode t)
;;(setq save-abbrevs t)
;;(setq abbrev-file-name "~/.xemacs/my-abbreviations.el"
;;(if (file-readable-p abbrev-file-name)
;;  (read-abbrev-file abbrev-file-name)
;;  )

custom.el file:

(custom-set-variables)
(custom-set-faces)

(setq minibuffer-max-depth nil)

my-abbreviations.el file:

(define-abbrev-table 'text-mode-abbrev-table '(
  ("\\a" "\\alpha" nil 0)
 )
)
0

There are 0 best solutions below