|
I experienced the same problem too
/* * * Infocom enr. *
Jean-Pierre Dub� * D�veloppement de logiciels/Int�gration de
syst�me * Software development/System
integration * */
----- Original Message -----
Sent: Friday, June 15, 2001 9:01 AM
Subject: Random indent
I've set the indentation to 2 spaces and jde actually does
this, but sometimes (I can't manage to reproduce it, all I know is that it
happened after a jde-gen-println call) it switches to 4 spaces, and if I
strike the tab key in front of a previously 2-space indented line, it switches
to 4 spaces.
Versions : emacs 20.7.1
eieio-0.16 semantic-1.4beta7
ecb-1.32 jde-2.2.8beta1 elib-1.0
speedbar-0.14beta1
Here is the code in which it happened (hope this helps) :
public class EJBSessionHome extends EJBHome {
...
/** * Returns a description (model) of
the EJB which * class has been specified.
*/ public static EJBSessionHome
fromClass(String componentName,
Class homeClass,
Class remoteClass,
Class implemClass) throws Exception { ->
System.out.println("EJBSessionHome.EJBSessionHome(" + componentName +
", " + homeClass + ", " + remoteClass +
", " + implemClass + ")"); // Create a new
empty interface for this component (0 input and output)
ComponentTypeInterface cti = new
ComponentTypeInterface(0, 0);
...
Laurent
PS : .emacs attached
(standard-display-european t) (set-language-environment
"latin-1")
;; Some new Colors for Font-lock. (setq
font-lock-mode-maximum-decoration t) (require
'font-lock)
(set-face-bold-p 'font-lock-function-name-face
1) (set-face-italic-p 'font-lock-function-name-face 1)
;; More
information with the info file (Control-h
i) (custom-set-variables '(ecb-source-path (quote
("~/work/src/"))) '(show-paren-style (quote
expression)) '(line-number-mode
t) '(jde-compile-option-command-line-args
"+D") '(tex-dvi-view-command "xdvi"
t) '(pc-select-meta-moves-sexps t) '(scroll-step
1) '(blink-matching-paren nil) '(auto-show-mode t nil
(auto-show)) '(show-paren-delay 0.0) '(jde-imenu-sort (quote
asc)) '(toolbar-visible-p
nil) '(jde-compile-option-classpath (quote
("$JDK_HOME/jre/lib/rt.jar" "$J2EE_HOME/lib/j2ee.jar"
"~/work/classes"))) '(jde-build-use-make
t) '(show-paren-mode t nil
(paren)) '(jde-db-source-directories (quote
("~/work/src"))) '(jde-compile-option-directory
"~/work/classes") '(jde-lib-directory-name
"~/work/lib") '(jde-gen-class-buffer-template (quote ("(funcall
jde-gen-boilerplate-function)" "(jde-gen-get-package-statement)" "\"/**\"
'>'n" "\" *\" '>'n" "\" *\" '>'n" "\" * @author \" (user-full-name)
'>'n" "\" */\" '>'n'" "\"public class \"" "(file-name-sans-extension
(file-name-nondirectory buffer-file-name))" "\" \" (jde-gen-get-extend-class)"
"(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'n" "\"public \""
"(file-name-sans-extension (file-name-nondirectory buffer-file-name))" "\"()
\"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'>'p'n"
"\"}\"'>'n" "'>'n" "(jde-gen-get-interface-implementation)" "'>'n"
"\"}\">" "\" // \"" "(file-name-sans-extension (file-name-nondirectory
buffer-file-name))" "'>'n"))) '(jde-compiler
"jikes") '(standard-indent 2) '(paren-mode (quote sexp) nil
(paren)) '(query-user-mail-address
nil) '(pc-select-selection-keys-only
t) '(jde-global-classpath (quote ("." "$JDK_HOME/jre/lib/rt.jar"
"~/work/classes"))) '(column-number-mode
t) '(indent-tabs-mode nil) '(jde-enable-abbrev-mode
t) '(visible-bell t) '(scrollbars-visible-p
nil) '(user-mail-address
"[EMAIL PROTECTED]") '(fill-column
79) '(jde-gen-buffer-boilerplate (quote ("/*" " * Copyright (C) 1996
- 2000 BULL" " * Copyright (C) 1996 - 2000 INRIA" " */"
""))) '(jde-make-working-directory
"~/work/src/") '(jde-mode-abbreviations (quote (("ab" . "abstract")
("bo" . "boolean") ("br" . "break") ("byv" . "byvalue") ("cas" . "cast") ("ca"
. "catch") ("cl" . "class") ("co" . "const") ("con" . "continue") ("dou" .
"double") ("el" . "else") ("ex" . "extends") ("fa" . "false") ("fi" . "final")
("fin" . "finally") ("fl" . "float") ("fu" . "future") ("ge" . "generic")
("go" . "goto") ("impl" . "implements") ("impo" . "import") ("ins" .
"instanceof") ("in" . "int") ("inte" . "interface") ("lo" . "long") ("na" .
"native") ("nu" . "null") ("pa" . "package") ("pri" . "private") ("pro" .
"protected") ("pu" . "public") ("re" . "return") ("sh" . "short") ("st" .
"static") ("su" . "super") ("sw" . "switch") ("sy" . "synchronized") ("th" .
"this") ("thr" . "throw") ("tra" . "transient") ("tr" . "true") ("vo" .
"void") ("vol" . "volatile") ("wh" .
"while")))) '(jde-javadoc-gen-destination-directory
"javadoc") '(pc-selection-mode t nil
(pc-select)) '(jde-make-args
"all"))
(custom-set-faces '(show-paren-mismatch-face ((((class
color)) (:foreground "white" :background
"purple")))) '(show-paren-match-face ((t (:background
"gray40")))))
;; Set the debug option to enable a backtrace when
a ;; problem occurs. (setq debug-on-error t)
; (defconst
my-c-style ;
'((c-tab-always-indent
. t) ;
(c-comment-only-line-offset .
0) ;
(c-hanging-comment-ender-p . nil) ;; leave a */ on a
line by itself ;
(c-hanging-comment-starter-p . nil) ;; put /* on the first line by
itself ;
(c-hanging-braces-alist .
((substatement-open before
after) ;
(brace-list-open))) ;
(c-hanging-colons-alist .
((member-init-intro
before) ;
(inher-intro) ;
(case-label
after) ;
(label
after) ;
(access-label after))) ;
(c-cleanup-list
.
(scope-operator ;
empty-defun-braces ;
defun-close-semi)) ;
(c-offsets-alist
. ((arglist-close .
c-lineup-arglist) ;
(substatement-open .
0) ;
(case-label .
+) ;
(block-open .
0) ;
(inline-open .
0) ;
(comment-intro .
0) ;
(knr-argdecl-intro . -))) ;
(c-echo-syntactic-information-p . t) ;
) ; "My C Programming Style")
;; Update the Emacs
load-path to include the path to ;; the JDE and its require packages. This
code assumes ;; that you have installed the packages in the
emacs/site ;; subdirectory of your home directory. (add-to-list
'load-path (expand-file-name "~/emacs/jde/lisp")) (add-to-list 'load-path
(expand-file-name "~/emacs/semantic")) (add-to-list 'load-path
(expand-file-name "~/emacs/speedbar")) (add-to-list 'load-path
(expand-file-name "~/emacs/elib")) (add-to-list 'load-path
(expand-file-name "~/emacs/eieio")) (add-to-list 'load-path
(expand-file-name "~/emacs/ecb")) (require 'jde) (require
'ecb)
;; If you want Emacs to defer loading the JDE until you open a
;; Java file, edit the following line (setq defer-loading-jde
nil) ;; to read: ;; ;; (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 2)) (defun my-jde-mode-hook () (setq
c-basic-offset 2))
(add-hook 'jde-mode-hook
'my-jde-mode-hook)
;; Gestion de CVS (setq vc-handle-cvs 't) ;;
R�pertoire de docs JDE (setq jde-help-docsets (expand-file-name
"~/work/doc"))
|