================================================= Installation instructions for the Ampl major mode Version for Emacs 20+ ================================================= D. Orban orban@ece.northwestern.edu ================================================= Uncompress the file ampl-mode20.tar.gz in the directory of your choice. It should contain the files ampl-mode20.el install20 You are currently viewing the file install20. To fix the ideas, let us assume that you uncompressed the archive in the directory /home/yourhome. Open the file ampl-mode20.el in Emacs and say [ALT] X (keep the [ALT] key pressed down and press X). Then, in the mini-buffer, type "byte-compile-file" and press Return. If Emacs asks you for a filename, type "ampl-mode20.el". This should create a file called ampl-mode20.elc in the same directory. Open your Emacs configuration file. It is usually called .emacs, .gnu-emacs, .gnu-emacs-custom, or similar, and is usually located in your home directory. Paste the following (setq load-path (cons "/home/you" load-path)) ;; Ampl mode (setq auto-mode-alist (cons '("\\.mod$" . ampl-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.dat$" . ampl-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.ampl$" . ampl-mode) auto-mode-alist)) (setq interpreter-mode-alist (cons '("ampl" . ampl-mode) interpreter-mode-alist)) (autoload 'ampl-mode "ampl-mode20" "Ampl editing mode." t) Now exit Emacs, and restart it. You should have access to syntax highlighting and basic indentation when opening Ampl models and data files whose name ends in .mod, .dat or .ampl. Enjoy. ================================================= Dominique March 25th, 2003 =================================================