comparison lisp/files.el @ 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 0c2a22313f16
children 0965e40e4b46
comparison
equal deleted inserted replaced
45567:1c1da92d278d 45568:431fa03cb605
1281 ;; this is a permanent local, the major mode won't eliminate it. 1281 ;; this is a permanent local, the major mode won't eliminate it.
1282 (and (not (funcall backup-enable-predicate buffer-file-name)) 1282 (and (not (funcall backup-enable-predicate buffer-file-name))
1283 (progn 1283 (progn
1284 (make-local-variable 'backup-inhibited) 1284 (make-local-variable 'backup-inhibited)
1285 (setq backup-inhibited t))) 1285 (setq backup-inhibited t)))
1286 (if rawfile 1286 (let ((buffer (current-buffer)))
1287 (progn 1287 (if rawfile
1288 (set-buffer-multibyte nil) 1288 (progn
1289 (setq buffer-file-coding-system 'no-conversion) 1289 (set-buffer-multibyte nil)
1290 (make-local-variable 'find-file-literally) 1290 (setq buffer-file-coding-system 'no-conversion)
1291 (setq find-file-literally t)) 1291 (make-local-variable 'find-file-literally)
1292 (after-find-file error (not nowarn))) 1292 (setq find-file-literally t))
1293 (current-buffer)))) 1293 (after-find-file error (not nowarn)))
1294 buffer))))
1294 1295
1295 (defun insert-file-contents-literally (filename &optional visit beg end replace) 1296 (defun insert-file-contents-literally (filename &optional visit beg end replace)
1296 "Like `insert-file-contents', but only reads in the file literally. 1297 "Like `insert-file-contents', but only reads in the file literally.
1297 A buffer may be modified in several ways after reading into the buffer, 1298 A buffer may be modified in several ways after reading into the buffer,
1298 to Emacs features such as format decoding, character code 1299 to Emacs features such as format decoding, character code
1470 ("\\.F\\'" . fortran-mode) 1471 ("\\.F\\'" . fortran-mode)
1471 ("\\.for\\'" . fortran-mode) 1472 ("\\.for\\'" . fortran-mode)
1472 ("\\.p\\'" . pascal-mode) 1473 ("\\.p\\'" . pascal-mode)
1473 ("\\.pas\\'" . pascal-mode) 1474 ("\\.pas\\'" . pascal-mode)
1474 ("\\.ad[abs]\\'" . ada-mode) 1475 ("\\.ad[abs]\\'" . ada-mode)
1476 ("\\.ad[bs].dg\\'" . ada-mode)
1475 ("\\.\\([pP]\\([Llm]\\|erl\\)\\|al\\)\\'" . perl-mode) 1477 ("\\.\\([pP]\\([Llm]\\|erl\\)\\|al\\)\\'" . perl-mode)
1476 ("\\.s?html?\\'" . html-mode) 1478 ("\\.s?html?\\'" . html-mode)
1477 ("\\.cc\\'" . c++-mode) 1479 ("\\.cc\\'" . c++-mode)
1478 ("\\.hh\\'" . c++-mode) 1480 ("\\.hh\\'" . c++-mode)
1479 ("\\.hpp\\'" . c++-mode) 1481 ("\\.hpp\\'" . c++-mode)