|
|
@ -3,7 +3,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
;; Author: C-xC-c <boku@plum.moe
|
|
|
|
;; Author: C-xC-c <boku@plum.moe
|
|
|
|
;; Created: July 2020
|
|
|
|
;; Created: July 2020
|
|
|
|
;; Package-Version: 1.0.0
|
|
|
|
;; Package-Version: 1.1.0
|
|
|
|
;; Keywords: gentoo, package.use
|
|
|
|
;; Keywords: gentoo, package.use
|
|
|
|
;; URL: https://words.plum.moe/package.use-mode.html
|
|
|
|
;; URL: https://words.plum.moe/package.use-mode.html
|
|
|
|
|
|
|
|
|
|
|
@ -26,7 +26,7 @@
|
|
|
|
;;; Commentary:
|
|
|
|
;;; Commentary:
|
|
|
|
;; Emacs mode for Gentoo package.use
|
|
|
|
;; Emacs mode for Gentoo package.use
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
;;Thanks to nginx-mode where I stole most of this.
|
|
|
|
;; Thanks to nginx-mode where I stole most of this.
|
|
|
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
|
|
|
@ -47,25 +47,25 @@
|
|
|
|
(rx (group (1+ (any alnum "_" "." "+" "*" "-")))))
|
|
|
|
(rx (group (1+ (any alnum "_" "." "+" "*" "-")))))
|
|
|
|
|
|
|
|
|
|
|
|
(defvar package.use-font-lock-keywords
|
|
|
|
(defvar package.use-font-lock-keywords
|
|
|
|
(list
|
|
|
|
(list
|
|
|
|
;; >=www-servers/
|
|
|
|
;; >=www-servers/
|
|
|
|
;; www-servers/
|
|
|
|
;; www-servers/
|
|
|
|
`(,(concat package.use--version-bit package.use--catagory-bit)
|
|
|
|
`(,(concat package.use--version-bit package.use--catagory-bit)
|
|
|
|
. font-lock-function-name-face)
|
|
|
|
0 font-lock-function-name-face)
|
|
|
|
;; >=nginx-1.19.1
|
|
|
|
;; >=nginx-1.19.1
|
|
|
|
;; nginx
|
|
|
|
;; nginx
|
|
|
|
`(,(concat package.use--version-bit package.use--name-bit)
|
|
|
|
`(,(concat package.use--version-bit package.use--name-bit)
|
|
|
|
. font-lock-keyword-face)
|
|
|
|
0 font-lock-keyword-face)
|
|
|
|
;; >=www-servers/nginx-1.19.1
|
|
|
|
;; >=www-servers/nginx-1.19.1
|
|
|
|
;; www-servers/nginx
|
|
|
|
;; www-servers/nginx
|
|
|
|
`(,(concat package.use--version-bit package.use--catagory-bit package.use--name-bit)
|
|
|
|
`(,(concat package.use--version-bit package.use--catagory-bit package.use--name-bit)
|
|
|
|
(1 font-lock-variable-name-face t))
|
|
|
|
(1 font-lock-variable-name-face t))
|
|
|
|
;; dev-langs/python:3.7
|
|
|
|
;; dev-langs/python:3.7
|
|
|
|
`(,(rx ":" (1+ (any digit ".")))
|
|
|
|
`(,(rx ":" (1+ (any digit ".")))
|
|
|
|
0 font-lock-type-face t)
|
|
|
|
0 font-lock-type-face t)
|
|
|
|
;; www-servers/nginx NGINX_MODULES_HTTP:
|
|
|
|
;; www-servers/nginx NGINX_MODULES_HTTP:
|
|
|
|
`(,(rx (1+ whitespace) (1+ (any alnum "_" "-")) ":")
|
|
|
|
`(,(rx (1+ whitespace) (1+ (any alnum "_" "-")) ":")
|
|
|
|
0 font-lock-constant-face t)))
|
|
|
|
0 font-lock-constant-face t)))
|
|
|
|
|
|
|
|
|
|
|
|
(define-derived-mode package.use-mode prog-mode "package.use"
|
|
|
|
(define-derived-mode package.use-mode prog-mode "package.use"
|
|
|
|
:syntax-table nginx-mode-syntax-table
|
|
|
|
:syntax-table nginx-mode-syntax-table
|
|
|
@ -79,7 +79,7 @@
|
|
|
|
'(package.use-font-lock-keywords nil)))
|
|
|
|
'(package.use-font-lock-keywords nil)))
|
|
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
;;;###autoload
|
|
|
|
(add-to-list 'auto-mode-alist '("package\\.use$" . package.use-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("package\.\\(use\\|accept_keywords\\|mask\\|unmask\\)\$" . package.use-mode))
|
|
|
|
;;;###autoload
|
|
|
|
;;;###autoload
|
|
|
|
(add-to-list 'auto-mode-alist '("/package\\.use/" . package.use-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("/package\\.use/" . package.use-mode))
|
|
|
|
|
|
|
|
|
|
|
|