Changeset 48d74cb in git
- Timestamp:
- Aug 31, 1999, 8:53:53 PM (24 years ago)
- Branches:
- (u'spielwiese', 'd1ba061a762c62d3a25159d8da8b6e17332291fa')
- Children:
- 26ceba03e259fe48e4f20d862f2f20832f8fa15e
- Parents:
- 74b737b98e8bdde0708dcdbbc6482ade34184189
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emacs/.emacs-singular
r74b737 r48d74cb 1 ;;; Emacs edit mode for this file is -*- Emacs-Lisp -*- 2 ;;; $Id: .emacs-singular,v 1.2 1999-08-31 18:53:53 wichmann Exp $ 3 1 4 ;;; 2 ;;; .emacs - sample .emacs file to use for Singular interactive mode. 5 ;;; .emacs-singular - Emacs initialization file to use for 6 ;;; Singular interactive mode. 7 ;;; 8 ;;; How you use this file very much depends on your attitude 9 ;;; towards Emacs: 10 ;;; 11 ;;; 1) If you are going to use Emacs solely as frontend to 12 ;;; Singular you do not have to worry at all about this file. 13 ;;; 2) If you are already an experienced Emacs user you may 14 ;;; want to copy this file's contents to your .emacs file. 15 ;;; 3) If you are planning to become an experienced Emacs user 16 ;;; you may use this file as starting point for your .emacs 17 ;;; file, that is, for your Emacs initialization file. Simply 18 ;;; copy it to your home directory and rename it to ".emacs" 19 ;;; (without the quotes, of course). Then edit it as 20 ;;; described below. 21 ;;; 22 ;;; In cases 2) and 3) you should be careful what exactly to copy 23 ;;; to your .emacs file. In general, you need the following: 24 ;;; 25 ;;; o the hook-customizations with `add-hook'; 26 ;;; o the pre-customized settings with `custom-set-variables' and 27 ;;; `custom-set-faces'; 28 ;;; o the code which creates menus for starting Singular; 29 ;;; o the code which loads singular.el (located at the end of 30 ;;; this file) you have to replace by something else, for 31 ;;; example, an `autoload'. 32 ;;; 33 ;;; Here is how the Singular customization in your .emacs may 34 ;;; look like: 35 ;;; 36 ;;; ;; extra key bindings 37 ;;; (add-hook 'singular-interactive-mode-hook 38 ;;; <... code omitted, see below for details ...>) 39 ;;; 40 ;;; ;; other, "non-customizable" settings 41 ;;; (add-hook 'singular-interactive-mode-hook 42 ;;; <... code omitted, see below for details ...>) 43 ;;; 44 ;;; ;; pre-customized settings 45 ;;; (custom-set-variables 46 ;;; <... code omitted, see below for details ...>) 47 ;;; (custom-set-faces 48 ;;; <... code omitted, see below for details ...>) 49 ;;; 50 ;;; ;; add global menus for Singular 51 ;;; <... choose your version for either Emacs or XEmacs, see below ...> 52 ;;; 53 ;;; ;; add Singular Emacs home directory to `load-path' 54 ;;; (setq load-path (cons "<your-singular-emacs-home-directory>" load-path)) 55 ;;; (autoload 'singular "singular" 56 ;;; "Start Singular using default values." t) 57 ;;; (autoload 'singular-other "singular" 58 ;;; "Ask for arguments and start Singular." t) 3 59 ;;; 4 60 5 ;;; 6 ;;; - extra key bindings. 7 ;;; 61 ;; extra key bindings 8 62 (add-hook 'singular-interactive-mode-hook 9 63 (function (lambda () … … 23 77 (local-set-key [(control down)] 'comint-next-prompt)))))) 24 78 25 ;;; 26 ;;; - other, "non-customizable" settings. 27 ;;; 28 29 ;; maybe we should make this a customizable variable? 79 ;; other, "non-customizable" settings 30 80 (add-hook 'singular-interactive-mode-hook 31 81 (function (lambda () (font-lock-mode 1)))) 32 33 ;;;34 ;;; - customizing stuff.35 ;;;36 82 37 83 ;; this is a work-around for early version of Font Lock mode … … 41 87 (make-face 'font-lock-string-face) 42 88 89 ;; tricky stuff: these customization settings are not used any 90 ;; longer as soon as user saved her own to ~/.emacs-singular-cust 91 (setq custom-file "~/.emacs-singular-cust") 92 (if (file-exists-p custom-file) 93 (load-file custom-file) 94 95 ;; pre-customized settings 43 96 (custom-set-variables 44 '(custom-file "~/work/elisp/singular/.emacs")45 97 '(font-lock-maximum-decoration nil t) 46 98 '(next-line-add-newlines nil) 47 99 '(paren-mode (quote paren) nil (paren)) 48 100 '(show-paren-mode t nil (paren)) 49 '(singular-cursor-keys (quote (cursor))) 50 '(singular-history-keys (quote (control meta))) 101 '(singular-help-same-window t) 51 102 '(transient-mark-mode t)) 52 103 (custom-set-faces … … 56 107 '(show-paren-match-face ((((class color)) (:foreground "Red"))))) 57 108 109 ) 110 111 ;; add global menus for Singular, Emacs version 112 (unless (fboundp 'add-submenu) 113 (setq singular-start-map (make-sparse-keymap)) 114 (define-key singular-start-map [menu-bar singular] 115 (cons "Singular" (make-sparse-keymap "Singular"))) 116 (define-key singular-start-map [menu-bar singular restart] 117 '("Start..." . singular-other)) 118 (define-key singular-start-map [menu-bar singular start-default] 119 '("Start default" . singular)) 120 (setq menu-bar-final-item (append '(singular) menu-bar-final-items)) 121 (use-local-map singular-start-map)) 122 123 ;; add global menus for Singular, XEmacs version 124 (if (fboundp 'add-submenu) 125 (add-submenu nil 126 '("Singular" 127 ["Start default" singular t] 128 ["Start..." singular-other t]))) 129 58 130 ;;; 59 ;;; - load and start Singular interactive mode.131 ;;; - load singular.el. 60 132 ;;; 61 (load-file "~/work/elisp/singular/singular.el") 62 (singular) 133 134 ;; get rid of superfluous "Load .emacs" menu entry on XEmacs 135 (when (fboundp 'delete-menu-item) 136 (delete-menu-item '("Load .emacs")) ; that is for the current buffer 137 (let ((current-menubar (default-value 'current-menubar))) 138 (delete-menu-item '("Load .emacs")) ; that is for all other buffers 139 (set-default 'current-menubar current-menubar))) 140 141 ;; load singular.el from `singular-emacs-home-directory' 142 (load-file (concat singular-emacs-home-directory 143 ;; we check for trailing slash and backslash 144 ;; but unconditionally insert a slash. 145 ;; Hopefully that works on NT, too. 146 (if (memq (aref singular-emacs-home-directory 147 (1- (length singular-emacs-home-directory))) 148 '(?/ ?\\)) 149 "" "/") 150 "singular.el"))
Note: See TracChangeset
for help on using the changeset viewer.