diff options
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/net/zone-mode.el | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 30eb0ec6e04..c1051ab03bc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2001-12-11 Pavel Jan,Bm(Bk <Pavel@Janik.cz> | ||
| 2 | |||
| 3 | * net/zone-mode.el (zone-mode): Don't use make-local-hook. | ||
| 4 | |||
| 1 | 2001-12-11 Richard M. Stallman <rms@gnu.org> | 5 | 2001-12-11 Richard M. Stallman <rms@gnu.org> |
| 2 | 6 | ||
| 3 | * textmodes/ispell.el (ispell-buffer-local-parsing): | 7 | * textmodes/ispell.el (ispell-buffer-local-parsing): |
diff --git a/lisp/net/zone-mode.el b/lisp/net/zone-mode.el index d1528aa1794..598386f23a9 100644 --- a/lisp/net/zone-mode.el +++ b/lisp/net/zone-mode.el | |||
| @@ -52,20 +52,20 @@ | |||
| 52 | (new-seq | 52 | (new-seq |
| 53 | (cond | 53 | (cond |
| 54 | ((not (string= old-date cur-date)) | 54 | ((not (string= old-date cur-date)) |
| 55 | "00") ;; reset sequeence number | 55 | "00") ;; reset sequence number |
| 56 | ((>= old-seq-num 99) | 56 | ((>= old-seq-num 99) |
| 57 | (error "Serial number's sequenece cannot increment beyond 99")) | 57 | (error "Serial number's sequence cannot increment beyond 99")) |
| 58 | (t | 58 | (t |
| 59 | (format "%02d" (1+ old-seq-num))))) | 59 | (format "%02d" (1+ old-seq-num))))) |
| 60 | (old-serial (concat old-date old-seq)) | 60 | (old-serial (concat old-date old-seq)) |
| 61 | (new-serial (concat cur-date new-seq))) | 61 | (new-serial (concat cur-date new-seq))) |
| 62 | (if (string-lessp new-serial old-serial) | 62 | (if (string-lessp new-serial old-serial) |
| 63 | (error (format "Serial numbers want to move backwards from %s to %s!" old-serial new-serial)) | 63 | (error (format "Serial numbers want to move backwards from %s to %s" old-serial new-serial)) |
| 64 | (replace-match (concat cur-date new-seq old-flag) t t)))))) | 64 | (replace-match (concat cur-date new-seq old-flag) t t)))))) |
| 65 | 65 | ||
| 66 | ;;;###autoload | 66 | ;;;###autoload |
| 67 | (defun zone-mode-update-serial-hook () | 67 | (defun zone-mode-update-serial-hook () |
| 68 | "Update the serial number in a zone if the file was modified" | 68 | "Update the serial number in a zone if the file was modified." |
| 69 | (interactive) | 69 | (interactive) |
| 70 | (if (buffer-modified-p (current-buffer)) | 70 | (if (buffer-modified-p (current-buffer)) |
| 71 | (zone-mode-update-serial)) | 71 | (zone-mode-update-serial)) |
| @@ -76,7 +76,7 @@ | |||
| 76 | "Zone-mode's syntax table.") | 76 | "Zone-mode's syntax table.") |
| 77 | 77 | ||
| 78 | (defun zone-mode-load-time-setup () | 78 | (defun zone-mode-load-time-setup () |
| 79 | "init zone-mode stuff" | 79 | "Initialise `zone-mode' stuff." |
| 80 | (setq zone-mode-syntax-table (make-syntax-table)) | 80 | (setq zone-mode-syntax-table (make-syntax-table)) |
| 81 | (modify-syntax-entry ?\; "<" zone-mode-syntax-table) | 81 | (modify-syntax-entry ?\; "<" zone-mode-syntax-table) |
| 82 | (modify-syntax-entry ?\n ">" zone-mode-syntax-table)) | 82 | (modify-syntax-entry ?\n ">" zone-mode-syntax-table)) |
| @@ -92,7 +92,6 @@ Zone-mode does two things: | |||
| 92 | 92 | ||
| 93 | - fontification" | 93 | - fontification" |
| 94 | 94 | ||
| 95 | (make-local-hook 'write-file-hooks) | ||
| 96 | (add-hook 'write-file-hooks 'zone-mode-update-serial-hook) | 95 | (add-hook 'write-file-hooks 'zone-mode-update-serial-hook) |
| 97 | 96 | ||
| 98 | (if (null zone-mode-syntax-table) | 97 | (if (null zone-mode-syntax-table) |