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

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

Re: ediff & No newline at end of file


From: Thierry Volpiatto
Subject: Re: ediff & No newline at end of file
Date: Sat, 21 Jun 2008 10:32:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

sandro dentella <address@hidden> writes:

> On 21 Giu, 07:03, Thierry Volpiatto <address@hidden>
> wrote:
>> Hi,
>> that will not correct your problem but help in the future.
>>
>> ,----
>> | ;; Add newline at end of files
>> | (setq require-final-newline t)
>> `----
>> Now when you edit a file and you save it it will have a newline at end.
>
>
> I already have it, the fact is that I use if with files generated by
> others as well...
You can easily write a small function that take as args file1 and file2
and modify these files before calling ediff.
something like:

,----
| (find-file file1)
| (goto-char (point-max))
| (newline)
| (save-buffer)
| (kill-buffer (current-buffer))
`----
The same for file2 and then call ediff.
Should work.
-- 
A + Thierry
Pub key: http://pgp.mit.edu




reply via email to

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