• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/eshell/

Lines Matching refs:target

130 target, the function in the second element will be called.
142 NOTE: /dev/null is handled specially as a virtual target, and should
213 (error "Missing redirection target"))
238 (output-target (eshell-get-target standard-output output-mode))
239 (error-target (eshell-get-target standard-error error-mode)))
240 (aset handles eshell-output-handle (cons output-target 1))
242 (aset handles eshell-error-handle (cons error-target 1))
243 (aset handles eshell-error-handle (cons output-target 1)))
256 (defun eshell-close-target (target status)
260 ((symbolp target) nil)
264 ((markerp target)
265 (let ((buf (marker-buffer target)))
277 ((eshell-processp target)
278 (if (eq (process-status target) 'run)
279 (process-send-eof target)))
283 ((functionp target)
284 (funcall target status))
289 ((consp target)
290 (apply (car target) status (cdr target)))))
308 (let ((target (car (aref handles idx))))
309 (if (not (listp target))
310 (eshell-close-target target (= exit-code 0))
311 (while target
312 (eshell-close-target (car target) (= exit-code 0))
313 (setq target (cdr target)))))
329 (defun eshell-get-target (target &optional mode)
330 "Convert TARGET, which is a raw argument, into a valid output target.
335 ((stringp target)
336 (let ((redir (assoc target eshell-virtual-targets)))
341 (let* ((exists (get-file-buffer target))
342 (buf (find-file-noselect target t)))
345 (error "Cannot write to read-only file `%s'" target))
354 ((or (bufferp target)
357 (symbolp target)
358 (not (memq target '(t nil)))))
359 (let ((buf (if (bufferp target)
360 target
362 (symbol-name target)))))
370 ((functionp target) nil)
372 ((symbolp target)
374 (set target nil))
375 target)
377 ((or (eshell-processp target)
378 (markerp target))
379 target)
382 (error "Invalid redirection target: %s"
383 (eshell-stringify target)))))
388 (defun eshell-set-output-handle (index mode &optional target)
390 (when target
391 (if (and (stringp target)
394 (string= target null-device))
396 (string= target grep-null-device))
398 (string= target "/dev/null")))
400 (let ((where (eshell-get-target target mode))
466 (defun eshell-output-object-to-target (object target)
470 ((functionp target)
471 (funcall target object))
473 ((symbolp target)
474 (if (eq target t) ; means "print to display"
476 (if (not (symbol-value target))
477 (set target object)
479 (if (not (stringp (symbol-value target)))
480 (set target (eshell-stringify
481 (symbol-value target))))
482 (set target (concat (symbol-value target) object)))))
484 ((markerp target)
485 (if (buffer-live-p (marker-buffer target))
486 (with-current-buffer (marker-buffer target)
487 (let ((moving (= (point) target)))
489 (goto-char target)
493 (set-marker target (point-marker)))
495 (goto-char target))))))
497 ((eshell-processp target)
498 (when (eq (process-status target) 'run)
501 (process-send-string target object)))
503 ((consp target)
504 (apply (car target) object (cdr target))))
509 (let ((target (car (aref (or handles eshell-current-handles)
511 (if (and target (not (listp target)))
512 (eshell-output-object-to-target object target)
513 (while target
514 (eshell-output-object-to-target object (car target))
515 (setq target (cdr target))))))