diff options
author | Richard M. Stallman <rms@gnu.org> | 2002-05-29 16:34:41 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2002-05-29 16:34:41 +0000 |
commit | 7defe888a51ebcc4443fbd1b5be2281d45e416ca (patch) | |
tree | e5d2966f85610bfb85bc6adc1ae1730fb745f3ba /lisp/files.el | |
parent | 5f64b52b67f2ca96607933a87f02ba54541ec202 (diff) | |
download | emacs-7defe888a51ebcc4443fbd1b5be2281d45e416ca.tar.gz |
(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.
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/files.el b/lisp/files.el index 51b2ca50387..4930d6a96a0 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1283,14 +1283,15 @@ that are visiting the various files." (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 @@ in that case, this function acts as if `enable-local-variables' were t." ("\\.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) |