;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; general setup:
(put 'eval-expression 'disabled nil)

(setq auto-mode-alist (cons '("\\.psw$" . c-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.m$" . c-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.pswm$" . c-mode) auto-mode-alist))

(defun beginning-of-buffer (&optional arg)
  "Move point to the beginning of the buffer; leave mark at previous position.
With arg N, put point on line N."
  (interactive "p")
  (push-mark)
  (goto-line arg)
  )

(global-set-key "\M-r" 'replace-string)

(defun next-line-no-mod (arg)
  "Like next-line but does not add lines at eof."
  (interactive "p")
  (setq this-command 'next-line)
; This version for 1.0 NeXT Gnu Emacs:
; (line-move arg)
; This version for 2.0 NeXT Gnu Emacs:
  (next-line-internal arg)
  )
(global-set-key "\C-n" 'next-line-no-mod)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; display preferences:
(setq default-truncate-lines t)
;(setq scroll-step 1)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Communicae mouse
;(load "communicae-mouse" t t)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; C program style
; mode-hook is the only method of changing these from default values:
;(setq c-mode-hook '(lambda ()
;		     (set (quote tab-width) 8)
;		     (set (quote comment-column) 32)
;		      ))
; if your indent is a power of 2, much faster to edit with tabs:
(define-key c-mode-map "\C-?" 'delete-backward-char)
(setq c-tab-always-indent nil)
;(setq c-auto-newline nil) ; default setting

(setq c-indent-level 0)
(setq c-continued-statement-offset 4)
(setq c-continued-brace-offset -4)
(setq c-brace-offset 4)
(setq c-brace-imaginary-offset 4)
(setq c-argcdecl-indent 4)
(setq c-label-offset -4)
