diff options
| author | Michael Albinus | 2007-08-05 08:57:24 +0000 |
|---|---|---|
| committer | Michael Albinus | 2007-08-05 08:57:24 +0000 |
| commit | 212b7268410aaf5bf4820a6c5e20eccedb7a4f32 (patch) | |
| tree | cc435235a3f3fe40b0b040c464cb6b8f2b68d965 | |
| parent | b1ab8c381057452c4ad8010c4da8be2ddfeed1cf (diff) | |
| download | emacs-212b7268410aaf5bf4820a6c5e20eccedb7a4f32.tar.gz emacs-212b7268410aaf5bf4820a6c5e20eccedb7a4f32.zip | |
* files.el (set-auto-mode): Handle also remote files wrt
`auto-mode-alist'.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/files.el | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ca8741013f5..d07f01641c8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-08-05 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * files.el (set-auto-mode): Handle also remote files wrt | ||
| 4 | `auto-mode-alist'. | ||
| 5 | |||
| 1 | 2007-08-04 Glenn Morris <rgm@gnu.org> | 6 | 2007-08-04 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * autorevert.el (auto-revert-tail-mode): auto-revert-tail-pos is | 8 | * autorevert.el (auto-revert-tail-mode): auto-revert-tail-pos is |
diff --git a/lisp/files.el b/lisp/files.el index 444e402f438..135ccfafb92 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2259,7 +2259,12 @@ we don't actually set it to the same mode the buffer already has." | |||
| 2259 | ;; Next compare the filename against the entries in auto-mode-alist. | 2259 | ;; Next compare the filename against the entries in auto-mode-alist. |
| 2260 | (unless done | 2260 | (unless done |
| 2261 | (if buffer-file-name | 2261 | (if buffer-file-name |
| 2262 | (let ((name buffer-file-name)) | 2262 | (let ((name buffer-file-name) |
| 2263 | (remote-id (file-remote-p buffer-file-name))) | ||
| 2264 | ;; Remove remote file name identification. | ||
| 2265 | (when (and (stringp remote-id) | ||
| 2266 | (string-match remote-id name)) | ||
| 2267 | (setq name (substring name (match-end 0)))) | ||
| 2263 | ;; Remove backup-suffixes from file name. | 2268 | ;; Remove backup-suffixes from file name. |
| 2264 | (setq name (file-name-sans-versions name)) | 2269 | (setq name (file-name-sans-versions name)) |
| 2265 | (while name | 2270 | (while name |