emacs-devel
[Top][All Lists]
Advanced

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

Re: auto-mode-alist doesn't match VC files file.c.~version~


From: Chris Moore
Subject: Re: auto-mode-alist doesn't match VC files file.c.~version~
Date: Wed, 10 Oct 2007 22:25:18 +0200

On 10/10/07, Chris Moore <address@hidden> wrote:
> Using C-u C-x v ~ in VC I can request an old version of a file.
>
> The old version will be written to disk as file.~version~ where
> version is the version I've requested.
>
> If I then visit the file in Emacs, the mode isn't set correctly,
> unless 'version' is entirely numeric, and even then it only works by
> accident, since Emacs' file-name-sans-versions strips off .~[0-9]+~
> endings before auto-mode-alist gets to work on the filename.
>
> When I visit file.c.~version~, file-name-sans-versions strips off just
> the last '~', making my local .emacs customisation to deal with this
> situation fail:
>   (push '("\\.~[^~/]+~\\'" nil t) auto-mode-alist)
>
> I think it would be better if file-name-sans-versions wasn't called in
[I clicked 'send'?]

... set-auto-mode, allowing us to handle VC filenames as well as
backup filenames in auto-mode-alist.  This would also allow us to set
the mode of files with names like file.c.~1~.~1~ (made when I edit a
backup file) correctly, which currently doesn't happen.

Chris.




reply via email to

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