summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Szukalski <szymon@szymonszukalski.com>2026-04-13 10:38:18 +1000
committerSzymon Szukalski <szymon@szymonszukalski.com>2026-04-13 10:38:18 +1000
commitb727d4a11c64479f041412c5a06743e4a7a887d4 (patch)
treefb3b020db9ded873dd54a380575b5b12881ec60c
parent789f7fd7ea301d95f839a025cfd1c2fe4bfeab57 (diff)
Prevent CRM abbrevs from dirtying abbrev state
-rw-r--r--init.el25
1 files 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."