1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* files.el (set-auto-mode): Handle also remote files wrt

`auto-mode-alist'.
This commit is contained in:
Michael Albinus 2007-08-05 08:57:24 +00:00
parent b1ab8c3810
commit 212b726841
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2007-08-05 Michael Albinus <michael.albinus@gmx.de>
* files.el (set-auto-mode): Handle also remote files wrt
`auto-mode-alist'.
2007-08-04 Glenn Morris <rgm@gnu.org>
* autorevert.el (auto-revert-tail-mode): auto-revert-tail-pos is

View file

@ -2259,7 +2259,12 @@ we don't actually set it to the same mode the buffer already has."
;; Next compare the filename against the entries in auto-mode-alist.
(unless done
(if buffer-file-name
(let ((name buffer-file-name))
(let ((name buffer-file-name)
(remote-id (file-remote-p buffer-file-name)))
;; Remove remote file name identification.
(when (and (stringp remote-id)
(string-match remote-id name))
(setq name (substring name (match-end 0))))
;; Remove backup-suffixes from file name.
(setq name (file-name-sans-versions name))
(while name