diff --git a/package-lint-test.el b/package-lint-test.el index ca4bb79..e50c813 100644 --- a/package-lint-test.el +++ b/package-lint-test.el @@ -459,9 +459,11 @@ Alternatively, depend on (emacs \"24.3\") or greater, in which cl-lib is bundled (ert-deftest package-lint-test-error-new-compat-functions () (should (equal - '((6 1 error "You should depend on (emacs \"27.1\") or the compat package if you need `proper-list-p'.")) + '((6 1 error "You should depend on (emacs \"27.1\") or the compat package if you need `proper-list-p'.") + (7 1 error "You should depend on (emacs \"29.1\") or the compat package if you need `string-split'.")) (package-lint-test--run - "(proper-list-p '(foo))")))) + "(proper-list-p '(foo)) +\(string-split s)")))) (ert-deftest package-lint-test-accepts-new-functions-with-compat () (should @@ -469,7 +471,8 @@ Alternatively, depend on (emacs \"24.3\") or greater, in which cl-lib is bundled '() (package-lint-test--run ";; Package-Requires: ((compat \"29\")) -\(proper-list-p '(foo))")))) +\(proper-list-p '(foo)) +\(string-split s)")))) (ert-deftest package-lint-test-error-new-compat-macros () (should diff --git a/package-lint.el b/package-lint.el index fc227d7..3fbe302 100644 --- a/package-lint.el +++ b/package-lint.el @@ -182,7 +182,7 @@ symbol such as `variable-added'.") (insert-file-contents el-path) (goto-char (point-min)) (while (search-forward-regexp (rx line-start - "(compat-" (group (or "defun" "defmacro" "defvar")) + "(compat-" (group (or "defun" "defmacro" "defvar" "defalias")) (+ space) symbol-start (group (+? any)) @@ -190,7 +190,7 @@ symbol such as `variable-added'.") nil t) (pcase (match-string 1) ("defvar" (push (intern (match-string 2)) symbols)) - ((or "defun" "defmacro") (push (intern (match-string 2)) functions))))))) + ((or "defun" "defmacro" "defalias") (push (intern (match-string 2)) functions))))))) (cons symbols functions)) "A cons cell of (VARS . FUNCTIONS) supported by \"compat\".")