File: prcs-minor.el

package info (click to toggle)
prcs 1.2.11-7
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,748 kB
  • ctags: 3,097
  • sloc: cpp: 16,675; ansic: 5,725; sh: 4,887; lisp: 1,449; lex: 344; perl: 131; makefile: 131; pascal: 85
file content (31 lines) | stat: -rw-r--r-- 839 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
;; PRCS minor mode
;; Notify Norbert Warmuth <k3190@fh-sw.de>

(defvar prcs-mode nil "The PRCS minor mode.")

(defvar prcs-mode-map
  (let ((map (make-sparse-keymap)))
    (define-key map "\C-c\C-c" 'prcs::prcs-checkin)
    map)
  "Keymap for `prcs-mode'.")

(make-variable-buffer-local 'prcs-minor-mode)

(or (assq 'prcs-mode minor-mode-alist)
    (setq minor-mode-alist
	  (cons '(prcs-mode " PRCS") minor-mode-alist)))

(or (assq 'prcs-mode minor-mode-map-alist)
    (setq minor-mode-map-alist (cons (cons 'prcs-mode
					   prcs-mode-map)
				     minor-mode-map-alist)))

(defun prcs-mode (&optional arg)
  "Toggle PRCS mode: C-c C-c runs 'prcs checkin'"
  (interactive "P")
  (if (setq prcs-mode
	    (if (null arg) (not prcs-mode)
	      (> (prefix-numeric-value arg) 0)))
      (run-hooks 'prcs-mode-hook)))

(provide 'prcs-minor)