Permalink
Browse files

Merge branch 'emacs_version'

  • Loading branch information...
2 parents bb89966 + 99b66bf commit 9457c08dd21b81876e6199e9af53afc957d3662e @jwiegley jwiegley committed Jan 22, 2009
Showing with 103 additions and 64 deletions.
  1. +1 −1 em-alias.el
  2. +1 −1 em-banner.el
  3. +1 −1 em-basic.el
  4. +2 −1 em-cmpl.el
  5. +1 −1 em-dirs.el
  6. +1 −1 em-glob.el
  7. +5 −2 em-hist.el
  8. +4 −2 em-ls.el
  9. +1 −1 em-pred.el
  10. +1 −1 em-prompt.el
  11. +1 −1 em-rebind.el
  12. +1 −1 em-script.el
  13. +2 −2 em-smart.el
  14. +16 −16 em-term.el
  15. +1 −1 em-unix.el
  16. +1 −1 em-xtra.el
  17. +1 −1 esh-arg.el
  18. +17 −9 esh-cmd.el
  19. +2 −1 esh-ext.el
  20. +4 −2 esh-io.el
  21. +5 −5 esh-mode.el
  22. +1 −1 esh-module.el
  23. +1 −1 esh-opt.el
  24. +28 −6 esh-proc.el
  25. +1 −1 esh-test.el
  26. +1 −1 esh-util.el
  27. +1 −1 esh-var.el
  28. +1 −1 eshell.el
View
@@ -1,7 +1,7 @@
;;; em-alias.el --- creation and management of command aliases
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
View
@@ -1,7 +1,7 @@
;;; em-banner.el --- sample module that displays a login banner
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
View
@@ -1,7 +1,7 @@
;;; em-basic.el --- basic shell builtin commands
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
View
@@ -1,7 +1,7 @@
;;; em-cmpl.el --- completion using the TAB key
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -71,6 +71,7 @@
;;; Code:
(eval-when-compile
+ (require 'cl)
(require 'eshell))
(require 'esh-util)
View
@@ -1,7 +1,7 @@
;;; em-dirs.el --- directory navigation commands
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
View
@@ -1,7 +1,7 @@
;;; em-glob.el --- extended file name globbing
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
View
@@ -1,7 +1,7 @@
;;; em-hist.el --- history list management
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -55,6 +55,9 @@
;;; Code:
+(eval-when-compile
+ (require 'cl))
+
(require 'ring)
(require 'esh-opt)
(require 'em-pred)
@@ -101,7 +104,7 @@ This mirrors the optional behavior of bash."
:type 'boolean
:group 'eshell-hist)
-(defcustom eshell-save-history-on-exit 'ask
+(defcustom eshell-save-history-on-exit t
"*Determine if history should be automatically saved.
History is always preserved after sanely exiting an Eshell buffer.
However, when Emacs is being shut down, this variable determines
View
@@ -1,7 +1,7 @@
;;; em-ls.el --- implementation of ls in Lisp
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -27,7 +27,9 @@
;;; Code:
-(eval-when-compile (require 'eshell))
+(eval-when-compile
+ (require 'cl)
+ (require 'eshell))
(require 'esh-util)
(require 'esh-opt)
View
@@ -1,7 +1,7 @@
;;; em-pred.el --- argument predicates and modifiers (ala zsh)
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
View
@@ -1,7 +1,7 @@
;;; em-prompt.el --- command prompts
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
View
@@ -1,7 +1,7 @@
;;; em-rebind.el --- rebind keys when point is at current input
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
View
@@ -1,7 +1,7 @@
;;; em-script.el --- Eshell script files
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
View
@@ -1,7 +1,7 @@
;;; em-smart.el --- smart display of output
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -291,7 +291,7 @@ and the end of the buffer are still visible."
(setq clear t)
(cond
((eq this-command 'self-insert-command)
- (if (eq last-command-char ? )
+ (if (eq last-command-event ? )
(if (and eshell-smart-space-goes-to-end
eshell-current-command)
(if (not (pos-visible-in-window-p (point-max)))
View
@@ -1,7 +1,7 @@
;;; em-term.el --- running visual commands
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -159,27 +159,27 @@ allowed."
; without any interpretation."
; (interactive)
; ;; Convert `return' to C-m, etc.
-; (if (and (symbolp last-input-char)
-; (get last-input-char 'ascii-character))
-; (setq last-input-char (get last-input-char 'ascii-character)))
-; (eshell-term-send-raw-string (make-string 1 last-input-char)))
+; (if (and (symbolp last-input-event)
+; (get last-input-event 'ascii-character))
+; (setq last-input-event (get last-input-event 'ascii-character)))
+; (eshell-term-send-raw-string (make-string 1 last-input-event)))
; (defun eshell-term-send-raw-meta ()
; (interactive)
-; (if (symbolp last-input-char)
+; (if (symbolp last-input-event)
; ;; Convert `return' to C-m, etc.
-; (let ((tmp (get last-input-char 'event-symbol-elements)))
+; (let ((tmp (get last-input-event 'event-symbol-elements)))
; (if tmp
-; (setq last-input-char (car tmp)))
-; (if (symbolp last-input-char)
+; (setq last-input-event (car tmp)))
+; (if (symbolp last-input-event)
; (progn
-; (setq tmp (get last-input-char 'ascii-character))
-; (if tmp (setq last-input-char tmp))))))
-; (eshell-term-send-raw-string (if (and (numberp last-input-char)
-; (> last-input-char 127)
-; (< last-input-char 256))
-; (make-string 1 last-input-char)
-; (format "\e%c" last-input-char))))
+; (setq tmp (get last-input-event 'ascii-character))
+; (if tmp (setq last-input-event tmp))))))
+; (eshell-term-send-raw-string (if (and (numberp last-input-event)
+; (> last-input-event 127)
+; (< last-input-event 256))
+; (make-string 1 last-input-event)
+; (format "\e%c" last-input-event))))
; (defun eshell-term-mouse-paste (click arg)
; "Insert the last stretch of killed text at the position clicked on."
View
@@ -1,7 +1,7 @@
;;; em-unix.el --- UNIX command aliases
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
View
@@ -1,7 +1,7 @@
;;; em-xtra.el --- extra alias functions
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
View
@@ -1,7 +1,7 @@
;;; esh-arg.el --- argument processing
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
View
@@ -1,7 +1,7 @@
;;; esh-cmd.el --- command invocation
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -109,6 +109,7 @@
(require 'esh-ext)
(eval-when-compile
+ (require 'cl)
(require 'pcomplete))
@@ -273,7 +274,10 @@ command line.")
(defvar eshell-current-command nil)
(defvar eshell-command-name nil)
(defvar eshell-command-arguments nil)
-(defvar eshell-in-pipeline-p nil)
+(defvar eshell-in-pipeline-p nil
+ "Internal Eshell variable, non-nil inside a pipeline.
+Has the value 'first, 'last for the first/last commands in the pipeline,
+otherwise t.")
(defvar eshell-in-subcommand-p nil)
(defvar eshell-last-arguments nil)
(defvar eshell-last-command-name nil)
@@ -815,16 +819,17 @@ this grossness will be made to disappear by using `call/cc'..."
(eshell-protect-handles eshell-current-handles)
,object))
-(defmacro eshell-do-pipelines (pipeline)
- "Execute the commands in PIPELINE, connecting each to one another."
+(defmacro eshell-do-pipelines (pipeline &optional notfirst)
+ "Execute the commands in PIPELINE, connecting each to one another.
+This macro calls itself recursively, with NOTFIRST non-nil."
(when (setq pipeline (cadr pipeline))
`(eshell-copy-handles
(progn
,(when (cdr pipeline)
`(let (nextproc)
(progn
(set 'nextproc
- (eshell-do-pipelines (quote ,(cdr pipeline))))
+ (eshell-do-pipelines (quote ,(cdr pipeline)) t))
(eshell-set-output-handle ,eshell-output-handle
'append nextproc)
(eshell-set-output-handle ,eshell-error-handle
@@ -838,10 +843,13 @@ this grossness will be made to disappear by using `call/cc'..."
(setcar head
(intern-soft
(concat (symbol-name (car head)) "*"))))))
- ;; Indicate to the command if it is the last in the pipeline.
- ;; Currently only used by eshell-ls-files.
- ;; Perhaps nil, rather than 'last, would be OK?
- (let ((eshell-in-pipeline-p ,(if (cdr pipeline) t (quote 'last))))
+ ;; First and last elements in a pipeline may need special treatment.
+ ;; (Currently only eshell-ls-files uses 'last.)
+ ;; Affects process-connection-type in eshell-gather-process-output.
+ (let ((eshell-in-pipeline-p
+ ,(cond ((not notfirst) (quote 'first))
+ ((cdr pipeline) t)
+ (t (quote 'last)))))
,(car pipeline))))))
(defmacro eshell-do-pipelines-synchronously (pipeline)
View
@@ -1,7 +1,7 @@
;;; esh-ext.el --- commands external to Eshell
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -33,6 +33,7 @@
(provide 'esh-ext)
(eval-when-compile
+ (require 'cl)
(require 'esh-cmd))
(require 'esh-util)
View
@@ -1,7 +1,7 @@
;;; esh-io.el --- I/O management
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -57,7 +57,9 @@
(provide 'esh-io)
-(eval-when-compile (require 'eshell))
+(eval-when-compile
+ (require 'cl)
+ (require 'eshell))
(defgroup eshell-io nil
"Eshell's I/O management code provides a scheme for treating many
View
@@ -1,7 +1,7 @@
;;; esh-mode.el --- user interface
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -486,9 +486,9 @@ This is used by `eshell-watch-for-password-prompt'."
(interactive "i")
(process-send-string
(eshell-interactive-process)
- (char-to-string (if (symbolp last-command-char)
- (get last-command-char 'ascii-character)
- last-command-char))))
+ (char-to-string (if (symbolp last-command-event)
+ (get last-command-event 'ascii-character)
+ last-command-event))))
(defun eshell-intercept-commands ()
(when (and (eshell-interactive-process)
View
@@ -1,7 +1,7 @@
;;; esh-module.el --- Eshell modules
;; Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Keywords: processes
View
@@ -1,7 +1,7 @@
;;; esh-opt.el --- command options processing
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
Oops, something went wrong.

0 comments on commit 9457c08

Please sign in to comment.