;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:40:02 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/eshell/em-basic.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-basic.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-basic custom-declare-group eshell-basic nil "The \"basic\" code provides a set of convenience functions which\nare traditionally considered shell builtins.  Since all of the\nfunctionality provided by them is accessible through Lisp, they are\nnot really builtins at all, but offer a command-oriented way to do the\nsame thing." :tag "Basic shell commands" :group eshell-module] 8)
#@202 *If non-nil, `echo' tries to behave like an ordinary shell echo.
This comes at some detriment to Lisp functionality.  However, the Lisp
equivalent of `echo' can always be achieved by using `identity'.
(custom-declare-variable 'eshell-plain-echo-behavior 'nil '(#$ . -1085) :type 'boolean :group 'eshell-basic)
(require 'esh-opt)
#@152 Implementation code for a Lisp version of `echo'.
It returns a formatted value that should be passed to `eshell-print'
or `eshell-printn' for display.
(defalias 'eshell-echo #[(args &optional output-newline) "\203 \304\305	\"\306P\207	G\307U\203 \310\202& 	G\311U\203\" 	@\202& \312\313	\"\203K \n;\2036 \n\306P\202L \n<\203C \314\n\306C\"\202L \315\n!\306P\202L \n)\207" [eshell-plain-echo-behavior args value output-newline apply eshell-flatten-and-stringify "\n" 0 "" 1 mapcar #[(arg) ";\203 \301\302G\303$\210\207" [arg set-text-properties 0 nil] 5] append eshell-stringify] 3 (#$ . 1421)])
#@62 Implementation of `echo'.  See `eshell-plain-echo-behavior'.
(defalias 'eshell/echo #[(&rest args) "\306\211\211\211\211\211\211\211\211\307\310\311\312#.\n\207" [args temp-args ext-command last-value usage-msg eshell-option-stub nil eshell-do-opt "echo" ((110 nil nil output-newline "terminate with a newline") (104 "help" nil nil "output this help screen") :preserve-args :usage "[-n] [object]") ((eshell-echo args output-newline)) output-newline] 9 (#$ . 2032)])
#@56 Print out each of the argument, separated by newlines.
(defalias 'eshell/printnl #[(&rest args) "\303!\211\205 \304	@C!\305\n!\210\305\306!\210)	A\211\204 \307)\207" [args elems object eshell-flatten-list eshell-echo eshell-print "\n" nil] 3 (#$ . 2516)])
#@42 Return the argument(s) as a single list.
(defalias 'eshell/listify #[(&rest args) "G\301V\203	 \207@<\203 @\207@C\207" [args 1] 2 (#$ . 2784)])
#@39 Shell-like implementation of `umask'.
(defalias 'eshell/umask #[(&rest args) "\306!\307\310\")\311\211\211\211\211\211\211\211\312\313\314\315#.	\207" [args temp-args ext-command last-value usage-msg eshell-option-stub eshell-flatten-list mapcar eshell-stringify nil eshell-do-opt "umask" ((83 "symbolic" nil symbolic-p "display umask symbolically") (104 "help" nil nil "display this usage message") :usage "[-S] [mode]") ((if (or (not args) symbolic-p) (let ((modstr (concat "000" (format "%o" (logand (lognot (default-file-modes)) 511))))) (setq modstr (substring modstr (- (length modstr) 3))) (when symbolic-p (let ((mode (default-file-modes))) (setq modstr (format "u=%s,g=%s,o=%s" (concat (and (= (logand mode 64) 64) "r") (and (= (logand mode 128) 128) "w") (and (= (logand mode 256) 256) "x")) (concat (and (= (logand mode 8) 8) "r") (and (= (logand mode 16) 16) "w") (and (= (logand mode 32) 32) "x")) (concat (and (= (logand mode 1) 1) "r") (and (= (logand mode 2) 2) "w") (and (= (logand mode 4) 4) "x")))))) (eshell-printn modstr)) (setcar args (eshell-convert (car args))) (if (numberp (car args)) (set-default-file-modes (- 511 (car (read-from-string (concat "?\\" (number-to-string (car args))))))) (error "setting umask symbolically is not yet implemented")) (eshell-print "Warning: umask changed for all new files created by Emacs.\n")) nil) symbolic-p] 8 (#$ . 2940)])
