;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:40:14 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/eshell/em-glob.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`em-glob.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\302\303\304\305\306\307\310\311&\207" [provide em-glob custom-declare-group eshell-glob nil "This module provides extended globbing syntax, similar what is used\nby zsh for filename generation." :tag "Extended filename globbing" :group eshell-module] 8)
#@59 *A list of functions to run when `eshell-glob' is loaded.
(custom-declare-variable 'eshell-glob-load-hook ''(eshell-glob-initialize) '(#$ . -904) :type 'hook :group 'eshell-glob)
#@67 *If non-nil, glob patterns will match files beginning with a dot.
(custom-declare-variable 'eshell-glob-include-dot-files 'nil '(#$ . -1089) :type 'boolean :group 'eshell-glob)
#@64 *If non-nil, glob patterns that match dots will match . and ..
(custom-declare-variable 'eshell-glob-include-dot-dot 't '(#$ . -1272) :type 'boolean :group 'eshell-glob)
#@54 *If non-nil, glob pattern matching will ignore case.
(custom-declare-variable 'eshell-glob-case-insensitive '(eshell-under-windows-p) '(#$ . -1448) :type 'boolean :group 'eshell-glob)
#@130 *If non-nil, display progress messages during a recursive glob.
This option slows down recursive glob processing by quite a bit.
(custom-declare-variable 'eshell-glob-show-progress 'nil '(#$ . -1639) :type 'boolean :group 'eshell-glob)
#@123 *If non-nil, it is an error for a glob pattern not to match.
 This mimcs the behavior of zsh if non-nil, but bash if nil.
(custom-declare-variable 'eshell-error-if-no-glob 'nil '(#$ . -1882) :type 'boolean :group 'eshell-glob)
#@59 *List of additional characters used in extended globbing.
(custom-declare-variable 'eshell-glob-chars-list ''(93 91 42 63 126 40 41 124 35) '(#$ . -2115) :type '(repeat character) :group 'eshell-glob)
#@60 *An alist for translation of extended globbing characters.
(custom-declare-variable 'eshell-glob-translate-alist ''((93 . "]") (91 . "[") (63 . ".") (42 . ".*") (126 . "~") (40 . "\\(") (41 . "\\)") (124 . "\\|") (35 lambda (str pos) (if (and (< (1+ pos) (length str)) (memq (aref str (1+ pos)) '(42 35 43 63))) (cons (if (eq (aref str (1+ pos)) 63) "?" (if (eq (aref str (1+ pos)) 42) "*" "+")) (+ pos 2)) (cons "*" (1+ pos))))) '(#$ . -2322) :type '(repeat (cons character (choice regexp function))) :group 'eshell-glob)
(byte-code "\301B\302\301!\204\f \303\303\207" [current-load-list eshell-glob-chars-regexp boundp nil] 2)
#@40 Initialize the extended globbing code.
(defalias 'eshell-glob-initialize #[nil "\302\301!\303	\"L\210\302\304!\305\306\307\310\"\"L\210\311\312!\210\313\312\314\315\211$\210\311\316!\210\313\316\317\320\315$\207" [eshell-glob-chars-list eshell-special-chars-outside-quoting make-local-variable append eshell-glob-chars-regexp format "[%s]+" apply string make-local-hook eshell-parse-argument-hook add-hook eshell-parse-glob-chars t eshell-pre-rewrite-command-hook eshell-no-command-globbing nil] 6 (#$ . 2960)])
#@68 Don't glob the command argument.  Reflect this by modifying TERMS.
(defalias 'eshell-no-command-globbing #[(terms) "\302@<\205 \211@@)\303=\205 \211@\211A@)\240!\207" [terms x ignore eshell-extended-glob] 4 (#$ . 3480)])
#@59 Add `eshell-extended-glob' to the argument modifier list.
(defalias 'eshell-add-glob-modifier #[nil "\301>\203 \302\301\"\303\300\304\"\210\303\300\305\"\207" [eshell-current-modifiers expand-file-name delq add-to-list (lambda (list) (if (listp list) (mapcar 'expand-file-name list) (expand-file-name list))) eshell-extended-glob] 3 (#$ . 3714)])
#@175 Parse a globbing delimiter.
The character is not advanced for ordinary globbing characters, so
that other function may have a chance to override the globbing
interpretation.
(defalias 'eshell-parse-glob-chars #[nil "\306f>\205o \306f\307>\204 \310\311 !\207`\306u\210`Sf\312\n\211\313=\203( \314\202) \315\"\211\2046 \316\317\n\"\202n \320\320>)\203a T\211\206H `\211dU\206V f>*\203a \310	b!\202n \311 \210\321`ST\"Tb\210+\207" [eshell-glob-chars-list here delim end module eshell-modules-list nil (40 91) ignore eshell-add-glob-modifier eshell-find-delimiter 91 93 41 throw eshell-incomplete eshell-pred buffer-substring-no-properties pos eshell-delimiter-argument-list] 5 (#$ . 4072)])
#@720 Convert glob-pattern PATTERN to a regular expression.
The basic syntax is:

  glob  regexp   meaning
  ----  ------   -------
  ?      .       matches any single character
  *      .*      matches any group of characters (or none)
  #      *       matches zero or more occurrences of preceding
  ##     +       matches one or more occurrences of preceding
  (x)    (x)   makes 'x' a regular expression group
  |      |      boolean OR within an expression group
  [a-b]  [a-b]   matches a character or range
  [^a]   [^a]    excludes a character or range

If any characters in PATTERN have the text property `eshell-escaped'
set to true, then these characters will match themselves in the
resulting regular expression.
(defalias 'eshell-glob-regexp #[(pattern) "\306\307\310\n	#\203o \306\224\fH\311	\fO!P\312\f\313#\2032 \311\314!!P\fT\202k \236\211\204D \315\316\"\210\202j A;\203W AP\fT\202j A\f\"@PA))*\202 \317\311	\307O!\320R*\207" [regexp matched-in-pattern eshell-glob-chars-regexp pattern op-begin op-char 0 nil string-match regexp-quote get-text-property escaped char-to-string error "Unrecognized globbing character '%c'" "\\`" "\\'" eshell-glob-translate-alist xlat result] 7 (#$ . 4785)])
#@677 Return a list of files generated from GLOB, perhaps looking for DIRS-ONLY.
 This function almost fully supports zsh style filename generation
 syntax.  Things that are not supported are:

   ^foo        for matching everything but foo
   (foo~bar)   tilde within a parenthesis group
   foo<1-10>   numeric ranges
   foo~x(a|b)  (a|b) will be interpreted as a predicate/modifier list

 Mainly they are not supported because file matching is done with Emacs
 regular expressions, and these cannot support the above constructs.

 If this routine fails, it returns nil.  Otherwise, it returns a list
 the form:

   (INCLUDE-REGEXP EXCLUDE-REGEXP (PRED-FUNC-LIST) (MOD-FUNC-LIST))
(defalias 'eshell-extended-glob #[(glob) "\306!\307\211\211\310\216\fA\203$ \311\f@!\203$ \312\313\f@!\fA\"\210\202+ \312\313\314!\f\"\210)\2035 \237\206A \203@ \315\316\"\202A ,\207" [glob ange-cache message-shown matches paths eshell-error-if-no-glob eshell-split-path nil ((byte-code "\203 \301\302!\210\302\207" [message-shown message nil] 2)) file-name-absolute-p eshell-glob-entries file-name-as-directory "." error "No matches found: %s"] 4 (#$ . 6036)])
#@72 Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil.
(defalias 'eshell-glob-entries #[(path globs &optional recurse-p) "\306\307\310\217	@\211G\311'\311(\311)\311*\311+\311,\311-\312U\203> \f\313\232\203> \314.A\211@\211G\211\202W \315U\203Z \f\316\232\203Z \312.A\211@\211G\211\204\" .\203g \f\204g \317\320!\210\321/\f))\f=\203\253 \322\323\f/#\211/\203\253 \324/\325\f#\204\221 /TU\203\231 /T/\202m \f\326/O)\f/T\311O*\202m ))GS)H0=\203\302 )\326O)*\203\335 *GS*H0=\203\335 *\326O*)\327)!)*\205\355 \327*!*1\204\374 \f\326H\330=\2032\204)A\204)*\203\331*\332Q\202\333*\202)*\203&\334*\332Q\202'\335*.\203?3\203?\336\3374G5#\210\34065\341\232\203I\3425\203\361@\211+G+SH0=,\343+!7*\205o\322*7\"?\205y\322)7\")\203\236A\203\224,\203\2365+P'B'\202\2365+P4B4.\203\352,\203\352\312V\204\310\314U\203\273+\341\232\204\352\312U\203\310+\344\232\204\3525+P\211-\203\352.\314U\203\343\345\343-!!\204\352-(B(A\211\204M'\237'(\237('\203\346'@A\"\210'A\211'\204 (\205)\346(@.#\210(A\211(\204\311.\207" [entries eshell-glob-case-insensitive case-fold-search globs glob len #1=#:G97287 (file-name-all-completions "" path) ((error)) nil 3 "**/" 2 4 "***/" error "'**' cannot end a globbing pattern" 1 string-match "~" get-text-property escaped 0 eshell-glob-regexp 46 "\\(\\`\\.\\.?\\'\\|" "\\)" "\\`\\.\\.?\\'" "\\(\\`\\.\\|" "\\`\\." message "Building file list...%d so far: %s" t "./" "" directory-file-name "../" file-symlink-p eshell-glob-entries dirs rdirs incl excl name isdir pathname recurse-p index directory-sep-char eshell-glob-include-dot-files eshell-glob-include-dot-dot eshell-glob-show-progress matches path message-shown fname] 5 (#$ . 7192)])
