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

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

Adaptive fill getting prefix wrong -- how to fix?


From: Richard C. Cobbe
Subject: Adaptive fill getting prefix wrong -- how to fix?
Date: Thu, 20 Jul 2006 12:05:44 -0400
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, usg-unix-v)

Greetings, all.

I'm in the process of switching back to GNUEmacs after many years of using
XEmacs, so I can take advantage of the Carbon GNU Emacs build on my Mac.

GNU Emacs 22.0.50.1, based on the CVS version of June 16, 2006.

I'm seeing some undesired behavior in emacs-lisp mode that involves adaptive
fill, and I'm hoping someone can tell me how to fix this.  As an example of
the problem, consider the following excerpt from my .emacs file:

;; override default binding of return as newline-and-indent, which is
;; distracting in text mode.
(add-hook 'text-mode-hook
          '(lambda () (define-key text-mode-map (kbd "RET") 'newline)))

I have auto-fill and adaptive fill enabled but otherwise at their default
settings.  The end of the (lambda ...) expression extends beyond my fill
column, so if I put point at the end of the line and hit space, it refills:

;; override default binding of return as newline-and-indent, which is
;; distracting in text mode.
(add-hook 'text-mode-hook
          '(lambda () (define-key text-mode-map (kbd "RET")
;; 'newline))) 

That's not right -- it's commented out the end of the function, including
the close parens.  Clearly adaptive fill is inferring the fill prefix
incorrectly.  What I want to happen is for the 'newline))) to be
uncommented and appropriately indented -- 2 spaces in from the (define-key.

Is this a misconfiguration on my part, or am I stuck with this behavior?

Thanks,

Richard


reply via email to

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