From d0d079e0e4bf7ffa1e04a79d0400547044d80e2a Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 27 Oct 2020 12:09:54 +0100 Subject: [PATCH] Emacs: Only ask to update copyright if my/reformat-save is t. --- init.d/programming/common.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.d/programming/common.el b/init.d/programming/common.el index c87d921..03c9009 100644 --- a/init.d/programming/common.el +++ b/init.d/programming/common.el @@ -1,6 +1,6 @@ ;;; common.el --- Common programming settings. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-10-14T21:42:02+0200> +;; Time-stamp: <2020-10-27T12:09:21+0100> ;;; Commentary: @@ -238,7 +238,7 @@ collapse other projects." :config (defun my/maybe-copyright-update () "Update existing copyright notice to indicate the current year if mode is derived from prog-mode." - (if (derived-mode-p 'prog-mode) + (if (and my/reformat-save (derived-mode-p 'prog-mode)) (copyright-update))) :hook (before-save . my/maybe-copyright-update))