File: aplus-fsf-el.emacsen-startup

package info (click to toggle)
aplus-fsf 4.22.1-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 22,432 kB
  • ctags: 32,381
  • sloc: cpp: 176,659; ansic: 27,018; sh: 12,139; makefile: 2,601; lisp: 2,151
file content (35 lines) | stat: -rw-r--r-- 1,357 bytes parent folder | download | duplicates (11)
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
35
;; 
;; /etc/xemacs21/site-start.d/50aplus-fsf-el.el
;;
;; Copyright (C) 2002, Neil Roeth <neil@debian.org>

(let ((aplus-fsf-el-pkgdir (concat "/usr/share/"
				   (symbol-name debian-emacs-flavor)
				   "/site-lisp/aplus-fsf-el")))
 (if (file-exists-p aplus-fsf-el-pkgdir)
     (progn
       (debian-pkg-add-load-path-item aplus-fsf-el-pkgdir)

       ;; Following to override setting in aplus.el since load-path is
       ;; properly set here on Debian systems
       (defvar aplus-set-load-path nil)

       ;; Pressing F4 will load A+ then start A+ in a new process buffer.
       (autoload 'a-other-window "aplus"
	 "Start A+ interpreter in an A+ process buffer")
       (define-key global-map [f4] `a-other-window)

       ;; Loading an A+ file will load A+.
       (autoload 'a-minor-mode "aplus"
	 "Minor mode for editing A+ code." t)
       (defun change-assoc (key value alist)
	 "usage: (change-assoc KEY VALUE ALIST)
If ALIST contains KEY then replace the associated value with VALUE.
Otherwise, associate KEY and VALUE in the alist"
	 (let ((tuple (assoc key alist)))
	   (cond (tuple (setcdr tuple value))
		 (t (nconc alist (list (cons key value)))))))
       (change-assoc "\\.apl$" 'a-minor-mode auto-mode-alist)
       (change-assoc "\\.a$" 'a-minor-mode auto-mode-alist)
       (change-assoc "\\.\\+$" 'a-minor-mode auto-mode-alist)
)))