;;; 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
;; 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))
"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))
- 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
(provide 'zone-mode)
+;;; arch-tag: 6a2940ef-fd4f-4de7-b979-b027b09821fe
;;; zone-mode.el ends here