diff options
| author | Richard M. Stallman | 2003-05-28 11:19:48 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-05-28 11:19:48 +0000 |
| commit | c2fe6e7a073483a643ef946c9b44b0504736cc53 (patch) | |
| tree | 93f18354b39143eea38c24fdfd5762e85a87b790 | |
| parent | 6dabaf5e9451bed703556aab42fcfa3567eb4020 (diff) | |
| download | emacs-c2fe6e7a073483a643ef946c9b44b0504736cc53.tar.gz emacs-c2fe6e7a073483a643ef946c9b44b0504736cc53.zip | |
(forms-mode): Use write-file-functions instead of local-write-file-hooks.
Use make-local-variable to make it local.
| -rw-r--r-- | lisp/forms.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/forms.el b/lisp/forms.el index a81d137811f..24133d22257 100644 --- a/lisp/forms.el +++ b/lisp/forms.el | |||
| @@ -286,7 +286,7 @@ | |||
| 286 | ;; forms mode functions next/prev record and first/last | 286 | ;; forms mode functions next/prev record and first/last |
| 287 | ;; record. | 287 | ;; record. |
| 288 | ;; | 288 | ;; |
| 289 | ;; `local-write-file-hooks' is defined to save the actual data file | 289 | ;; `write-file-functions' is defined to save the actual data file |
| 290 | ;; instead of the buffer data, `revert-file-hook' is defined to | 290 | ;; instead of the buffer data, `revert-file-hook' is defined to |
| 291 | ;; revert a forms to original. | 291 | ;; revert a forms to original. |
| 292 | 292 | ||
| @@ -301,10 +301,10 @@ | |||
| 301 | (provide 'forms) ;;; official | 301 | (provide 'forms) ;;; official |
| 302 | (provide 'forms-mode) ;;; for compatibility | 302 | (provide 'forms-mode) ;;; for compatibility |
| 303 | 303 | ||
| 304 | (defconst forms-version (substring "$Revision: 2.45 $" 11 -2) | 304 | (defconst forms-version (substring "$Revision: 2.46 $" 11 -2) |
| 305 | "The version number of forms-mode (as string). The complete RCS id is: | 305 | "The version number of forms-mode (as string). The complete RCS id is: |
| 306 | 306 | ||
| 307 | $Id: forms.el,v 2.45 2003/02/04 11:21:12 lektu Exp $") | 307 | $Id: forms.el,v 2.46 2003/05/23 12:48:06 rms Exp $") |
| 308 | 308 | ||
| 309 | (defcustom forms-mode-hooks nil | 309 | (defcustom forms-mode-hooks nil |
| 310 | "Hook run upon entering Forms mode." | 310 | "Hook run upon entering Forms mode." |
| @@ -656,13 +656,13 @@ Commands: Equivalent keys in read-only mode: | |||
| 656 | (if (not file-modified) (set-buffer-modified-p nil))) | 656 | (if (not file-modified) (set-buffer-modified-p nil))) |
| 657 | (if write-file-filter | 657 | (if write-file-filter |
| 658 | (progn | 658 | (progn |
| 659 | (make-variable-buffer-local 'local-write-file-hooks) | 659 | (make-local-variable 'write-file-functions) |
| 660 | (setq local-write-file-hooks (list write-file-filter))))) | 660 | (setq write-file-functions (list write-file-filter))))) |
| 661 | (if write-file-filter | 661 | (if write-file-filter |
| 662 | (save-excursion | 662 | (save-excursion |
| 663 | (set-buffer forms--file-buffer) | 663 | (set-buffer forms--file-buffer) |
| 664 | (make-variable-buffer-local 'local-write-file-hooks) | 664 | (make-local-variable 'write-file-functions) |
| 665 | (setq local-write-file-hooks (list write-file-filter)))))) | 665 | (setq write-file-functions (list write-file-filter)))))) |
| 666 | 666 | ||
| 667 | ;; count the number of records, and set see if it may be modified | 667 | ;; count the number of records, and set see if it may be modified |
| 668 | (let (ro) | 668 | (let (ro) |