Polish package management system; no infinite recursion; smarter autoload refresh
This commit is contained in:
parent
70a1fb52cc
commit
e80df3c03c
4 changed files with 122 additions and 84 deletions
|
@ -60,14 +60,15 @@ If HOOK is omitted, then default to `__PACKAGE__' to determine HOOK."
|
|||
(-list hook)))))
|
||||
funcs))))
|
||||
|
||||
(defmacro associate! (mode &rest rest)
|
||||
(defmacro associate! (&rest rest)
|
||||
"Associate a major or minor mode to certain patterns and project files."
|
||||
(declare (indent 1))
|
||||
(let ((minor (plist-get rest :minor))
|
||||
(in (plist-get rest :in))
|
||||
(match (plist-get rest :match))
|
||||
(files (plist-get rest :files))
|
||||
(pred (plist-get rest :when)))
|
||||
(let* ((mode (if (keywordp (car rest)) __PACKAGE__ (pop rest)))
|
||||
(minor (plist-get rest :minor))
|
||||
(in (plist-get rest :in))
|
||||
(match (plist-get rest :match))
|
||||
(files (plist-get rest :files))
|
||||
(pred (plist-get rest :when)))
|
||||
(cond ((or files in pred)
|
||||
(when (and files (not (or (listp files) (stringp files))))
|
||||
(user-error "associate! :files expects a string or list of strings"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue