2006-06-13 Martin J. Reed <mjreed@essex.ac.uk> (tiny change)
[bpt/emacs.git] / lisp / net / zone-mode.el
index d1528aa..441ef14 100644 (file)
@@ -1,6 +1,7 @@
 ;;; zone-mode.el --- major mode for editing DNS zone files
 
-;; Copyright (C) 1998 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2002, 2003, 2004, 2005,
+;;   2006 Free Software Foundation, Inc.
 
 ;; Author: John Heidemann <johnh@isi.edu>
 ;; Keywords: DNS, languages
@@ -19,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
             (new-seq
              (cond
               ((not (string= old-date cur-date))
-               "00") ;; reset sequeence number
+               "00") ;; reset sequence number
               ((>= old-seq-num 99)
-               (error "Serial number's sequenece cannot increment beyond 99"))
+               (error "Serial number's sequence cannot increment beyond 99"))
               (t
                (format "%02d" (1+ old-seq-num)))))
             (old-serial (concat old-date old-seq))
             (new-serial (concat cur-date new-seq)))
        (if (string-lessp new-serial old-serial)
-           (error (format "Serial numbers want to move backwards from %s to %s!" old-serial new-serial))
+           (error "Serial numbers want to move backwards from %s to %s" old-serial new-serial)
          (replace-match (concat cur-date new-seq old-flag) t t))))))
-  
+
 ;;;###autoload
 (defun zone-mode-update-serial-hook ()
-  "Update the serial number in a zone if the file was modified"
+  "Update the serial number in a zone if the file was modified."
   (interactive)
   (if (buffer-modified-p (current-buffer))
       (zone-mode-update-serial))
@@ -76,7 +77,7 @@
   "Zone-mode's syntax table.")
 
 (defun zone-mode-load-time-setup ()
-  "init zone-mode stuff"
+  "Initialize `zone-mode' stuff."
   (setq zone-mode-syntax-table (make-syntax-table))
   (modify-syntax-entry ?\; "<" zone-mode-syntax-table)
   (modify-syntax-entry ?\n ">" zone-mode-syntax-table))
@@ -92,8 +93,7 @@ Zone-mode does two things:
 
        - fontification"
 
-  (make-local-hook 'write-file-hooks)
-  (add-hook 'write-file-hooks 'zone-mode-update-serial-hook)
+  (add-hook 'write-file-functions 'zone-mode-update-serial-hook nil t)
 
   (if (null zone-mode-syntax-table)
       (zone-mode-load-time-setup)) ;; should have been run at load-time
@@ -116,4 +116,5 @@ Zone-mode does two things:
 
 (provide 'zone-mode)
 
+;;; arch-tag: 6a2940ef-fd4f-4de7-b979-b027b09821fe
 ;;; zone-mode.el ends here