unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alexander Kuleshov <kuleshovmail@gmail.com>
To: emacs-devel <emacs-devel@gnu.org>
Subject: [PATCH] 26.0.50.3, add $TTL directove to dns-mode.el
Date: Thu, 12 Jan 2017 15:37:01 +0600	[thread overview]
Message-ID: <20170112093701.GA2306@localhost.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

Hello everyone,

This simple patch adds `$TTL` directive to dns-mode-font-lock-keywords
from the lisp/text-modes/dns-mode.el.

The global `$TTL` directive (time-to-live) specifies the duration in seconds
that the record may be cached by any resolver. In general it should looks:

$TTL amount-of-ttl (in seconds)

Additionally d/D/h/H/w/W/m/M/s/S maybe added to amount-of-ttl where d/D -
days, h/H - hours and etc..

Thank you.

[-- Attachment #2: 0001-Add-support-for-TTL-dns-directive.patch --]
[-- Type: text/plain, Size: 986 bytes --]

From 2209894bc51367570c38a3428be6f4f1e2bc25a2 Mon Sep 17 00:00:00 2001
From: Alexander Kuleshov <kuleshovmail@gmail.com>
Date: Thu, 12 Jan 2017 15:26:02 +0600
Subject: [PATCH] Add support for $TTL dns directive

* lisp/text-modes/dns-mode.el (dns-mode-font-lock-keywords): Add $TTL
directive.
---
 lisp/textmodes/dns-mode.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/textmodes/dns-mode.el b/lisp/textmodes/dns-mode.el
index 02cb2a2..6a3cfcb 100644
--- a/lisp/textmodes/dns-mode.el
+++ b/lisp/textmodes/dns-mode.el
@@ -79,6 +79,7 @@ dns-mode-class-face
 (defcustom dns-mode-font-lock-keywords
   `(("^$ORIGIN" 0 ,dns-mode-control-entity-face)
     ("^$INCLUDE" 0 ,dns-mode-control-entity-face)
+    ("^$TTL\s+[0-9]+[WwDdHhMmSs]?" 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))
-- 
2.8.0.rc3.1353.gea9bdc0


                 reply	other threads:[~2017-01-12  9:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170112093701.GA2306@localhost.localdomain \
    --to=kuleshovmail@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).