From: Daniel Pfeiffer Date: Wed, 27 Oct 2004 10:27:46 +0000 (+0000) Subject: Set xml-mode also if no mode found from file name. X-Git-Tag: ttn-vms-21-2-B4~4370 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=396b39cf4f0a1ead1e737b25491667fb2df6e0cc;p=emacs.git Set xml-mode also if no mode found from file name. --- diff --git a/lisp/files.el b/lisp/files.el index d14c4625352..dd36f449208 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1913,17 +1913,18 @@ and we don't even do that unless it would come from the file name." (let ((name buffer-file-name)) ;; Remove backup-suffixes from file name. (setq name (file-name-sans-versions name)) - (while (not done) + (while name ;; Find first matching alist entry. (let ((case-fold-search (memq system-type '(vax-vms windows-nt cygwin)))) (if (and (setq mode (assoc-default name auto-mode-alist 'string-match)) + (setq done t) (consp mode) (cadr mode)) (setq mode (car mode) name (substring name 0 (match-beginning 0))) - (setq done t))) + (setq name))) (if mode ;; When JUST-FROM-FILE-NAME is set, we are working on behalf ;; of set-visited-file-name. In that case, if the major mode