303 |
If it matches, `replace-match' is used to replace the |
If it matches, `replace-match' is used to replace the |
304 |
matching part with REPLACEMENT. |
matching part with REPLACEMENT. |
305 |
If the optional element UNIQUIFY is non-nil, the auto-save file name is |
If the optional element UNIQUIFY is non-nil, the auto-save file name is |
306 |
constructed by taking the directory part of the replaced file-name, |
constructed by taking the directory part of the replaced file-name, |
307 |
concatenated with the buffer file name with all directory separators |
concatenated with the buffer file name with all directory separators |
308 |
changed to `!' to prevent clashes. This will not work |
changed to `!' to prevent clashes. This will not work |
309 |
correctly if your filesystem truncates the resulting name. |
correctly if your filesystem truncates the resulting name. |
483 |
(unless dir |
(unless dir |
484 |
(setq dir default-directory)) |
(setq dir default-directory)) |
485 |
(unless default-dirname |
(unless default-dirname |
486 |
(setq default-dirname |
(setq default-dirname |
487 |
(if initial (concat dir initial) default-directory))) |
(if initial (concat dir initial) default-directory))) |
488 |
(read-file-name prompt dir default-dirname mustmatch initial |
(read-file-name prompt dir default-dirname mustmatch initial |
489 |
'file-directory-p)) |
'file-directory-p)) |
1179 |
(unless (or (eq read-only buffer-file-read-only) |
(unless (or (eq read-only buffer-file-read-only) |
1180 |
(eq read-only buffer-read-only)) |
(eq read-only buffer-read-only)) |
1181 |
(when (or nowarn |
(when (or nowarn |
1182 |
(let ((question |
(let ((question |
1183 |
(format "File %s is %s on disk. Change buffer mode? " |
(format "File %s is %s on disk. Change buffer mode? " |
1184 |
buffer-file-name |
buffer-file-name |
1185 |
(if read-only "read-only" "writable")))) |
(if read-only "read-only" "writable")))) |
1461 |
(mapc |
(mapc |
1462 |
(lambda (elt) |
(lambda (elt) |
1463 |
(cons (purecopy (car elt)) (cdr elt))) |
(cons (purecopy (car elt)) (cdr elt))) |
1464 |
'(("\\.te?xt\\'" . text-mode) |
'(("\\.in\\'" nil t) |
1465 |
|
("\\.te?xt\\'" . text-mode) |
1466 |
("\\.c\\'" . c-mode) |
("\\.c\\'" . c-mode) |
1467 |
("\\.h\\'" . c-mode) |
("\\.h\\'" . c-mode) |
1468 |
("\\.tex\\'" . tex-mode) |
("\\.tex\\'" . tex-mode) |
1493 |
("\\.m\\'" . objc-mode) |
("\\.m\\'" . objc-mode) |
1494 |
("\\.java\\'" . java-mode) |
("\\.java\\'" . java-mode) |
1495 |
("\\.mk\\'" . makefile-mode) |
("\\.mk\\'" . makefile-mode) |
1496 |
("\\(M\\|m\\|GNUm\\)akefile\\(\\.in\\)?\\'" . makefile-mode) |
("\\(M\\|m\\|GNUm\\)akefile\\'" . makefile-mode) |
1497 |
("\\.am\\'" . makefile-mode) ;For Automake. |
("\\.am\\'" . makefile-mode) ;For Automake. |
1498 |
;; Less common extensions come here |
;; Less common extensions come here |
1499 |
;; so more common ones above are found faster. |
;; so more common ones above are found faster. |