changeset 45568:431fa03cb605

(find-file-noselect-1): Return the buffer we created even if it has been killed within `after-find-file'. (auto-mode-alist): Use ada-mode for .ad[bs].dg files.
author Richard M. Stallman <rms@gnu.org>
date Wed, 29 May 2002 16:34:41 +0000
parents 1c1da92d278d
children 5a8e504582e3
files lisp/files.el
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Tue May 28 22:04:14 2002 +0000
+++ b/lisp/files.el	Wed May 29 16:34:41 2002 +0000
@@ -1283,14 +1283,15 @@
 	   (progn
 	     (make-local-variable 'backup-inhibited)
 	     (setq backup-inhibited t)))
-      (if rawfile
-	  (progn
-	    (set-buffer-multibyte nil)
-	    (setq buffer-file-coding-system 'no-conversion)
-	    (make-local-variable 'find-file-literally)
-	    (setq find-file-literally t))
-	(after-find-file error (not nowarn)))
-      (current-buffer))))
+      (let ((buffer (current-buffer)))
+	(if rawfile
+	    (progn
+	      (set-buffer-multibyte nil)
+	      (setq buffer-file-coding-system 'no-conversion)
+	      (make-local-variable 'find-file-literally)
+	      (setq find-file-literally t))
+	  (after-find-file error (not nowarn)))
+	buffer))))
 
 (defun insert-file-contents-literally (filename &optional visit beg end replace)
   "Like `insert-file-contents', but only reads in the file literally.
@@ -1472,6 +1473,7 @@
      ("\\.p\\'" . pascal-mode)
      ("\\.pas\\'" . pascal-mode)
      ("\\.ad[abs]\\'" . ada-mode)
+     ("\\.ad[bs].dg\\'" . ada-mode)
      ("\\.\\([pP]\\([Llm]\\|erl\\)\\|al\\)\\'" . perl-mode)
      ("\\.s?html?\\'" . html-mode)
      ("\\.cc\\'" . c++-mode)