aboutsummaryrefslogtreecommitdiff
path: root/modules/local-repository.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-29 04:19:31 -0400
committerCraig Jennings <c@cjennings.net>2026-06-29 04:19:31 -0400
commit256027866f9ff2cbc3b6155950f21a92b54ea307 (patch)
treee63cd2b63bfbd8f893313e5a900710c353e905e9 /modules/local-repository.el
parent8c91731f5ba177d9f0f7c078576ddd91c606ed7c (diff)
downloaddotemacs-256027866f9ff2cbc3b6155950f21a92b54ea307.tar.gz
dotemacs-256027866f9ff2cbc3b6155950f21a92b54ea307.zip
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.
Diffstat (limited to 'modules/local-repository.el')
-rw-r--r--modules/local-repository.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/local-repository.el b/modules/local-repository.el
index a9df09d38..e3c7a227a 100644
--- a/modules/local-repository.el
+++ b/modules/local-repository.el
@@ -24,7 +24,7 @@
;; ------------------------------ Utility Function -----------------------------
-(defun car-member (value list)
+(defun localrepo--car-member (value list)
"Check if VALUE exists as the car of any cons cell in LIST."
(member value (mapcar #'car list)))
@@ -65,11 +65,11 @@ keep them in source control."
(defun localrepo-initialize ()
"Add the repository to the package archives, then gives it a high priority."
- (unless (car-member localrepo-repository-id package-archives)
+ (unless (localrepo--car-member localrepo-repository-id package-archives)
(add-to-list 'package-archives
(cons localrepo-repository-id localrepo-repository-location)))
- (unless (car-member localrepo-repository-id package-archive-priorities)
+ (unless (localrepo--car-member localrepo-repository-id package-archive-priorities)
(add-to-list 'package-archive-priorities
(cons localrepo-repository-id localrepo-repository-priority))))