diff options
| author | Craig Jennings <c@cjennings.net> | 2025-11-01 12:57:49 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-11-01 12:57:49 -0500 |
| commit | 9c4ceb9015e70fda894aa1d68f1b39ace4cded86 (patch) | |
| tree | ad05891749f11a6d01cdde03b2f2f43fa8c4705d /modules/system-defaults.el | |
| parent | 962646189e8b65437186a3a78ba9baa5c4c4ebc9 (diff) | |
perf:system-defaults: Unpropertize kill ring on exit
Add `unpropertize-kill-ring` function to remove text properties from
the kill ring when Emacs is exiting. This improves performance by
reducing unnecessary data retention. The function is hooked into
`kill-emacs-hook`.
Diffstat (limited to 'modules/system-defaults.el')
| -rw-r--r-- | modules/system-defaults.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/system-defaults.el b/modules/system-defaults.el index 52607121..715dcda6 100644 --- a/modules/system-defaults.el +++ b/modules/system-defaults.el @@ -229,6 +229,13 @@ Used to disable functionality with defalias \='somefunc \='cj/disabled)." (setq kept-new-versions 25) ;; keep 25 of the newest backups made (default: 2) (setq vc-make-backup-files t) ;; also backup any files in version control +;; ------------------ Unpropertize Kill Ring For Performance ----------------- + +(defun unpropertize-kill-ring () + (setq kill-ring (mapcar 'substring-no-properties kill-ring))) + +(add-hook 'kill-emacs-hook 'unpropertize-kill-ring) + ;; ------------------------------- GNU 'ls' On BSD ------------------------------- (when (env-bsd-p) |
