emacs-devel
[Top][All Lists]
Advanced

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

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


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

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




reply via email to

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