;; define esc-g as a shortcut for goto-line (define-key global-map "\M-g" 'goto-line) ;; Do not change ownership when editing files owned by other people (custom-set-variables '(backup-by-copying-when-mismatch t)) ;; Syntax highlighting ;; Unfortunately emacs and xemacs require different commands for this ;; Comment/Restore one of the two commands below ;; Syntax highlighting for *emacs* (global-font-lock-mode t) ;; Syntax highlighting for *xemacs* ;; (font-lock-mode 1) ;; load matlab.el which provides a MATLAB mode for emacs (load-file "~/matlab.el") (setq matlab-indent-function t) (setq matlab-indent-level 4) (setq auto-mode-alist (cons '("\\.m\\'" . matlab-mode) auto-mode-alist)) (autoload 'matlab-mode "matlab" "Enter Matlab mode." t) (autoload 'matlab-shell "matlab" "Interactive Matlab mode." t) ;; User Level customizations (You need not use them all): (setq matlab-verify-on-save-flag nil) ; turn off auto-verify on save (defun my-matlab-mode-hook () (setq fill-column 76)) ; where auto-fill should wrap (add-hook 'matlab-mode-hook 'my-matlab-mode-hook) (defun my-matlab-shell-mode-hook () '()) (add-hook 'matlab-shell-mode-hook 'my-matlab-shell-mode-hook) (custom-set-faces)