emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 7828d56 2/2: Merge branch 'master' of git.savannah.gnu.org:/srv/g


From: Eli Zaretskii
Subject: master 7828d56 2/2: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Date: Mon, 17 May 2021 08:19:48 -0400 (EDT)

branch: master
commit 7828d561c1a75ed9044fe435976250ba7680c879
Merge: 7b82584 e477b5e
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
---
 lisp/emacs-lisp/bytecomp.el          |  2 +-
 lisp/emacs-lisp/cl-macs.el           |  5 +++--
 lisp/emacs-lisp/ert-x.el             |  2 +-
 lisp/emacs-lisp/gv.el                |  2 +-
 lisp/emacs-lisp/nadvice.el           |  2 +-
 lisp/emacs-lisp/package.el           |  5 ++++-
 lisp/emacs-lisp/thunk.el             |  2 +-
 lisp/info-xref.el                    |  2 +-
 lisp/subr.el                         |  8 ++++----
 lisp/vc/vc-dispatcher.el             |  2 +-
 test/lisp/progmodes/project-tests.el | 25 +++++++++++++++++++++++++
 11 files changed, 43 insertions(+), 14 deletions(-)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 114c264..86c5d32 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1758,7 +1758,7 @@ It is too wide if it has any lines longer than the 
largest of
                overriding-plist-environment)))))
 
 (defmacro displaying-byte-compile-warnings (&rest body)
-  (declare (debug t))
+  (declare (debug (def-body)))
   `(let* ((--displaying-byte-compile-warnings-fn (lambda () ,@body))
          (warning-series-started
           (and (markerp warning-series)
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index d7e6c30..283c5e4 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -1924,7 +1924,8 @@ from OBARRAY.
 
 \(fn (VAR [OBARRAY [RESULT]]) BODY...)"
   (declare (indent 1)
-           (debug ((symbolp &optional form form) cl-declarations body)))
+           (debug ((symbolp &optional form form) cl-declarations
+                   def-body)))
   ;; Apparently this doesn't have an implicit block.
   `(cl-block nil
      (let (,(car spec))
@@ -1964,7 +1965,7 @@ Each symbol in the first list is bound to the 
corresponding value in the
 second list (or to nil if VALUES is shorter than SYMBOLS); then the
 BODY forms are executed and their result is returned.  This is much like
 a `let' form, except that the list of symbols can be computed at run-time."
-  (declare (indent 2) (debug (form form body)))
+  (declare (indent 2) (debug (form form def-body)))
   (let ((bodyfun (make-symbol "body"))
         (binds (make-symbol "binds"))
         (syms (make-symbol "syms"))
diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el
index 1191fb8..59ec4d2 100644
--- a/lisp/emacs-lisp/ert-x.el
+++ b/lisp/emacs-lisp/ert-x.el
@@ -98,7 +98,7 @@ To be used in ERT tests.  If BODY finishes successfully, the 
test
 buffer is killed; if there is an error, the test buffer is kept
 around on error for further inspection.  Its name is derived from
 the name of the test and the result of NAME-FORM."
-  (declare (debug ((":name" form) body))
+  (declare (debug ((":name" form) def-body))
            (indent 1))
   `(ert--call-with-test-buffer ,name-form (lambda () ,@body)))
 
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index ce48e57..f08f7ac 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -135,7 +135,7 @@ The returned value will then be an Elisp expression that 
first evaluates
 all the parts of PLACE that can be evaluated and then runs E.
 
 \(fn (GETTER SETTER) PLACE &rest BODY)"
-  (declare (indent 2) (debug (sexp form body)))
+  (declare (indent 2) (debug (sexp form def-body)))
   `(gv-get ,place (lambda ,vars ,@body)))
 
 ;; Different ways to declare a generalized variable.
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el
index bf3e944..4804e85 100644
--- a/lisp/emacs-lisp/nadvice.el
+++ b/lisp/emacs-lisp/nadvice.el
@@ -503,7 +503,7 @@ arguments.  Note if NAME is nil the advice is anonymous;
 otherwise it is named `SYMBOL@NAME'.
 
 \(fn SYMBOL (WHERE LAMBDA-LIST &optional NAME DEPTH) &rest BODY)"
-  (declare (indent 2) (doc-string 3) (debug (sexp sexp body)))
+  (declare (indent 2) (doc-string 3) (debug (sexp sexp def-body)))
   (or (listp args) (signal 'wrong-type-argument (list 'listp args)))
   (or (<= 2 (length args) 4)
       (signal 'wrong-number-of-arguments (list 2 4 (length args))))
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index b68ebfb..5df9b53 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1305,7 +1305,10 @@ is non-nil, don't propagate connection errors (does not 
apply to
 errors signaled by ERROR-FORM or by BODY).
 
 \(fn URL &key ASYNC FILE ERROR-FORM NOERROR &rest BODY)"
-  (declare (indent defun) (debug t))
+  (declare (indent defun)
+           ;; FIXME: This should be something like
+           ;; `form def-body &rest form', but that doesn't work.
+           (debug (form &rest sexp)))
   (while (keywordp (car body))
     (setq body (cdr (cdr body))))
   `(package--with-response-buffer-1 ,url (lambda () ,@body)
diff --git a/lisp/emacs-lisp/thunk.el b/lisp/emacs-lisp/thunk.el
index 83e0fa7..7e349d2 100644
--- a/lisp/emacs-lisp/thunk.el
+++ b/lisp/emacs-lisp/thunk.el
@@ -52,7 +52,7 @@
 
 (defmacro thunk-delay (&rest body)
   "Delay the evaluation of BODY."
-  (declare (debug t))
+  (declare (debug (def-body)))
   (cl-assert lexical-binding)
   `(let (forced
          (val (lambda () ,@body)))
diff --git a/lisp/info-xref.el b/lisp/info-xref.el
index be1928d..538a017 100644
--- a/lisp/info-xref.el
+++ b/lisp/info-xref.el
@@ -95,7 +95,7 @@ about local variables or possible weirdness in a major mode.
 `lm-with-file' does a similar thing, but it sets
 `emacs-lisp-mode' which is not wanted here."
 
-  (declare (debug t) (indent 1))
+  (declare (debug (form def-body)) (indent 1))
   `(let* ((info-xref-with-file--filename ,filename)
           (info-xref-with-file--body     (lambda () ,@body))
           (info-xref-with-file--existing
diff --git a/lisp/subr.el b/lisp/subr.el
index 7a055f2..82c2d22 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2030,7 +2030,7 @@ FUN is then called once."
 
 (defmacro subr--with-wrapper-hook-no-warnings (hook args &rest body)
   "Like (with-wrapper-hook HOOK ARGS BODY), but without warnings."
-  (declare (debug (form sexp body)))
+  (declare (debug (form sexp def-body)))
   ;; We need those two gensyms because CL's lexical scoping is not available
   ;; for function arguments :-(
   (let ((funs (make-symbol "funs"))
@@ -3951,7 +3951,7 @@ If you quit, the process is killed with SIGINT, or 
SIGKILL if you quit again."
 Within a `track-mouse' form, mouse motion generates input events that
  you can read with `read-event'.
 Normally, mouse motion is ignored."
-  (declare (debug t) (indent 0))
+  (declare (debug (def-body)) (indent 0))
   `(internal--track-mouse (lambda () ,@body)))
 
 (defmacro with-current-buffer (buffer-or-name &rest body)
@@ -4455,7 +4455,7 @@ change `before-change-functions' or 
`after-change-functions'.
 Additionally, the buffer modifications of BODY are recorded on
 the buffer's undo list as a single \(apply ...) entry containing
 the function `undo--wrap-and-run-primitive-undo'."
-  (declare (debug t) (indent 2))
+  (declare (debug (form form def-body)) (indent 2))
   `(combine-change-calls-1 ,beg ,end (lambda () ,@body)))
 
 (defun undo--wrap-and-run-primitive-undo (beg end list)
@@ -5046,7 +5046,7 @@ See also `with-eval-after-load'."
 FILE is normally a feature name, but it can also be a file name,
 in case that file does not provide any feature.  See `eval-after-load'
 for more details about the different forms of FILE and their semantics."
-  (declare (indent 1) (debug t))
+  (declare (indent 1) (debug (form def-body)))
   `(eval-after-load ,file (lambda () ,@body)))
 
 (defvar after-load-functions nil
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index 87ca542..c294586 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -254,7 +254,7 @@ CODE should be a function of no arguments."
   nil)
 
 (defmacro vc-run-delayed (&rest body)
-  (declare (indent 0) (debug t))
+  (declare (indent 0) (debug (def-body)))
   `(vc-exec-after (lambda () ,@body)))
 
 (defvar vc-post-command-functions nil
diff --git a/test/lisp/progmodes/project-tests.el 
b/test/lisp/progmodes/project-tests.el
index c8c03aa..68460a9 100644
--- a/test/lisp/progmodes/project-tests.el
+++ b/test/lisp/progmodes/project-tests.el
@@ -82,4 +82,29 @@ quoted directory names (Bug#47799)."
            (ert-fail (format-message "Unexpected references: %S"
                                      otherwise))))))))
 
+(cl-defstruct project-tests--trivial root ignores)
+
+(cl-defmethod project-root ((project project-tests--trivial))
+  (project-tests--trivial-root project))
+
+(cl-defmethod project-ignores ((project project-tests--trivial) _dir)
+  (project-tests--trivial-ignores project))
+
+(ert-deftest project-ignores ()
+  "Check that `project-files' correctly ignores the files
+returned by `project-ignores' if the root directory is a
+directory name (Bug#48471)."
+  (skip-unless (executable-find find-program))
+  (project-tests--with-temporary-directory dir
+    (make-empty-file (expand-file-name "some-file" dir))
+    (make-empty-file (expand-file-name "ignored-file" dir))
+    (let* ((project (make-project-tests--trivial
+                     :root (file-name-as-directory dir)
+                     :ignores '("./ignored-file")))
+           (files (project-files project))
+           (relative-files
+            (cl-loop for file in files
+                     collect (file-relative-name file dir))))
+      (should (equal relative-files '("some-file"))))))
+
 ;;; project-tests.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]