]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/lisp/use-package/use-package-tests.el: Remove some cruft.
authorEshel Yaron <me@eshelyaron.com>
Thu, 22 Aug 2024 05:48:20 +0000 (07:48 +0200)
committerEshel Yaron <me@eshelyaron.com>
Thu, 22 Aug 2024 05:48:20 +0000 (07:48 +0200)
test/lisp/use-package/use-package-tests.el

index 76de29be471a5fb6c5155ef6f3a81cf134bac2ff..90d9be308b2d140b7aefc3a68bda8b33e7a67514 100644 (file)
   `(should (pcase (expand-minimally ,form)
              ,@(mapcar #'(lambda (x) (list x t)) value))))
 
-(defun fix-expansion ()
-  (interactive)
-  (save-excursion
-    (unless (looking-at "(match-expansion")
-      (backward-up-list))
-    (when (looking-at "(match-expansion")
-      (re-search-forward "(\\(use-package\\|bind-key\\)")
-      (goto-char (match-beginning 0))
-      (let ((decl (read (current-buffer))))
-        (kill-sexp)
-        (let (vars)
-          (catch 'exit
-            (save-excursion
-              (while (ignore-errors (backward-up-list) t)
-                (when (looking-at "(let\\s-+")
-                  (goto-char (match-end 0))
-                  (setq vars (read (current-buffer)))
-                  (throw 'exit t)))))
-          (eval
-           `(let (,@ (append vars
-                             '((use-package-verbose 'errors)
-                               (use-package-expand-minimally t))))
-              (insert ?\n ?\` (pp-to-string (macroexpand-1 decl))))))))))
-
-(bind-key "C-c C-u" #'fix-expansion emacs-lisp-mode-map)
-
 (ert-deftest use-package-test-recognize-function ()
   (should (use-package-recognize-function nil t))
   (should-not (use-package-recognize-function nil))