changeset 57733:bf99e505dd7a

Set xml-mode also if no mode found from file name.
author Daniel Pfeiffer <occitan@esperanto.org>
date Wed, 27 Oct 2004 10:27:46 +0000
parents 828726b6503b
children 32217d296ff3
files lisp/files.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Wed Oct 27 09:13:50 2004 +0000
+++ b/lisp/files.el	Wed Oct 27 10:27:46 2004 +0000
@@ -1913,17 +1913,18 @@
 	(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