From 5cb869c8a3b44ce0d30a8e72366a392af0e2e5a2 Mon Sep 17 00:00:00 2001 From: dickmao Date: Thu, 5 Aug 2021 12:02:52 -0400 Subject: [PATCH] Fix warnings * test/lisp/ffap-tests.el (ffap-ido-mode): Fix warnings. --- test/lisp/ffap-tests.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/lisp/ffap-tests.el b/test/lisp/ffap-tests.el index 4fb4c90e76..f8113bffc1 100644 --- a/test/lisp/ffap-tests.el +++ b/test/lisp/ffap-tests.el @@ -127,13 +127,17 @@ ffap-ido-mode (require 'ido) (with-temp-buffer (let ((ido-mode t) - (read-filename-function read-file-name-function) + (read-file-name-function read-file-name-function) (read-buffer-function read-buffer-function)) - (ido-everywhere) + ;; Says ert-deftest: + ;; Macros in BODY are expanded when the test is defined, not when it + ;; is run. If a macro (possibly with side effects) is to be tested, + ;; it has to be wrapped in `(eval (quote ...))'. + (eval (quote (ido-everywhere))) (let ((read-file-name-function (lambda (&rest args) - (expand-file-name - (nth 4 args) - (nth 1 args))))) + (expand-file-name + (nth 4 args) + (nth 1 args))))) (save-excursion (insert "ffap-tests.el")) (let (kill-buffer-query-functions) (kill-buffer (call-interactively #'find-file-at-point))))))) -- 2.26.2