1 | ;;; |
---|
2 | ;;; .emacs - sample .emacs file to use for Singular interactive mode. |
---|
3 | ;;; |
---|
4 | |
---|
5 | ;;; |
---|
6 | ;;; - extra key bindings. |
---|
7 | ;;; |
---|
8 | (add-hook 'singular-interactive-mode-hook |
---|
9 | (function (lambda () |
---|
10 | ;; control cursor keys |
---|
11 | (cond |
---|
12 | ;; Emacs |
---|
13 | ((eq singular-emacs-flavor 'emacs) |
---|
14 | (local-set-key [C-prior] 'singular-scroll-right) |
---|
15 | (local-set-key [C-next] 'singular-scroll-left) |
---|
16 | (local-set-key [C-up] 'comint-previous-prompt) |
---|
17 | (local-set-key [C-down] 'comint-next-prompt)) |
---|
18 | ;; XEmacs |
---|
19 | (t |
---|
20 | (local-set-key [(control prior)] 'singular-scroll-right) |
---|
21 | (local-set-key [(control next)] 'singular-scroll-left) |
---|
22 | (local-set-key [(control up)] 'comint-previous-prompt) |
---|
23 | (local-set-key [(control down)] 'comint-next-prompt)))))) |
---|
24 | |
---|
25 | ;;; |
---|
26 | ;;; - other, "non-customizable" settings. |
---|
27 | ;;; |
---|
28 | |
---|
29 | ;; maybe we should make this a customizable variable? |
---|
30 | (add-hook 'singular-interactive-mode-hook |
---|
31 | (function (lambda () (font-lock-mode 1)))) |
---|
32 | |
---|
33 | ;;; |
---|
34 | ;;; - customizing stuff. |
---|
35 | ;;; |
---|
36 | |
---|
37 | ;; this is a work-around for early version of Font Lock mode |
---|
38 | ;; which do not use `defface' to define faces. It forces |
---|
39 | ;; `custom-set-faces' to define the faces immediately. |
---|
40 | (make-face 'font-lock-comment-face) |
---|
41 | (make-face 'font-lock-string-face) |
---|
42 | |
---|
43 | (custom-set-variables |
---|
44 | '(custom-file "~/work/elisp/singular/.emacs") |
---|
45 | '(font-lock-maximum-decoration nil t) |
---|
46 | '(next-line-add-newlines nil) |
---|
47 | '(paren-mode (quote paren) nil (paren)) |
---|
48 | '(show-paren-mode t nil (paren)) |
---|
49 | '(singular-cursor-keys (quote (cursor))) |
---|
50 | '(singular-history-keys (quote (control meta))) |
---|
51 | '(transient-mark-mode t)) |
---|
52 | (custom-set-faces |
---|
53 | '(font-lock-comment-face ((t (:bold nil :foreground "Grey50"))) t) |
---|
54 | '(font-lock-string-face ((((class color) (background light)) (:foreground "Blue")) (((class color) (background dark)) (:foreground "LightSkyBlue"))) t) |
---|
55 | '(paren-match ((t (:foreground "Red"))) t) |
---|
56 | '(show-paren-match-face ((((class color)) (:foreground "Red"))))) |
---|
57 | |
---|
58 | ;;; |
---|
59 | ;;; - load and start Singular interactive mode. |
---|
60 | ;;; |
---|
61 | (load-file "~/work/elisp/singular/singular.el") |
---|
62 | (singular) |
---|