comparison lisp/prim/files.el @ 6:27bc7f280385 r19-15b4

Import from CVS: tag r19-15b4
author cvs
date Mon, 13 Aug 2007 08:47:15 +0200
parents b82b59fe008d
children 4b173ad71786
comparison
equal deleted inserted replaced
5:49b78a777eb4 6:27bc7f280385
1201 (setq mode (cdr (car alist)) 1201 (setq mode (cdr (car alist))
1202 keep-going nil))) 1202 keep-going nil)))
1203 (setq alist (cdr alist)))) 1203 (setq alist (cdr alist))))
1204 ;; If we can't deduce a mode from the file name, 1204 ;; If we can't deduce a mode from the file name,
1205 ;; look for an interpreter specified in the first line. 1205 ;; look for an interpreter specified in the first line.
1206 (if (null mode) 1206 (if (and (null mode)
1207 (save-excursion ; XEmacs
1208 (goto-char (point-min))
1209 (looking-at "#!")))
1207 (let ((firstline 1210 (let ((firstline
1208 (buffer-substring 1211 (buffer-substring
1209 (point-min) 1212 (point-min)
1210 (save-excursion 1213 (save-excursion
1211 (goto-char (point-min)) (end-of-line) (point))))) 1214 (goto-char (point-min)) (end-of-line) (point)))))