From 256027866f9ff2cbc3b6155950f21a92b54ea307 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 29 Jun 2026 04:19:31 -0400 Subject: refactor: prefix two collision-prone helpers, document naming audit Two owned helpers carried unprefixed generic names that risk colliding in the single Emacs namespace: car-member (local-repository.el) and unpropertize-kill-ring (system-defaults.el). I renamed them to localrepo--car-member and cj/--unpropertize-kill-ring and updated their callers and tests. Both are non-interactive and contained, so no alias was needed. docs/design/naming-audit.org records the rest of the scan: the allowlist of deliberate module prefixes, the foreign forward-declarations that aren't owned definitions, and a deferred list (keybound commands, the with-timer macro, the ui-theme defcustoms, the user-constants paths) that each want a focused pass rather than an unattended rename. --- tests/test-system-defaults-functions.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/test-system-defaults-functions.el') diff --git a/tests/test-system-defaults-functions.el b/tests/test-system-defaults-functions.el index 2562ff6aa..c603fc7eb 100644 --- a/tests/test-system-defaults-functions.el +++ b/tests/test-system-defaults-functions.el @@ -9,7 +9,7 @@ ;; cj/minibuffer-setup-hook -- inflate gc-cons-threshold while ;; typing in the minibuffer ;; cj/minibuffer-exit-hook -- restore gc-cons-threshold on exit -;; unpropertize-kill-ring -- strip text properties from +;; cj/--unpropertize-kill-ring -- strip text properties from ;; kill-ring at shutdown ;; cj/log-comp-warning -- route native-comp warnings to a ;; file rather than the *Warnings* @@ -79,13 +79,13 @@ (should (eq (cj/disabled) nil)) (should (commandp #'cj/disabled))) -;;; unpropertize-kill-ring +;;; cj/--unpropertize-kill-ring (ert-deftest test-system-defaults-unpropertize-kill-ring-strips-properties () "Normal: every kill-ring entry comes back with no text properties." (let ((kill-ring (list (propertize "alpha" 'face 'bold) (propertize "beta" 'face 'underline)))) - (unpropertize-kill-ring) + (cj/--unpropertize-kill-ring) (should (equal kill-ring '("alpha" "beta"))) (should-not (text-properties-at 0 (nth 0 kill-ring))) (should-not (text-properties-at 0 (nth 1 kill-ring))))) @@ -93,7 +93,7 @@ (ert-deftest test-system-defaults-unpropertize-kill-ring-boundary-empty-ring () "Boundary: an empty `kill-ring' stays empty after the strip pass." (let ((kill-ring nil)) - (unpropertize-kill-ring) + (cj/--unpropertize-kill-ring) (should (null kill-ring)))) ;;; cj/log-comp-warning -- cgit v1.2.3