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

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

Re: Skipping the buffer extension .~HEAD~ when choosing major mode durin


From: Johan Bockgård
Subject: Re: Skipping the buffer extension .~HEAD~ when choosing major mode during ediff session
Date: Thu, 29 May 2008 09:39:10 +0200
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux)

Kevin Rodgers <address@hidden> writes:

> Johan Bockgård wrote:
>> Nordlöw <address@hidden> writes:
>>
>>> Is there a simple way for emacs to ignore the .~HEAD~ suffix when its
>>> chooses its major-mode based on name of the file/buffer. The .~HEAD~
>>> suffix is typically appended to a temporary buffer name created when
>>> we ediff a file with its vc head version.
>>
>> Emacs versions >= 22.2 already do the right thing.
>
> If one wanted to explain to Nordlöw how Emacs 22.2 does it, where would
> one look?  There's no mention in etc/NEWS.

[file-name-sans-versions]

                         (length name))
                   (if keep-backup-version
                       (length name)
-                    (or (string-match "\\.~[0-9.]+~\\'" name)
+                    (or (string-match "\\.~[-[:alnum:]:address@hidden'" name)
                         (string-match "~\\'" name)
                         (length name))))))))

-- 
Johan Bockgård


reply via email to

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