From: Stefan Kangas Date: Fri, 10 Jun 2022 06:17:35 +0000 (+0200) Subject: Merge from origin/emacs-28 X-Git-Tag: emacs-29.0.90~1910^2~114 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=17666093097d58466e9581b9ff1d07ec5e3eeebf;p=emacs.git Merge from origin/emacs-28 d02c94090c Fix error reporting in process-async-https-with-delay 9a4862a973 * doc/misc/org.org: Remove spurious markup. 768ed1476a Make Tramp version check more robust 7f778c6943 Fix debugging with GDB when a breakpoint has multiple loca... 25e53e9391 ; * lisp/files.el (file-expand-wildcards): Doc fix. 3ea9357d10 Update documentation of 'aset' and 'store-substring' # Conflicts: # lisp/files.el --- 17666093097d58466e9581b9ff1d07ec5e3eeebf diff --cc lisp/files.el index a505f62af81,ea57f02ac03..5f4c4fa0176 --- a/lisp/files.el +++ b/lisp/files.el @@@ -7223,24 -7108,16 +7223,25 @@@ by `sh' are supported. :type 'string :group 'dired) -(defun file-expand-wildcards (pattern &optional full) +(defun file-expand-wildcards (pattern &optional full regexp) - "Expand wildcard pattern PATTERN. - This returns a list of file names that match the pattern. + "Expand (a.k.a. \"glob\") file-name wildcard pattern PATTERN. + This returns a list of file names that match PATTERN. + The returned list of file names is sorted in the `string<' order. -If PATTERN is written as an absolute file name, -the expansions in the returned list are also absolute. +PATTERN is, by default, a \"glob\"/wildcard string, e.g., +\"/tmp/*.png\" or \"/*/*/foo.png\", but can also be a regular +expression if the optional REGEXP parameter is non-nil. In any +case, the matches are applied per sub-directory, so a match can't +span a parent/sub directory, which means that a regexp bit can't +contain the \"/\" character. + - The list of files returned are sorted in `string<' order. ++The returned list of file names is sorted in the `string<' order. + - If PATTERN is written as an absolute file name, the values are - absolute also. ++If PATTERN is written as an absolute file name, the expansions in ++the returned list are also absolute. If PATTERN is written as a relative file name, it is interpreted - relative to the current default directory, `default-directory'. + relative to the current `default-directory'. The file names returned are normally also relative to the current default directory. However, if FULL is non-nil, they are absolute." (save-match-data