[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

auto-fill mode in java-mode

From: Adam Hardy
Subject: auto-fill mode in java-mode
Date: Sun, 12 Oct 2003 00:07:00 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925

I'm trying to get my java-mode to wrap lines at 75 cols and I've not got it working. I'm pretty sure that my java-mode settings, which sets it up just how I want it except the wrapping, must be inhibiting auto-fill, but I can't see how. This is my java-mode lisp in .emacs:

(add-hook 'java-mode-hook
  '(lambda ()
     ;; Konfiguration des Javamodes
     (c-set-style '"Java")
     (setq c-basic-offset 4)
     (c-set-offset 'topmost-intro-cont c-basic-offset)
     (c-set-offset 'inline-open 0)
     (c-set-offset 'inclass 4)
     (c-set-offset 'substatement-open 0)
     (c-set-offset 'block-open '-)
     (c-set-offset 'objc-method-intro 'c-lineup-arglist-intro-after-paren)
     ;; Konfiguration verschiedener Features
     (setq c-electric-pound-behavior '(alignleft))
     ;; allgemeine Konfiguration
     (set-variable 'comment-column 40)
     ;; Konfiguration der Funktionalitaet der Returntaste
     (local-set-key [return] 'newline-and-indent)
     (local-set-key [S-return] 'newline)
     (local-set-key [C-return] 'c-mark-function)))

;; Turn on auto-fill-mode in desired modes
(setq-default fill-column 75)
(add-hook 'java-mode-hook 'turn-on-auto-fill)

Thanks for any help.


GNU Emacs 21.3.1 on Linux 2.4.20 RH9

reply via email to

[Prev in Thread] Current Thread [Next in Thread]