Emacs
From DesigningPatterns
Contents |
Customization
General
There is a file called site_start.el which is loaded automatically by emacs at start-up (before the user's .emacs file). This file essentially loads up all .el files in site_start.d. In-house site-wide emacs customization will be put into /usr/designingpatterns/etc/default_emacs_settings.el and symbolic linked into site_start.d (symbolic linked to /usr/share/emacs/site-lisp/site-start.d/default_emacs_settings.el on CentOS).
emacs' default font may be unavailable or unsuitable. In this case, adding emacs.font: 8x13 to /usr/share/X11/app-defaults/Emacs probably will fix the issue.
Installation
yum install emacs
Configuration
Emacs' default font (and other X attributes) can be configured in /usr/share/X11/app-defaults/Emacs.
All of this should be in /usr/designingpatterns/etc/default_emacs_settings.el:
- Install
ruby-modewithyum install ruby-mode. - Install
nxml-mode(yum install emacs-nxml-mode); load upnxml-modeindefault_emacs_settings.elas per theREADME. - Install
nxhtml-mode(for html, jsp, rhtml, etc), which can be found here. Follow the instructions inreadme.txt. Note that this will not work if acss-modeis installed already. Note also that this package requiresnxml. - Install
javascript-mode(javascript.el, which can be found here) into/usr/share/emacs/site-lisp. This has the necessarydefault_emacs_settings.ellisp code snippet. - Install
haml-mode(found here); load up indefault_emacs_settings.elsimilarly to the javascript mode (for.hamlfiles). - Install
sass-mode(found here); load up indefault_emacs_settings.elsimilarly to the javascript mode (for.sassfiles). - Install
yaml-mode(found here); load up indefault_emacs_settings.elsimilarly to the javascript mode (for.ymland.yamlfiles). If using version 0.0.3, line 228 inyaml-mode.elmust be commented out beforemake install(and the file is compiled intoyaml-mode.elc), because there is a bug in the mode with font locking that can cause infinite loops. - Associate Ruby mode with
.rcfgfiles. - Install
slime-mode(for lisp; found here). The slime code directory should be moved into thesite-lispdirectory; the slime README file has the necessary elisp fordefault_emacs_settings.el. - Install java annotations support for
java-mode. This needs to be copied/pasted manually from the download location for now, as wget gets HTML (rather than text). Add the following todefault_emacs_settings.elin order to load it withjava-mode:
;; Make java mode support Java 1.5 annotations. (require 'java-mode-indent-annotations) (add-hook 'java-mode-hook 'java-mode-indent-annotations-setup)
