I am using emacs-20.3 cc-mode 5.21 on Solaris with JDE 2.1.5 and have found the
indent-region function
to be quite slow (probably 1+ second per line of code).
Thanks,
Dale
(server-start)
(setq gnus-select-method '(nntp "troll"))
;
; Settings
;
(setq require-final-newline t)
(setq column-number-mode t)
(setq-default tab-width 4)
(setq-default c-indent-level 4)
;
; global key bindings
;
(global-set-key "\C-xl" 'what-line)
(global-set-key "\C-xg" 'goto-line)
(global-set-key "\C-cm" 'compile)
;(global-set-key "\C-ck" 'kill-compilation)
;(global-set-key "\C-cr" 'replace-string)
;(global-set-key "\C-x\C-v" 'enlarge-window)
;(global-set-key "\C-x\C-a" 'shrink-window)
(global-set-key "\C-x\C-k" 'kill-all-buffers)
;(global-set-key "\M-s" 'isearch-forward-regexp)
;(global-set-key "\M-r" 'isearch-backward-regexp)
(global-set-key "\C-xr" 're-replace-region)
;(global-set-key "\C-xt" 'find-tag)
;(global-set-key "\C-cs" 'dot-emacs)
;(global-set-key "\M-[" 'vi-find-matching-paren)
;
; enable commands
;
(put 'narrow-to-region 'disabled nil)
(put 'downcase-region 'disabled nil)
(put 'upcase-region 'disabled nil)
;
; function definitions
;
;;; RE-REPLACE-REGION replaces OLD (a regular expression) with NEW
;;; throughout the region indicated by BEGIN and END.
;;; For example, to insert a prefix ">" at the beginning of each line
;;; in the region:
;;; M-x re-replace-regionRET^RET>RET
(defun re-replace-region (begin end old new)
"Replace occurrences of REGEXP with TO-STRING in region."
(interactive "*r\nsReplace string: \nswith: ")
(save-excursion
(save-restriction
(narrow-to-region begin end)
(goto-char (point-min))
(while (re-search-forward old (point-max) t)
(replace-match new t t)))))
(defun kill-all-buffers ()
"For each buffer, ask whether to kill it."
(interactive)
(let ((list (buffer-list)))
(while list
(let* ((buffer (car list))
(name (buffer-name buffer)))
(and (not (string-equal name ""))
(/= (aref name 0) ? )
(kill-buffer buffer)))
(setq list (cdr list)))))
(defun dot-emacs ()
"Visit .emacs file."
(interactive)
(find-file "~/.emacs"))
(defun sql ()
"Enter SQL-Plus."
(interactive)
(shell)
(insert-string "sql"))
;
; path
;
;(append load-path (expand-file-name "~/src/emacs"))
(setq load-path (nconc '(
"/home/dwyttenb/src/emacs"
"/home/dwyttenb/src/emacs/jde-2.1.5"
)
load-path))
;(setq load-path
; (if (car load-path) ; if the first element of the
; ; load-path is nil, i.e. the
; ; current directory, evaluate
; ; the else part
; (append (list
; (expand-file-name "~/src/emacs"))
; load-path)
; (append (list nil
; (expand-file-name "~/src/emacs"))
;
; (cdr load-path))))
;;;; config - Generic Version Management Interface - RCS & Emacs.
;;; from Brian Marick, Gould Computer & U of IL.
;
(autoload 'config-in "config" "Check in a file")
(autoload 'config-out "config" "Check out a file")
(setq *config-type* 'RCS)
(defun config-buffer-in ()
"Check in and unlock the contents of the current buffer"
(interactive)
(config-in (buffer-name)))
(defun config-buffer-out ()
"Check out and lock the contents of the current buffer"
(interactive)
(config-out (buffer-name)))
(global-set-key "\C-ci" 'config-buffer-in)
(global-set-key "\C-co" 'config-buffer-out)
;
;
;
;(autoload 'html-mode "html-mode" "HTML major mode." t)
;(autoload 'basic-mode "basic-mode" "A mode for doing basic" t)
;(autoload 'java-mode "java-mode" "A mode for doing java" t)
;(autoload 'python-mode "python-mode" "Python editing mode." t)
;(autoload 'tcl-mode "tcl" "A mode for doing tcl/tk" t)
(setq auto-mode-alist
(append '( ("\\.txt$" . text-mode)
("\\.exp$" . tcl-mode)
("\\.proc$" . tcl-mode)
("\\.procs$" . tcl-mode)
("\\.tk$" . tcl-mode)
("\\.tcl$" . tcl-mode)
("\\.java$" . java-mode)
("\\.pl$" . perl-mode)
("\\.pm$" . perl-mode)
("\\.py$" . python-mode)
("\\.cpp$" . c++-mode)
("\\.h$" . c++-mode)
("\\.bas$" . basic-mode)
)
auto-mode-alist
))
(require 'jde)
(custom-set-variables
'(jde-make-program "gmake")
(custom-set-faces)