+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
;; 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