Skip to content

Instantly share code, notes, and snippets.

@ngn999
Created November 8, 2012 17:42
Show Gist options
  • Save ngn999/4040317 to your computer and use it in GitHub Desktop.
Save ngn999/4040317 to your computer and use it in GitHub Desktop.
query mode
;;; query-mode.el --- a mode for view our access log
;; query example
;; /bin/search?auction?user_id=79586&statistic=field=pidvid,count=500&n=4&s=2
;; Author : ngn <[email protected]>
;; URL : https://gist.github.com/4040317
;; Version : 0.1
;; Keywords : query, url
;; This file is not part of GNU Emacs.
(setq myKeywords
'(
("&" . font-lock-string-face)
("=[^&]*" . font-lock-function-name-face)
("/.*\\?" . font-lock-string-face)
))
(define-derived-mode query-mode fundamental-mode
(setq font-lock-defaults '(myKeywords))
(setq mode-name "Query"))
(provide 'query-mode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment