File: octave.el

package info (click to toggle)
octave 2.0.13-4
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 23,828 kB
  • ctags: 13,172
  • sloc: cpp: 66,241; fortran: 37,245; ansic: 26,548; sh: 7,269; makefile: 3,808; lex: 1,943; yacc: 1,844; perl: 1,676; lisp: 1,662; exp: 123
file content (34 lines) | stat: -rw-r--r-- 1,278 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
;; -*-emacs-lisp-*-
;;
;; Emacs startup file for the Debian GNU/Linux octave package
;;
;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
;; Modified by Dirk Eddelbuettel <edd@debian.org>

;; The Octave package follows the Debian/GNU Linux 'emacsen' policy and 
;; byte-compiles its elisp files for each 'emacs flavour' ({,x}emacs{19,20}).
;; The compiled code is then installed in a subdirectory of the of the 
;; respective site-lisp directory. We have to add this back to the load-path:
(setq load-path (nconc load-path (list (concat "/usr/share/" 
					       (symbol-name flavor) 
					       "/site-lisp/octave"))))

;; The Octave mode calls this file
(autoload 'octave-mode "octave-mod" nil t)

(setq auto-mode-alist (cons '("\\.m$" . octave-mode) auto-mode-alist))
(add-hook 'octave-mode-hook
          (lambda ()
            (abbrev-mode 1)
            (auto-fill-mode 1)
            (if (eq window-system 'x)
		(font-lock-mode 1))))

(autoload 'run-octave "octave-inf" nil t)
(add-hook 'inferior-octave-mode-hook
          (lambda ()
            (turn-on-font-lock)
            (define-key inferior-octave-mode-map [up]
              'comint-previous-input)
            (define-key inferior-octave-mode-map [down]
              'comint-next-input)))