dconf: mostly works

This commit is contained in:
MitchMarq42 2022-06-19 16:57:03 -08:00
parent 70a729453c
commit 94b178505e

View File

@ -1,6 +1,4 @@
;;; dconf-mode.el --- Edit dconf settings in an emacs buffer ;;; dconf-mode.el --- Edit dconf settings in an emacs buffer
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.gsets" . dconf-mode))
;;; Commentary: ;;; Commentary:
;; I haven't completely given up on GNOME. This is a little wrapper I've ported ;; I haven't completely given up on GNOME. This is a little wrapper I've ported
@ -13,6 +11,8 @@
;; autocmd BufWritePost *.gsets silent !cat % | dconf load /org/gnome/%:t:r/ ;; autocmd BufWritePost *.gsets silent !cat % | dconf load /org/gnome/%:t:r/
;;; Code: ;;; Code:
(defun dconf-load-current-file () (defun dconf-load-current-file ()
"Load the current file into dconf's live registry." "Load the current file into dconf's live registry."
(interactive) (interactive)
@ -27,17 +27,13 @@
(concat "dconf dump /org/gnome/" (file-name-base buffer-file-name) "/") (concat "dconf dump /org/gnome/" (file-name-base buffer-file-name) "/")
(current-buffer))) (current-buffer)))
(if (string-match "*.gsets" buffer-file-name)
(progn
;; (add-hook) ;BufReadPre
(conf-windows-mode) ;BufReadPost might be default
)
)
(define-derived-mode dconf-mode conf-mode "Dconf" (define-derived-mode dconf-mode conf-mode "Dconf"
(add-hook after-save-hook "Major mode for interacting with the dconf database."
#'dconf-load-current-file) (add-hook 'after-save-hook 'dconf-load-current-file)
) :after-hook (dconf-dump-current-file))
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.gsets" . dconf-mode))
(provide 'dconf-mode) (provide 'dconf-mode)
;;; dconf-mode.el ends here ;;; dconf-mode.el ends here