When I hit tab in a jde buffer to auto-indent a piece of code it uses tabs to fill in 
the 
whitespace when i want it to use spaces.  I (setq-default indent-tab-modes nil) before 
I 
load jde.  Does my auto-loading jde when I open a *.java file break this?  Should I
replace
  (require 'jde))
with
  (require 'jde) (setq-default indent-tab-modes nil)) ?

===============================================
;NOTE: use C-j in *scratc* buffer to eval lisp
(setq-default indent-tab-modes nil)

; turn off auto parsing when a java file changes.
;(setq jde-auto-parse-enable nil)
;setting this variable here wasn't working, so I changed the default in the jde source 
to nil.

(custom-set-variables
  '(global-font-lock-mode t nil (font-lock)))

;(add-to-list 'load-path (expand-file-name "/usr/local/emacsl/jde/lisp"))
;(add-to-list 'load-path (expand-file-name "/usr/local/emacsl/jde-2.2.5/lisp"))
(add-to-list 'load-path (expand-file-name "/usr/local/emacsl/jde-2.2.8/lisp"))
;(add-to-list 'load-path (expand-file-name "/usr/local/emacsl/jde-2.1.9/lisp"))

       (add-to-list 'load-path (expand-file-name 
"/usr/local/emacsl/semantic-1.4beta11"))
;      (add-to-list 'load-path (expand-file-name "/usr/local/emacsl/semantic-1.2.1"))
;      (add-to-list 'load-path (expand-file-name "/usr/local/emacsl/semantic"))

;      (add-to-list 'load-path (expand-file-name "/usr/local/emacsl/speedbar"))
;      (add-to-list 'load-path (expand-file-name "/usr/local/emacsl/speedbar-0.12"))
       (add-to-list 'load-path (expand-file-name "/usr/local/emacsl/speedbar-0.13a"))

       (add-to-list 'load-path (expand-file-name "/usr/local/emacsl/elib-1.0"))
       (add-to-list 'load-path (expand-file-name "/usr/local/emacsl/eieio"))

(setq-default indent-tab-modes nil)


;(require 'jde)
(setq defer-loading-jde t)
(if defer-loading-jde
     (progn
       (autoload 'jde-mode "jde" "JDE mode." t)
       (setq auto-mode-alist
             (append
              '(("\\.java\\'" . jde-mode))
              auto-mode-alist)))
   (require 'jde))


;; Sets the basic indentation for Java source files
;; to two spaces.
(defun my-jde-mode-hook ()
   (setq c-basic-offset 4))

(add-hook 'jde-mode-hook 'my-jde-mode-hook)

;this is on top and on bottom.
(setq-default indent-tab-modes nil)

;; check for files with a path containing "postgres" or "pgsql"
(setq auto-mode-alist (cons '("\\(postgres\\|pgsql\\).*\\.[ch]\\'" . pgsql-c-mode) 
auto-mode-alist))
(setq auto-mode-alist (cons '("\\(postgres\\|pgsql\\).*\\.cc\\'" . pgsql-c-mode) 
auto-mode-alist))

(defun pgsql-c-mode ()
   ;; sets up formatting for Postgres C code
   (interactive)
   (c-mode)
   (setq-default tab-width 4)
   (c-set-style "bsd")             ; set c-basic-offset to 4, plus other stuff
   (c-set-offset 'case-label '+)   ; tweak case indent to match PG custom
   (setq indent-tabs-mode t))      ; make sure we keep tabs when indenting

;this is on top and on bottom.
(setq-default indent-tab-modes nil)
-- 
Joseph Shraibman
[EMAIL PROTECTED]
Increase signal to noise ratio.  http://www.targabot.com

Reply via email to