emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog doc-view.el


From: Tassilo Horn
Subject: [Emacs-diffs] emacs/lisp ChangeLog doc-view.el
Date: Wed, 28 Jan 2009 20:33:48 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Tassilo Horn <tsdh>     09/01/28 20:33:48

Modified files:
        lisp           : ChangeLog doc-view.el 

Log message:
        (doc-view-mode): Don't use string-match and file
        extension to choose fallback mode on empty/non-existing files but
        let-bind auto-mode-alist and call normal-mode.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15204&r2=1.15205
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/doc-view.el?cvsroot=emacs&r1=1.79&r2=1.80

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15204
retrieving revision 1.15205
diff -u -b -r1.15204 -r1.15205
--- ChangeLog   28 Jan 2009 19:02:17 -0000      1.15204
+++ ChangeLog   28 Jan 2009 20:33:44 -0000      1.15205
@@ -1,3 +1,9 @@
+2009-01-28  Tassilo Horn  <address@hidden>
+
+       * doc-view.el (doc-view-mode): Don't use string-match and file
+       extension to choose fallback mode on empty/non-existing files but
+       let-bind auto-mode-alist and call normal-mode.
+
 2009-01-28  Eli Zaretskii  <address@hidden>
 
        * ls-lisp.el (ls-lisp-classify): Propertize file name before

Index: doc-view.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/doc-view.el,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -b -r1.79 -r1.80
--- doc-view.el 27 Jan 2009 18:34:03 -0000      1.79
+++ doc-view.el 28 Jan 2009 20:33:47 -0000      1.80
@@ -1093,11 +1093,11 @@
 
   (if (or (not (file-exists-p buffer-file-name))
          (= (point-min) (point-max)))
-      ;; The doc is empty or doesn't exist at all, so fallback to an
-      ;; editing mode.
-      (if (string-match "[eE]?[pP][sS]" (file-name-extension buffer-file-name))
-         (ps-mode)
-       (fundamental-mode)) ;;Should we activate d-v-minor-mode here?
+      ;; The doc is empty or doesn't exist at all, so fallback to
+      ;; another mode.
+      (let ((auto-mode-alist (remq (rassq 'doc-view-mode auto-mode-alist)
+                                  auto-mode-alist)))
+       (normal-mode))
 
     (let* ((prev-major-mode (if (eq major-mode 'doc-view-mode)
                                doc-view-previous-major-mode




reply via email to

[Prev in Thread] Current Thread [Next in Thread]