1;;==============================================================> 2;; CoCoA5-Emacs CUSTOMIZATION: 3;;==============================================================> 4;; probably you do not need to change any of these: 5 6;; Turn off auto-saving of abbrev table (of ALL abbrev tables!) 7(setq save-abbrevs nil) 8 9;; PATH for the "cocoa5.el" file 10(setq load-path (cons cocoa5-emacs-dir load-path)) 11 12;; PATH for the "cocoa5" start-up script file 13(setq cocoa5-executable (concat cocoa5-emacs-dir "../cocoa5")) 14 15;; FOR WINDOWS set these two lines: 16; (setq cocoa5-executable (concat cocoa5-emacs-dir "../CoCoAInterpreter.exe")) 17; (setq cocoa5-packages (concat cocoa5-emacs-dir "../packages")) 18 19;; Try to improve slow performance on Microsoft windows. 20;; (hopefully this is unharmful on non-Microsoft platforms) 21(setq w32-get-true-file-attributes nil) 22 23 24;; PATH for the file containing the function names (to use dabbrev) 25(setq cocoa5-wordlist-default-file (concat cocoa5-emacs-dir "../CoCoAManual/wordlist.txt")) 26 27;; PATH of the directory where you usually save your CoCoA files: 28(setq cocoa5-dir "~/CoCoA/") 29 30;; DEFAULT PROMPT IN EMACS 31(setq cocoa5-default-prompt "/**/") 32;(setq cocoa5-default-prompt "/* */") ;; FOR MICROSOFT WINDOWS 33 34 35;; The following is useful if you use side-by-side mode: 36(setq truncate-partial-width-windows 40) 37 38;;==============================================================> 39 40;; ------------------------------------------------------------ 41;; AUTO-LOAD cocoa5.el for running CoCoA5 and cocoa5-mode for files 42;; with CoCoA5 extensions 43(autoload 'c5 "cocoa5.el" "CoCoA5 running mode" 't) 44(autoload 'cpkg5 "cocoa5.el" "CoCoA5 running mode" 't) 45(autoload 'cocoa5 "cocoa5.el" "CoCoA5 running mode" 't) 46(autoload 'cocoa5server "cocoa5.el" "CoCoA5 running mode" 't) 47(autoload 'cocoa5-mode "cocoa5.el" "CoCoA5 editing mode" 't) 48 49(setq auto-mode-alist (append auto-mode-alist '( 50 ("\\.\\(cpkg5\\|cocoa5\\|cocoa5rc\\|c5\\)\\'" . cocoa5-mode) ))) 51 52;; ------------------------------------------------------------ 53;; AUTO-LOAD wordlist when running CoCoA5 or using cocoa5-mode 54(setq cocoa5-auto-load-wordlist 't) 55 56;; ------------------------------------------------------------ 57;; AUTOMATIC CAPITALIZATION of CoCoA5 keywords: 58;; (add-hook 'cocoa5-mode-hook '(lambda () (abbrev-mode 't))) 59 60;; ------------------------------------------------------------ 61;; ------ OTHER USEFUL SETTINGS ------ 62;; ------------------------------------------------------------ 63 64;; ------------------------------------------------------------ 65;; AUTO-LOAD CUA-mode (COPY & PASTE with C-c C-x C-v C-z keys) 66;; This is inactive by default! 67;; To activate it uncomment these two lines (remove ";") 68;(require 'cua) 69;(CUA-mode 't) 70 71;; ------------------------------------------------------------ 72;; TAB FOR COMPLETION 73;; *customize* with menu "CoCoA5 --> Preferences" 74;; [ same as "<ESC>-x customize-group <RET> cocoa5" 75;; sets (defvar cocoa-tab-is-completion nil) ] 76;; *or* uncomment the following line 77;(defvar cocoa5-tab-is-completion 't) 78 79;; ------------------------------------------------------------ 80;; OPEN RECENT: 81(require 'recentf) 82(setq recentf-auto-cleanup 'never) ;; disable before we start recentf! 83(recentf-mode 1) 84(setq recentf-max-menu-items 25) 85 86;; ------------------------------------------------------------ 87;; HIGHLIGHT SELECTED REGION 88(transient-mark-mode 't) 89 90;; ------------------------------------------------------------ 91;; HIGHLIGHT REGION BETWEEN PARENTHESIS 92(require 'paren) 93(show-paren-mode 't) 94(setq show-paren-style 'expression) 95 96;; ------------------------------------------------------------ 97;; WORD COMPLETION: 98;; dynamic abbrev expansion (M-/) replace also CASE PATTERN 99(setq dabbrev-case-replace nil) 100 101;; ------------------------------------------------------------ 102;; COLOURED SYNTAX (font-lock-mode) 103(require 'font-lock) 104 105(if window-system 106 (if (string-match "XEmacs" (emacs-version)) 107 (font-lock-mode 't) 108 (global-font-lock-mode 't) ) 109 nil) 110 111;; but if you want font-lock-mode ONLY in cocoa5-mode 112;; or if you use XEmacs, you might have to choose these instead: 113;(if window-system (font-lock-mode 't) nil) 114;(add-hook 'cocoa5-mode-hook '(lambda () (font-lock-mode 't))) 115 116;; ------------------------------------------------------------ 117;; ENABLE MOUSE WHEEL 118(setq mouse-wheel-mode 't) 119 120;; ------------------------------------------------------------ 121;; PREVENT EXTRANEOUS TABS 122(setq indent-tabs-mode 0) 123 124;; ------------------------------------------------------------ 125;; DISCARD ALL ctrl-m CHARACTERS FROM SHELL OUTPUT 126(add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m) 127 128;; ------------------------------------------------------------ 129;; MY PREFERRED SET OF COLOURS ;-) 130(if window-system 131 (progn 132 (set-face-foreground font-lock-comment-face "red3" ) 133 (set-face-foreground font-lock-keyword-face "SteelBlue4" ) 134 (set-face-foreground font-lock-string-face "green4" ) 135 (set-face-foreground font-lock-constant-face "Orange3" ) 136 (set-face-foreground font-lock-function-name-face "Blue" ) 137 (set-face-foreground font-lock-reference-face "Sienna" ) 138 (set-face-foreground font-lock-type-face "Orchid3" ) 139 ) 140 nil 141 ) 142 143;; ------------------------------------------------------------ 144