From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: lawrence mitchell Newsgroups: gmane.emacs.help Subject: Re: auto-fill mode in java-mode Date: Sat, 18 Oct 2003 22:23:49 +0100 Organization: funfunfun Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066512978 8614 80.91.224.253 (18 Oct 2003 21:36:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 18 Oct 2003 21:36:18 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 18 23:36:15 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AAykB-0007M5-00 for ; Sat, 18 Oct 2003 23:36:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AAyft-000619-Rc for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Oct 2003 17:31:49 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!vegetable.demon.co.UK!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: vegetable.demon.co.uk (80.177.16.3) Original-X-Trace: news.uni-berlin.de 1066512230 27374441 80.177.16.3 (16 [97657]) X-No-Yes: No Mail-Copies-To: nobody User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 Cancel-Lock: sha1:O+XrG51sclX6Zou31UtGiTIKpYY= Original-Xref: shelby.stanford.edu gnu.emacs.help:117401 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:13332 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13332 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