• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/textmodes/

Lines Matching refs:serial

29 ;; C-c C-s  Increment SOA serial.
30 ;; Understands YYYYMMDDNN, Unix time, and serial number formats,
31 ;; and complains if it fail to find SOA serial.
93 (defcustom dns-mode-soa-auto-increment-serial t
94 "Whether to increment the SOA serial number automatically.
96 If this variable is t, the serial number is incremented upon each save of
98 increment the serial upon saving. If nil, serials must be incremented
99 manually with \\[dns-mode-soa-increment-serial]."
118 (define-key map "\C-c\C-s" 'dns-mode-soa-increment-serial)
130 ["Increment SOA serial" dns-mode-soa-increment-serial t]))
150 (add-hook 'before-save-hook 'dns-mode-soa-maybe-increment-serial
159 (defun dns-mode-soa-increment-serial ()
160 "Locate SOA record and increment the serial field."
180 (let* ((serial (match-string 1))
185 (if (string< serial nowandoldserial)
188 (message "Replaced old serial %s with %s" serial new))
189 (if (string= serial nowandoldserial)
193 (message "Replaced old serial %s with %s" serial new))
194 (error "Current SOA serial is in the future"))))
197 (let* ((serial (match-string 1))
199 (if (not (string< serial new))
200 (error "Current SOA serial is in the future")
202 (message "Replaced old serial %s with %s" serial new)))
204 ;; Just any serial number.
205 (let* ((serial (match-string 1))
206 (new (format "%d" (1+ (string-to-number serial)))))
208 (message "Replaced old serial %s with %s" serial new))
209 (error "Cannot locate serial number in SOA record"))))))
211 (defun dns-mode-soa-maybe-increment-serial ()
212 "Increment SOA serial if needed.
216 dns-mode-soa-auto-increment-serial
217 (or (eq dns-mode-soa-auto-increment-serial t)
218 (y-or-n-p "Increment SOA serial? ")))
219 ;; If `dns-mode-soa-increment-serial' signals an error saving will
220 ;; fail but that probably means that the serial should be fixed to
222 (progn (dns-mode-soa-increment-serial)