• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/eshell/

Lines Matching +defs:eshell +defs:stringify +defs:list

29 (defgroup eshell-util nil
32 :group 'eshell)
40 (defcustom eshell-stringify-t t
46 :group 'eshell-util)
48 (defcustom eshell-group-file "/etc/group"
51 :group 'eshell-util)
53 (defcustom eshell-passwd-file "/etc/passwd"
56 :group 'eshell-util)
58 (defcustom eshell-hosts-file "/etc/hosts"
61 :group 'eshell-util)
63 (defcustom eshell-handle-errors t
67 :group 'eshell-util)
69 (defcustom eshell-private-file-modes 384 ; umask 177
72 :group 'eshell-util)
74 (defcustom eshell-private-directory-modes 448 ; umask 077
77 :group 'eshell-util)
79 (defcustom eshell-tar-regexp
83 :group 'eshell-util)
85 (defcustom eshell-convert-numeric-arguments t
88 `eshell-number-regexp'.
95 (put 'find-file 'eshell-no-numeric-conversions t)
97 Any function with the property `eshell-no-numeric-conversions' set to
99 argument matches `eshell-number-regexp'."
101 :group 'eshell-util)
103 (defcustom eshell-number-regexp "-?\\([0-9]*\\.\\)?[0-9]+\\(e[-0-9.]+\\)?"
105 If `eshell-convert-numeric-arguments' is non-nil, and an argument
109 :group 'eshell-util)
111 (defcustom eshell-ange-ls-uids nil
118 :group 'eshell-util)
122 (defvar eshell-group-names nil
125 (defvar eshell-group-timestamp nil
128 (defvar eshell-user-names nil
131 (defvar eshell-user-timestamp nil
134 (defvar eshell-host-names nil
137 (defvar eshell-host-timestamp nil
142 (defsubst eshell-under-xemacs-p ()
146 (defsubst eshell-under-windows-p ()
150 (defmacro eshell-condition-case (tag form &rest handlers)
151 "Like `condition-case', but only if `eshell-pass-through-errors' is nil."
152 (if eshell-handle-errors
158 (put 'eshell-condition-case 'lisp-indent-function 2)
160 (defmacro eshell-deftest (module name label &rest forms)
163 (let ((fsym (intern (concat "eshell-test--" (symbol-name name)))))
167 (eshell-run-test (quote ,module) (quote ,fsym) ,label
170 (put 'eshell-deftest 'lisp-indent-function 2)
172 (defun eshell-find-delimiter
219 (defun eshell-convert (string)
230 (if (and eshell-convert-numeric-arguments
232 (concat "\\`\\s-*" eshell-number-regexp
237 (defun eshell-sublist (l &optional n m)
239 If N or M is nil, it means the end of the list."
250 (defun eshell-split-path (path)
255 (if (and (eshell-under-windows-p)
269 (if (and (eshell-under-windows-p)
274 (defun eshell-to-flat-string (value)
276 (let ((text (eshell-stringify value)))
283 (defmacro eshell-for (for-var for-list &rest forms)
284 "Iterate through a list"
285 `(let ((list-iter ,for-list))
286 (while list-iter
287 (let ((,for-var (car list-iter)))
289 (setq list-iter (cdr list-iter)))))
291 (put 'eshell-for 'lisp-indent-function 2)
293 (defun eshell-flatten-list (args)
295 (let ((new-list (list t)))
296 (eshell-for a args
299 (nconc new-list (eshell-flatten-list a))
300 (nconc new-list (list a))))
301 (cdr new-list)))
303 (defun eshell-uniqify-list (l)
314 (defun eshell-stringify (object)
326 (not eshell-stringify-t))
329 (defsubst eshell-stringify-list (args)
331 (mapcar 'eshell-stringify args))
333 (defsubst eshell-flatten-and-stringify (&rest args)
334 "Flatten and stringify all of the ARGS into a single string."
335 (mapconcat 'eshell-stringify (eshell-flatten-list args) " "))
339 (defsubst eshell-time-less-p (t1 t2)
345 (defsubst eshell-time-to-seconds (time)
351 (defsubst eshell-directory-files (regexp &optional directory)
352 "Return a list of files in the given DIRECTORY matching REGEXP."
356 (defun eshell-regexp-arg (prompt)
357 "Return list of regexp and prefix arg using PROMPT."
362 (list (if (string-equal regexp "")
368 (defun eshell-printable-size (filesize &optional human-readable
406 (defun eshell-winnow-list (entries exclude &optional predicates)
407 "Pare down the ENTRIES list using the EXCLUDE regexp, and PREDICATES.
408 The original list is not affected. If the result is only one element
410 list."
411 (let ((flist (list t))
414 (setq entries (list entries)
416 (eshell-for entry entries
425 (nconc flist (list entry)))))
430 (defsubst eshell-redisplay ()
438 (defun eshell-read-passwd-file (file)
458 (defun eshell-read-passwd (file result-var timestamp-var)
462 (eshell-time-less-p
466 (set result-var (eshell-read-passwd-file file))
470 (defun eshell-read-group-names ()
472 (if eshell-group-file
473 (eshell-read-passwd eshell-group-file 'eshell-group-names
474 'eshell-group-timestamp)))
476 (defsubst eshell-group-id (name)
478 (car (rassoc name (eshell-read-group-names))))
480 (defsubst eshell-group-name (gid)
482 (cdr (assoc gid (eshell-read-group-names))))
484 (defun eshell-read-user-names ()
486 (if eshell-passwd-file
487 (eshell-read-passwd eshell-passwd-file 'eshell-user-names
488 'eshell-user-timestamp)))
490 (defsubst eshell-user-id (name)
492 (car (rassoc name (eshell-read-user-names))))
494 (defalias 'eshell-user-name 'user-login-name)
496 (defun eshell-read-hosts-file (filename)
500 (insert-file-contents eshell-hosts-file)
505 (add-to-list 'hosts (match-string 1)))
507 (add-to-list 'hosts (match-string 2)))
509 (add-to-list 'hosts (match-string 4)))))
512 (defun eshell-read-hosts (file result-var timestamp-var)
516 (eshell-time-less-p
520 (set result-var (eshell-read-hosts-file file))
524 (defun eshell-read-host-names ()
526 (if eshell-hosts-file
527 (eshell-read-hosts eshell-hosts-file 'eshell-host-names
528 'eshell-host-timestamp)))
550 (defsubst eshell-copy-environment ()
554 (defun eshell-subgroups (groupsym)
557 (subg (list t)))
560 (nconc subg (list (caar subgroups))))
564 (defmacro eshell-with-file-modes (modes &rest forms)
572 (defmacro eshell-with-private-file-modes (&rest forms)
574 `(eshell-with-file-modes ,eshell-private-file-modes ,@forms))
576 (defsubst eshell-make-private-directory (dir &optional parents)
577 "Make DIR with file-modes set to `eshell-private-directory-modes'."
578 (eshell-with-file-modes eshell-private-directory-modes
581 (defsubst eshell-substring (string sublen)
590 "Return a list of names of files and their attributes in DIRECTORY.
595 If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
601 (cons file (eshell-file-attributes (expand-file-name file directory)))))
607 (defun eshell-directory-files-and-attributes (dir &optional full match nosort)
619 (eshell-file-attributes
624 (defun eshell-current-ange-uids ()
628 (host-users (assoc host eshell-ange-ls-uids)))
641 (defun eshell-parse-ange-ls (dir)
681 (list (if (eq (aref perms 0) ?d)
690 (defun eshell-file-attributes (file)
705 (setq entry (eshell-parse-ange-ls dir))
717 (defalias 'eshell-copy-tree 'copy-tree)
719 (defsubst eshell-processp (proc)
723 ; (defun eshell-copy-file
731 ; (if (and front (string-match eshell-tar-regexp front)
747 ; (defun eshell-file-attributes (filename)
748 ; "Return a list of attributes of file FILENAME.
755 ; (when (and front (string-match eshell-tar-regexp front)
764 ; (list