aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
authorPavel Janík2001-12-11 06:52:33 +0000
committerPavel Janík2001-12-11 06:52:33 +0000
commit283b4456b9e4047d3ea86b17d01538a8de81ea91 (patch)
tree361cd5a3fabd51584a6221c5cdd29a7bb55f3925 /lisp/net
parent61e3b94472908a8764424160a2d160040cbe9a7f (diff)
downloademacs-283b4456b9e4047d3ea86b17d01538a8de81ea91.tar.gz
emacs-283b4456b9e4047d3ea86b17d01538a8de81ea91.zip
(zone-mode): Don't use make-local-hook.
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/zone-mode.el11
1 files changed, 5 insertions, 6 deletions
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)