Update firejail-mode.el
This commit is contained in:
parent
02122f979b
commit
0d1d4e10c1
@ -1,6 +1,7 @@
|
|||||||
;;; firejail-mode --- Major mode for editing firejail profiles -*- lexical-binding: t -*-
|
;;; firejail-mode --- Major mode for editing firejail profiles -*- lexical-binding: t -*-
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
(require 'find-file)
|
||||||
|
|
||||||
(defconst firejail-profile-font-lock-keywords
|
(defconst firejail-profile-font-lock-keywords
|
||||||
(let* ((normal '("quiet" "include" "noblacklist" "nowhitelist"
|
(let* ((normal '("quiet" "include" "noblacklist" "nowhitelist"
|
||||||
@ -120,6 +121,11 @@ dbus-\\(system\\|user\\) +\\(none\\|filter\\)?\\)" . 2))
|
|||||||
(point)
|
(point)
|
||||||
firejail-profile--keyword-list)))
|
firejail-profile--keyword-list)))
|
||||||
|
|
||||||
|
(defvar-keymap firejail-profile-mode-map
|
||||||
|
:doc "Keymap for `firejail-profile-mode'."
|
||||||
|
:parent prog-mode-map
|
||||||
|
"C-c C-o" #'ff-find-other-file)
|
||||||
|
|
||||||
(define-derived-mode firejail-profile-mode prog-mode "Firejail-Profile"
|
(define-derived-mode firejail-profile-mode prog-mode "Firejail-Profile"
|
||||||
"Major mode for editing firejail profiles."
|
"Major mode for editing firejail profiles."
|
||||||
:syntax-table firejail-profile-syntax-table
|
:syntax-table firejail-profile-syntax-table
|
||||||
@ -127,7 +133,14 @@ dbus-\\(system\\|user\\) +\\(none\\|filter\\)?\\)" . 2))
|
|||||||
#'firejail-profile-capf)
|
#'firejail-profile-capf)
|
||||||
(setq-local font-lock-defaults '(firejail-profile-font-lock-keywords)
|
(setq-local font-lock-defaults '(firejail-profile-font-lock-keywords)
|
||||||
comment-start "#"
|
comment-start "#"
|
||||||
comment-end ""))
|
comment-end ""
|
||||||
|
ff-search-directories
|
||||||
|
;; the map page firejail-profile(5) seems to suggest that this
|
||||||
|
;; does _NOT_ respect $XDG_CONFIG_HOME
|
||||||
|
`("." "~/.config/firejail" "/etc/firejail"
|
||||||
|
"/usr/share/etc/firejail")
|
||||||
|
ff-other-file-alist '(("\\.local\\'" (".profile"))
|
||||||
|
("\\.profile\\'" (".local")))))
|
||||||
|
|
||||||
(add-to-list 'auto-mode-alist
|
(add-to-list 'auto-mode-alist
|
||||||
'("\\.\\(firejail\\|profile\\|local\\)$" . firejail-profile-mode))
|
'("\\.\\(firejail\\|profile\\|local\\)$" . firejail-profile-mode))
|
||||||
|
Loading…
Reference in New Issue
Block a user