From b727d4a11c64479f041412c5a06743e4a7a887d4 Mon Sep 17 00:00:00 2001 From: Szymon Szukalski Date: Mon, 13 Apr 2026 10:38:18 +1000 Subject: Prevent CRM abbrevs from dirtying abbrev state --- init.el | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/init.el b/init.el index b38ef27..f084493 100644 --- a/init.el +++ b/init.el @@ -797,18 +797,19 @@ "Install CRM abbrevs into the current prose buffer." (when (and (not (ss-crm-source-buffer-p)) (ss-crm-file-available-p)) - (setq-local local-abbrev-table (copy-abbrev-table local-abbrev-table)) - (ss-crm-clear-installed-abbrevs) - (dolist (entry (ss-crm-entries)) - (let* ((name (ss-crm-entry-get entry :name)) - (abbrev (ss-crm-entry-get entry :abbrev)) - (abbrev-name - (if (and abbrev (not (string-empty-p abbrev))) - abbrev - (ss-crm-default-abbrev name)))) - (define-abbrev local-abbrev-table abbrev-name name) - (when-let ((symbol (abbrev-symbol abbrev-name local-abbrev-table))) - (abbrev-put symbol :ss/crm t)))))) + (let ((abbrevs-changed abbrevs-changed)) + (setq-local local-abbrev-table (copy-abbrev-table local-abbrev-table)) + (ss-crm-clear-installed-abbrevs) + (dolist (entry (ss-crm-entries)) + (let* ((name (ss-crm-entry-get entry :name)) + (abbrev (ss-crm-entry-get entry :abbrev)) + (abbrev-name + (if (and abbrev (not (string-empty-p abbrev))) + abbrev + (ss-crm-default-abbrev name)))) + (define-abbrev local-abbrev-table abbrev-name name) + (when-let ((symbol (abbrev-symbol abbrev-name local-abbrev-table))) + (abbrev-put symbol :ss/crm t))))))) (defun ss-crm-refresh-buffers () "Refresh CRM abbrevs in text and Org buffers." -- cgit v1.2.3