[Top][All Lists]

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

Re: problem with require-final-newline

From: Kevin Rodgers
Subject: Re: problem with require-final-newline
Date: Thu, 13 May 2004 17:07:37 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

Charles Jamieson wrote:
>   I have the line
>     (setq-default require-final-newline t)
> in my .emacs file.  When I save a .txt file without a final newline, I
> am asked whether to add a newline.  When I enter C-h v
> require-final-newline, I am informed this variable is set to query.
>    However, when I save a .cpp or.h file without a terminating new line,
> the newline is silently added.  In fact when I enter C-h v
> require-final-newline, I am informed its value is set to t.
>     Why is this variable not being set consistently across file types?

My guess is that something like this is lurking somewhere (either in
~/.emacs, default.el, or site-start.el):

(add-hook 'text-mode-hook
          (lambda ()
            (set (make-local-variable 'require-final-newline) 'query)))

Kevin Rodgers

reply via email to

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