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

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

bug#17947: 24.3; ruby-mode sets require-final-newline unconditionally


From: Ethan
Subject: bug#17947: 24.3; ruby-mode sets require-final-newline unconditionally
Date: Sat, 5 Jul 2014 14:19:06 -0400

The idea behind the package is that bad whitespace is highlighted, not automatically cleaned up. So if the file doesn't have a final newline when it is first loaded, no final newline will be added without explicit user action -- instead a red "eof" marker is placed where the final newline ought to be.

require-final-newline obviously interferes with this. ethan-wspace could therefore set it to nil when it is operating, unconditionally. However, I added functionality to complain if require-final-newline was set -- not because *users* set it, but because *modes* do, and I wanted to get notice when that happened. So if you really think ruby-mode should unconditionally set require-final-newline, it's easy to remove the warning, make it optional, override require-final-newline on a buffer-local basis, etc.

Ethan



On Sat, Jul 5, 2014 at 2:11 PM, Eli Zaretskii <address@hidden> wrote:
> From: Ethan Glasser-Camp <address@hidden>
> Date: Sat, 05 Jul 2014 14:07:16 -0400
>
> If ethan-wspace discovers that require-final-newline is set to t, it
> admonishes the user.

Why does ethan-wspace need to admonish users for setting
require-final-newline?  Can this be avoided?


reply via email to

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