[Top][All Lists]

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

Re: line length control setting

From: Kevin Rodgers
Subject: Re: line length control setting
Date: Thu, 06 Nov 2003 11:27:18 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

Adam Hardy wrote:

Hi All,
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)
    (delete-char -1)

(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.

Is there a way that I can adapt my function above to stop it applying to the command buffer?

(when (and (not (eq major-mode 'shell-mode))

           (> (current-column) fill-column))

Kevin Rodgers

reply via email to

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