emacs-devel
[Top][All Lists]
Advanced

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

Re: Changing of line format and undo


From: Lennart Borgman
Subject: Re: Changing of line format and undo
Date: Wed, 21 Jun 2006 17:50:57 +0200
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

David Kastrup wrote:
Lennart Borgman <address@hidden> writes:

Eli Zaretskii wrote:
Date: Wed, 21 Jun 2006 00:15:17 +0200
From: Lennart Borgman <address@hidden>

If you change line endings this change is not saved to undo. Is
this the expected behaviour?
If you mean "C-x RET f", then it doesn't really change anything.  It
just sets a buffer-local variable to some value.  So there's nothing
to undo.
That is an internal Emacs perpective. From a users point of view there
is truly a change. If you for example change the line endings the file
will be saved with this new line endings.

BTW should not changes of this kind also set the buffer to modified?

What makes you think they don't?

Test this for example:

   (defun test-set-eol()
     (interactive)
     (let* ((coding buffer-file-coding-system)
            (new-coding (coding-system-change-eol-conversion coding 2)))
       (setq buffer-file-coding-system new-coding)))





reply via email to

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