Files
machine_setup/nix/configuration/roles/emacs/files/emacs/elisp/lang-xml.el
Tom Alexander 4a6cbfad67 Use lexical binding in elisp files.
This silences a warning for each of these files. Lexical binding will become the default in a future version of emacs.
2026-09-12 21:00:26 -04:00

19 lines
385 B
EmacsLisp

;; -*- lexical-binding: t; -*-
(defun xml-fmt ()
"Run xmllint --format."
(run-command-on-buffer "xmllint" "--format" "-")
)
(use-package nxml-mode
:commands (nxml-mode)
:pin manual
:ensure nil
:hook (
(nxml-mode . (lambda ()
(add-hook 'before-save-hook 'xml-fmt nil 'local)
))
)
)
(provide 'lang-xml)