help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: auto-fill mode in java-mode


From: lawrence mitchell
Subject: Re: auto-fill mode in java-mode
Date: Sat, 18 Oct 2003 22:23:49 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50

Adam Hardy wrote:

[...]

> I realise now that my issue here is that it would actually be
> preferable to have emacs just stop taking input beyond line 72 - and
> beep instead. Or perhaps color the text red, because I can imagine
> situations where I can't break the line.

How about:

(defun my-dont-insert-after-fill-column (&rest x)
  (when (> (current-column)
           fill-column)
    (delete-char -1)
    (beep)))

(add-hook 'after-change-functions 'my-dont-insert-after-fill-column)

> Is anything like that possible?

[...]

-- 
lawrence mitchell <wence@gmx.li>


reply via email to

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