MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.117.158.174
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/textmodes/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/textmodes/dns-mode.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:11:47 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/textmodes/dns-mode.el
;;; in Emacs version 24.3.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(custom-declare-group 'dns-mode nil "DNS master file mode configuration." :group 'data)
#@41 List of strings with known DNS classes.
(defconst dns-mode-classes '("IN" "CS" "CH" "HS") (#$ . 649))
#@39 List of strings with known DNS types.
(defconst dns-mode-types '("A" "NS" "MD" "MF" "CNAME" "SOA" "MB" "MG" "MR" "NULL" "WKS" "PTR" "HINFO" "MINFO" "MX" "TXT" "RP" "AFSDB" "X25" "ISDN" "RT" "NSAP" "NSAP" "SIG" "KEY" "PX" "GPOS" "AAAA" "LOC" "NXT" "EID" "NIMLOC" "SRV" "ATMA" "NAPTR" "KX" "CERT" "A6" "DNAME" "SINK" "OPT" "APL" "DS" "SSHFP" "RRSIG" "NSEC" "DNSKEY" "UINFO" "UID" "GID" "UNSPEC" "TKEY" "TSIG" "IXFR" "AXFR" "MAILB" "MAILA") (#$ . 757))
#@55 Name of face used for control entities, e.g. $ORIGIN.
(defvar dns-mode-control-entity-face 'font-lock-keyword-face (#$ . 1213))
#@65 Name of face used for non-standard control entities, e.g. $FOO.
(defvar dns-mode-bad-control-entity-face 'font-lock-warning-face (#$ . 1347))
#@45 Name of face used for DNS types, e.g., SOA.
(defvar dns-mode-type-face 'font-lock-type-face (#$ . 1495))
#@46 Name of face used for DNS classes, e.g., IN.
(defvar dns-mode-class-face 'font-lock-constant-face (#$ . 1606))
(byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\313\306\307&\207" [custom-declare-variable dns-mode-font-lock-keywords `(("^$ORIGIN" 0 ,dns-mode-control-entity-face) ("^$INCLUDE" 0 ,dns-mode-control-entity-face) ("^$[a-z0-9A-Z]+" 0 ,dns-mode-bad-control-entity-face) (,(regexp-opt dns-mode-classes) 0 ,dns-mode-class-face) (,(regexp-opt dns-mode-types) 0 ,dns-mode-type-face)) "Font lock keywords used to highlight text in DNS master file mode." :type sexp :group dns-mode dns-mode-soa-auto-increment-serial t "Whether to increment the SOA serial number automatically.\n\nIf this variable is t, the serial number is incremented upon each save of\nthe file.  If it is `ask', Emacs asks for confirmation whether it should\nincrement the serial upon saving.  If nil, serials must be incremented\nmanually with \\[dns-mode-soa-increment-serial]." (choice (const :tag "Always" t) (const :tag "Ask" ask) (const :tag "Never" nil))] 8)
#@49 Syntax table in use in DNS master file buffers.
(defvar dns-mode-syntax-table (byte-code "\301 \302\303\304#\210\302\305\306#\210)\207" [table make-syntax-table modify-syntax-entry 59 "<   " 10 ">   "] 4) (#$ . 2675))
#@34 Keymap for DNS master file mode.
(defvar dns-mode-map (byte-code "\301 \302\303\304#\210)\207" [map make-sparse-keymap define-key "" dns-mode-soa-increment-serial] 4) (#$ . 2903))
#@39 Menubar used in DNS master file mode.
(defvar dns-mode-menu nil (#$ . 3094))
#@11 DNS Menu.
(defvar dns-mode-menu nil (#$ . 3177))
(byte-code "\301\302\303\304$\210\305\306N\204\307\305\306\310\311!#\210\312\300!\204!\307\300\313\314#\210\301\207" [dns-mode-map easy-menu-do-define dns-mode-menu "DNS Menu." ("DNS" ["Increment SOA serial" dns-mode-soa-increment-serial t]) dns-mode-hook variable-documentation put purecopy "Hook run when entering DNS mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it.  (This is true for all hook variables.)" boundp definition-name dns-mode] 5)
(defvar dns-mode-map (make-sparse-keymap))
(byte-code "\300\301N\204\302\300\301\303\304!#\210\305\306!\204\302\306\307\310#\210\300\207" [dns-mode-map variable-documentation put purecopy "Keymap for `dns-mode'." boundp dns-mode-syntax-table definition-name dns-mode] 5)
(defvar dns-mode-syntax-table (make-syntax-table))
(byte-code "\300\301N\204\302\300\301\303\304!#\210\302\305\306\307#\207" [dns-mode-syntax-table variable-documentation put purecopy "Syntax table for `dns-mode'." dns-mode-abbrev-table definition-name dns-mode] 5)
(defvar dns-mode-abbrev-table (progn (define-abbrev-table 'dns-mode-abbrev-table nil) dns-mode-abbrev-table))
(byte-code "\300\301N\204\302\300\301\303\304!#\210\302\305\306\307#\207" [dns-mode-abbrev-table variable-documentation put purecopy "Abbrev table for `dns-mode'." dns-mode derived-mode-parent text-mode] 5)
#@382 Major mode for viewing and editing DNS master files.
This mode is inherited from text mode.  It add syntax
highlighting, and some commands for handling DNS master files.
Its keymap inherits from `text-mode' and it has the same
variables for customizing indentation.  It has its own abbrev
table and its own syntax table.

Turning on DNS mode runs `dns-mode-hook'.

\{dns-mode-map}
(defalias 'dns-mode #[nil "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315!\204'\316\317 \"\210\320\f!\211\2036
\321 =\203<\322\f\323 \"\210)\324(\325\"\204V()=\204V\326(\325)C#\210\327!\210\330\f!\210()\306\331!\210\332\306\333!\210\334\306\335!\210\336\306\337!\210\340\341\342\343\344\307$\210\345*\"\210)\346\347!\207" [delay-mode-hooks major-mode mode-name dns-mode-map dns-mode-syntax-table parent make-local-variable t text-mode dns-mode "DNS" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table comment-start ";" comment-end "" comment-start-skip ";+ *" font-lock-defaults (dns-mode-font-lock-keywords nil nil ((95 . "w"))) add-hook before-save-hook dns-mode-soa-maybe-increment-serial nil easy-menu-add run-mode-hooks dns-mode-hook dns-mode-abbrev-table local-abbrev-table dns-mode-menu] 6 (#$ . 4589) nil])
#@51 Locate SOA record and increment the serial field.
(defalias 'dns-mode-soa-increment-serial #[nil "\212eb\210\306\307\310\311#\204\312\313!\210\306\314\310\311#\203q\315\316!\315\317!\320	!\321\322!\211	P\f\231\203H\323\324\"\325
\310\211\211\316%\210\326\327
#)\202m\f\230\203j\323\211\330	G\"\nT#\325
\310\211\211\316%\210\326\327
#)\202m\312\331!-\202\306\306\332\310\311#\203\236\315\316!\321\333!
\231\204\215\312\331!\202\232\325
\310\211\211\316%\210\326\327
#*\202\306\306\334\310\311#\203\303\315\316!\323\335\320!T\"\325
\310\211\211\316%\210\326\327
#*\202\306\312\336!)\207" [serial counterstr counter now nowandoldserial new re-search-forward "^\\(\\(\\([^ 	]+[ 	]+\\)?[^ 	]+[ 	]+\\)?[^ 	]+[ 	]+\\)?SOA" nil t error "Cannot locate SOA record" "\\<\\(\\(198\\|199\\|20[0-9]\\)[0-9]\\(0[0-9]\\|10\\|11\\|12\\)\\([012][0-9]\\|30\\|31\\)\\([0-9]\\{1,3\\}\\)\\)\\>" match-string 1 5 string-to-number format-time-string "%Y%m%d" format "%s00" replace-match message "Replaced old serial %s with %s" "%%s%%0%dd" "Current SOA serial is in the future" "\\<\\([0-9]\\{9,10\\}\\)\\>" "%s" "\\<\\([0-9]+\\)\\>" "%d" "Cannot locate serial number in SOA record"] 7 (#$ . 6016) nil])
#@80 Increment SOA serial if needed.

This function is run from `before-save-hook'.
(defalias 'dns-mode-soa-maybe-increment-serial #[nil "\301 \205\205\302=\204\303\304!\205\305 \210\306\207" [dns-mode-soa-auto-increment-serial buffer-modified-p t y-or-n-p "Increment SOA serial? " dns-mode-soa-increment-serial nil] 2 (#$ . 7237)])
(provide 'dns-mode)

MMCT - 2023