[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master c6d70f8 1/6: Merge from origin/emacs-27
From: |
Glenn Morris |
Subject: |
master c6d70f8 1/6: Merge from origin/emacs-27 |
Date: |
Sun, 3 May 2020 10:55:21 -0400 (EDT) |
branch: master
commit c6d70f890cee2f5a561dcea0a5ef2de0cbbf1baf
Merge: 5f516dc 1f17193
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
Merge from origin/emacs-27
1f17193e00 Expand file name for remote dirs as well
7a12ab5ea2 Fix project.el commands in "transient" projects
274ec97e3c Make sure alist-related functions say so in their doc
---
lisp/progmodes/project.el | 36 ++++++++++++++++--------------
src/fns.c | 56 +++++++++++++++++++++++------------------------
2 files changed, 47 insertions(+), 45 deletions(-)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 1f4cbe9..f5f4092 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -185,23 +185,25 @@ to find the list of ignores for each directory."
(require 'find-dired)
(require 'xref)
(defvar find-name-arg)
- (let ((default-directory dir)
- (command (format "%s %s %s -type f %s -print0"
- find-program
- (file-local-name dir)
- (xref--find-ignores-arguments
- ignores
- (expand-file-name dir))
- (if files
- (concat (shell-quote-argument "(")
- " " find-name-arg " "
- (mapconcat
- #'shell-quote-argument
- (split-string files)
- (concat " -o " find-name-arg " "))
- " "
- (shell-quote-argument ")"))"")
- )))
+ (let* ((default-directory dir)
+ ;; Make sure ~/ etc. in local directory name is
+ ;; expanded and not left for the shell command
+ ;; to interpret.
+ (localdir (file-local-name (expand-file-name dir)))
+ (command (format "%s %s %s -type f %s -print0"
+ find-program
+ localdir
+ (xref--find-ignores-arguments ignores localdir)
+ (if files
+ (concat (shell-quote-argument "(")
+ " " find-name-arg " "
+ (mapconcat
+ #'shell-quote-argument
+ (split-string files)
+ (concat " -o " find-name-arg " "))
+ " "
+ (shell-quote-argument ")"))"")
+ )))
(project--remote-file-names
(sort (split-string (shell-command-to-string command) "\0" t)
#'string<))))
diff --git a/src/fns.c b/src/fns.c
index ec0004d..d6808aa 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1593,16 +1593,16 @@ The value is actually the tail of LIST whose car is
ELT. */)
}
DEFUN ("assq", Fassq, Sassq, 2, 2, 0,
- doc: /* Return non-nil if KEY is `eq' to the car of an element of LIST.
-The value is actually the first element of LIST whose car is KEY.
-Elements of LIST that are not conses are ignored. */)
- (Lisp_Object key, Lisp_Object list)
+ doc: /* Return non-nil if KEY is `eq' to the car of an element of ALIST.
+The value is actually the first element of ALIST whose car is KEY.
+Elements of ALIST that are not conses are ignored. */)
+ (Lisp_Object key, Lisp_Object alist)
{
- Lisp_Object tail = list;
+ Lisp_Object tail = alist;
FOR_EACH_TAIL (tail)
if (CONSP (XCAR (tail)) && EQ (XCAR (XCAR (tail)), key))
return XCAR (tail);
- CHECK_LIST_END (tail, list);
+ CHECK_LIST_END (tail, alist);
return Qnil;
}
@@ -1610,22 +1610,22 @@ Elements of LIST that are not conses are ignored. */)
Use only on objects known to be non-circular lists. */
Lisp_Object
-assq_no_quit (Lisp_Object key, Lisp_Object list)
+assq_no_quit (Lisp_Object key, Lisp_Object alist)
{
- for (; ! NILP (list); list = XCDR (list))
- if (CONSP (XCAR (list)) && EQ (XCAR (XCAR (list)), key))
- return XCAR (list);
+ for (; ! NILP (alist); alist = XCDR (alist))
+ if (CONSP (XCAR (alist)) && EQ (XCAR (XCAR (alist)), key))
+ return XCAR (alist);
return Qnil;
}
DEFUN ("assoc", Fassoc, Sassoc, 2, 3, 0,
- doc: /* Return non-nil if KEY is equal to the car of an element of LIST.
-The value is actually the first element of LIST whose car equals KEY.
+ doc: /* Return non-nil if KEY is equal to the car of an element of
ALIST.
+The value is actually the first element of ALIST whose car equals KEY.
Equality is defined by TESTFN if non-nil or by `equal' if nil. */)
- (Lisp_Object key, Lisp_Object list, Lisp_Object testfn)
+ (Lisp_Object key, Lisp_Object alist, Lisp_Object testfn)
{
- Lisp_Object tail = list;
+ Lisp_Object tail = alist;
FOR_EACH_TAIL (tail)
{
Lisp_Object car = XCAR (tail);
@@ -1636,7 +1636,7 @@ Equality is defined by TESTFN if non-nil or by `equal' if
nil. */)
: !NILP (call2 (testfn, XCAR (car), key))))
return car;
}
- CHECK_LIST_END (tail, list);
+ CHECK_LIST_END (tail, alist);
return Qnil;
}
@@ -1645,11 +1645,11 @@ Equality is defined by TESTFN if non-nil or by `equal'
if nil. */)
that are not too deep and are not window configurations. */
Lisp_Object
-assoc_no_quit (Lisp_Object key, Lisp_Object list)
+assoc_no_quit (Lisp_Object key, Lisp_Object alist)
{
- for (; ! NILP (list); list = XCDR (list))
+ for (; ! NILP (alist); alist = XCDR (alist))
{
- Lisp_Object car = XCAR (list);
+ Lisp_Object car = XCAR (alist);
if (CONSP (car)
&& (EQ (XCAR (car), key) || equal_no_quit (XCAR (car), key)))
return car;
@@ -1658,24 +1658,24 @@ assoc_no_quit (Lisp_Object key, Lisp_Object list)
}
DEFUN ("rassq", Frassq, Srassq, 2, 2, 0,
- doc: /* Return non-nil if KEY is `eq' to the cdr of an element of LIST.
-The value is actually the first element of LIST whose cdr is KEY. */)
- (Lisp_Object key, Lisp_Object list)
+ doc: /* Return non-nil if KEY is `eq' to the cdr of an element of ALIST.
+The value is actually the first element of ALIST whose cdr is KEY. */)
+ (Lisp_Object key, Lisp_Object alist)
{
- Lisp_Object tail = list;
+ Lisp_Object tail = alist;
FOR_EACH_TAIL (tail)
if (CONSP (XCAR (tail)) && EQ (XCDR (XCAR (tail)), key))
return XCAR (tail);
- CHECK_LIST_END (tail, list);
+ CHECK_LIST_END (tail, alist);
return Qnil;
}
DEFUN ("rassoc", Frassoc, Srassoc, 2, 2, 0,
- doc: /* Return non-nil if KEY is `equal' to the cdr of an element of
LIST.
-The value is actually the first element of LIST whose cdr equals KEY. */)
- (Lisp_Object key, Lisp_Object list)
+ doc: /* Return non-nil if KEY is `equal' to the cdr of an element of
ALIST.
+The value is actually the first element of ALIST whose cdr equals KEY. */)
+ (Lisp_Object key, Lisp_Object alist)
{
- Lisp_Object tail = list;
+ Lisp_Object tail = alist;
FOR_EACH_TAIL (tail)
{
Lisp_Object car = XCAR (tail);
@@ -1683,7 +1683,7 @@ The value is actually the first element of LIST whose cdr
equals KEY. */)
&& (EQ (XCDR (car), key) || !NILP (Fequal (XCDR (car), key))))
return car;
}
- CHECK_LIST_END (tail, list);
+ CHECK_LIST_END (tail, alist);
return Qnil;
}
- master updated (5f516dc -> 4c1a28b), Glenn Morris, 2020/05/03
- master f696dc8 2/6: ; Merge from origin/emacs-27, Glenn Morris, 2020/05/03
- master c6d70f8 1/6: Merge from origin/emacs-27,
Glenn Morris <=
- master 76cf14f 3/6: Merge from origin/emacs-27, Glenn Morris, 2020/05/03
- master 8b4a61d 4/6: ; Merge from origin/emacs-27, Glenn Morris, 2020/05/03
- master 99a544c 5/6: Merge from origin/emacs-27, Glenn Morris, 2020/05/03
- master 4c1a28b 6/6: ; Merge from origin/emacs-27, Glenn Morris, 2020/05/03