From 8ba9ebf228cc5ef439d4e61237632e287ce8d9e6 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 5 Dec 2020 10:55:36 +0100 Subject: [PATCH] Emacs: Make my/reformat-save a custom variable. --- init.d/basics/global-variables.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/init.d/basics/global-variables.el b/init.d/basics/global-variables.el index 41db5f8..4f6c202 100644 --- a/init.d/basics/global-variables.el +++ b/init.d/basics/global-variables.el @@ -1,6 +1,6 @@ ;;; global-variables.el --- Set some global variables. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-12-03T08:37:05+0100> +;; Time-stamp: <2020-12-05T10:45:47+0100> ;;; Commentary: ;; * Banish customizations. @@ -53,10 +53,12 @@ (defvar slow-computer nil) ; Slow computers load fewer packages. (if (member (system-name) '("steuerbeamter" "azimuth" "localhost")) (setq slow-computer t)) ; localhost is schnibble. - (defvar-local my/reformat-save t + (defcustom my/reformat-save t "Make changes to the buffer on save. -If t, run `whitespace-cleanup', `clang-format-buffer' and so on.") - (put 'my/reformat-save 'safe-local-variable #'booleanp))) +If t, run `whitespace-cleanup', `clang-format-buffer' and so on." + :type 'boolean + :safe #'booleanp + :local t))) (provide 'basics/global-variables) ;;; global-variables.el ends here