]> git.eshelyaron.com Git - emacs.git/commitdiff
Set xml-mode also if no mode found from file name.
authorDaniel Pfeiffer <occitan@esperanto.org>
Wed, 27 Oct 2004 10:27:46 +0000 (10:27 +0000)
committerDaniel Pfeiffer <occitan@esperanto.org>
Wed, 27 Oct 2004 10:27:46 +0000 (10:27 +0000)
lisp/files.el

index d14c4625352b1d765b49da461e9cb8c93f085566..dd36f44920800f5aaef5a0b1e7948c7ae0864ae6 100644 (file)
@@ -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