>>>>> "Jeffrey" == Jeffrey Phillips <[EMAIL PROTECTED]> writes:

  Jeffrey> Not sure about auto-format, but I highlight (my warning
  Jeffrey> face is red) the part of lines that extend past 80
  Jeffrey> characters using this:

  Jeffrey> (defun my-font-lock-prepends (mode)
  Jeffrey>  "Adds a 80 character line-width" (font-lock-add-keywords
  Jeffrey>   mode '(("\\(.\\{80\\}\\)\\(.+\\)"
  Jeffrey>      2 font-lock-warning-face prepend))))

  Jeffrey> (my-font-lock-prepends 'jde-mode)

  Jeffrey> -jeffrey

  Jeffrey> On Tue, 14 Dec 2004 09:01:20 -0500, Mark D. Hansen
  Jeffrey> <[EMAIL PROTECTED]> wrote:
  >> Can anyone tell me how to configure emacs/jde so that my java
  >> code will auto-format to have column width 80?
 
Auto-Formatting is hard because it coming up with something that looks
really nice is difficult. 

I use wide-column.el which is slightly less intrusive than the
directly using font lock. It changes the cursor colour as your line
gets beyond length and says "hit return some time, hit return". 

http://www.russet.org.uk/download/emacs/wide-column.el

Cheers

Phil

Reply via email to