[Top][All Lists]

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

Re: line length control setting

From: Jesper Harder
Subject: Re: line length control setting
Date: Thu, 06 Nov 2003 16:41:22 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Adam Hardy <> writes:

> I am using a brute force method of stopping myself from writing long
> lines of code, using this in my .emacs:
> (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)
> But I discovered this is also acting on the command buffer, so I
> cannot add more than my fill column when doing simple file copies or
> renames or text search & replaces.

Have you considered using `auto-fill-mode' instead?  This also works
quite well in programming-language modes.

reply via email to

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