1559 |
("\\.c\\'" . c-mode) |
("\\.c\\'" . c-mode) |
1560 |
("\\.h\\'" . c-mode) |
("\\.h\\'" . c-mode) |
1561 |
("\\.tex\\'" . tex-mode) |
("\\.tex\\'" . tex-mode) |
1562 |
|
("\\.ins\\'" . tex-mode) ;Installation files for TeX packages. |
1563 |
("\\.ltx\\'" . latex-mode) |
("\\.ltx\\'" . latex-mode) |
1564 |
|
("\\.dtx\\'" . doctex-mode) |
1565 |
("\\.el\\'" . emacs-lisp-mode) |
("\\.el\\'" . emacs-lisp-mode) |
1566 |
("\\.scm\\'" . scheme-mode) |
("\\.scm\\'" . scheme-mode) |
1567 |
("\\.l\\'" . lisp-mode) |
("\\.l\\'" . lisp-mode) |
3423 |
|
|
3424 |
This command also works for special buffers that contain text which |
This command also works for special buffers that contain text which |
3425 |
doesn't come from a file, but reflects some other data base instead: |
doesn't come from a file, but reflects some other data base instead: |
3426 |
for example, Dired buffers and buffer-list buffers. In these cases, |
for example, Dired buffers and `buffer-list' buffers. In these cases, |
3427 |
it reconstructs the buffer contents from the appropriate data base. |
it reconstructs the buffer contents from the appropriate data base. |
3428 |
|
|
3429 |
When called from Lisp, the first argument is IGNORE-AUTO; only offer |
When called from Lisp, the first argument is IGNORE-AUTO; only offer |
3535 |
;; Run after-revert-hook as it was before we reverted. |
;; Run after-revert-hook as it was before we reverted. |
3536 |
(setq-default revert-buffer-internal-hook global-hook) |
(setq-default revert-buffer-internal-hook global-hook) |
3537 |
(if local-hook-p |
(if local-hook-p |
3538 |
(progn |
(set (make-local-variable 'revert-buffer-internal-hook) |
3539 |
(make-local-variable 'revert-buffer-internal-hook) |
local-hook) |
|
(setq revert-buffer-internal-hook local-hook)) |
|
3540 |
(kill-local-variable 'revert-buffer-internal-hook)) |
(kill-local-variable 'revert-buffer-internal-hook)) |
3541 |
(run-hooks 'revert-buffer-internal-hook)) |
(run-hooks 'revert-buffer-internal-hook)) |
3542 |
t))))) |
t))))) |
3554 |
(interactive "FRecover file: ") |
(interactive "FRecover file: ") |
3555 |
(setq file (expand-file-name file)) |
(setq file (expand-file-name file)) |
3556 |
(if (auto-save-file-name-p (file-name-nondirectory file)) |
(if (auto-save-file-name-p (file-name-nondirectory file)) |
3557 |
(error "%s is an auto-save file" file)) |
(error "%s is an auto-save file" (abbreviate-file-name file))) |
3558 |
(let ((file-name (let ((buffer-file-name file)) |
(let ((file-name (let ((buffer-file-name file)) |
3559 |
(make-auto-save-file-name)))) |
(make-auto-save-file-name)))) |
3560 |
(cond ((if (file-exists-p file) |
(cond ((if (file-exists-p file) |
3561 |
(not (file-newer-than-file-p file-name file)) |
(not (file-newer-than-file-p file-name file)) |
3562 |
(not (file-exists-p file-name))) |
(not (file-exists-p file-name))) |
3563 |
(error "Auto-save file %s not current" file-name)) |
(error "Auto-save file %s not current" |
3564 |
|
(abbreviate-file-name file-name))) |
3565 |
((save-window-excursion |
((save-window-excursion |
3566 |
(with-output-to-temp-buffer "*Directory*" |
(with-output-to-temp-buffer "*Directory*" |
3567 |
(buffer-disable-undo standard-output) |
(buffer-disable-undo standard-output) |