branch: elpa/package-lint commit 29ccfea319ee6bac4b80045aa473b3aa2b77d074 Merge: 2dc48e5fb9 f95523a12a Author: Steve Purcell <st...@sanityinc.com> Commit: GitHub <nore...@github.com>
Merge pull request #299 from purcell/fix-298 Handle compat-function, as for compat and compat-call --- data/compat-symbols | 2 +- package-lint-test.el | 7 +++++-- tools/compat-dump | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/data/compat-symbols b/data/compat-symbols index 6dfab1a0b5..766f561124 100644 --- a/data/compat-symbols +++ b/data/compat-symbols @@ -1 +1 @@ -((color-luminance-dark-limit completion-lazy-hilit completion-lazy-hilit-fn file-has-changed-p--hash-table gensym-counter lisp-directory major-mode--suspended mounted-file-systems mouse-select-region-move-to-beginning read-answer-short read-char-from-minibuffer-map read-char-from-minibuffer-map-hash read-char-history regexp-unmatchable set-transient-map-timeout set-transient-map-timer text-quoting-style trusted-content untrusted-content) add-display-text-property alist-get always and-let [...] \ No newline at end of file +((color-luminance-dark-limit completion-lazy-hilit completion-lazy-hilit-fn file-has-changed-p--hash-table gensym-counter lisp-directory major-mode--suspended mounted-file-systems mouse-select-region-move-to-beginning read-answer-short read-char-from-minibuffer-map read-char-from-minibuffer-map-hash read-char-history regexp-unmatchable set-transient-map-timeout set-transient-map-timer text-quoting-style trusted-content untrusted-content) add-display-text-property alist-get always and-let [...] \ No newline at end of file diff --git a/package-lint-test.el b/package-lint-test.el index 8bbb557b28..1453ddc4b2 100644 --- a/package-lint-test.el +++ b/package-lint-test.el @@ -490,13 +490,16 @@ Alternatively, depend on (emacs \"24.3\") or greater, in which cl-lib is bundled ";; Package-Requires: ((compat \"29\")) \(with-suppressed-warnings (foo))")))) -(ert-deftest package-lint-test-accepts-compat-call () +(ert-deftest package-lint-test-accepts-compat-call-etc () (should (equal '() (package-lint-test--run ";; Package-Requires: ((compat \"29\")) -\(compat-call 'foo)")))) +\(compat-call 'foo) +\(compat-function 'foo) +\(compat 'foo) +")))) (ert-deftest package-lint-test-accepts-compat-require () (should diff --git a/tools/compat-dump b/tools/compat-dump index c301bcb55c..e4d31ebc18 100755 --- a/tools/compat-dump +++ b/tools/compat-dump @@ -24,6 +24,7 @@ ((or "defun" "defmacro" "defalias") (push (match-string 2) functions)))))) (push "compat" functions) (push "compat-call" functions) + (push "compat-function" functions) (with-temp-buffer (insert (prin1-to-string (cons (mapcar #'intern (sort symbols #'string<)) (mapcar #'intern (sort functions #'string<)))))