| 59 | | You can configure Emacs to your hearts content by editing your own |
| 60 | | version of the Emacs configuration file ~/.emacs (a default .emacs file |
| 61 | | can be copied from /public/Default_Scripts/.emacs, which contains the |
| 62 | | following lines and some additional features that may be useful) e.g. for |
| 63 | | editing text of a specific type that emacs knows about, such as fortran, |
| 64 | | tex, c or idl script code, you should switch to the appropriate major mode |
| 65 | | so that coloured text can be used to highlight different sections of text, |
| 66 | | add the following lines to this file: |
| 67 | | {{{ |
| 68 | | (setq font-lock-face-attributes |
| 69 | | '((font-lock-comment-face "SeaGreen" nil nil t nil nil) |
| 70 | | (font-lock-variable-name-face "blue") |
| 71 | | (font-lock-string-face "red") |
| 72 | | (font-lock-function-name-face "Magenta") |
| 73 | | (font-lock-keyword-face "blue") |
| 74 | | (font-lock-type-face "MediumOrchid") |
| 75 | | (font-lock-reference-face "orchid"))) |
| 76 | | (setq emacs-lisp-mode-hook 'turn-on-font-lock) |
| 77 | | (setq latex-mode-hook 'turn-on-font-lock) |
| 78 | | (setq tex-mode-hook 'turn-on-font-lock) |
| 79 | | (setq fortran-mode-hook 'turn-on-font-lock) |
| 80 | | (setq info-mode-hook 'turn-on-font-lock) |
| 81 | | (setq dired-mode-hook 'turn-on-font-lock) |
| 82 | | }}} |
| 83 | | For IDL scripts (.pro files) you can similar obtain coloured text and recognise IDL syntax by adding the lines: |
| 84 | | {{{ |
| 85 | | (autoload 'idlwave-mode "idlwave" "IDLWAVE Mode" t) |
| 86 | | (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) |
| 87 | | (setq auto-mode-alist |
| 88 | | (cons '("\\.pro\\'" . idlwave-mode) auto-mode-alist)) |
| 89 | | (setq idlwave-help-directory "/usr/local/etc") |
| 90 | | (add-hook 'idlwave-mode-hook 'turn-on-font-lock) |
| 91 | | }}} |
| 92 | | |