comparison lisp/eshell/esh-ext.el @ 91204:53108e6cea98

Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-294
author Miles Bader <miles@gnu.org>
date Thu, 06 Dec 2007 09:51:45 +0000
parents f55f9811f5d7 c7c065bc43a2
children 606f2d163a64
comparison
equal deleted inserted replaced
91203:db40129142b2 91204:53108e6cea98
19 19
20 ;; You should have received a copy of the GNU General Public License 20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the 21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 ;; Boston, MA 02110-1301, USA. 23 ;; Boston, MA 02110-1301, USA.
24
25 (provide 'esh-ext)
26
27 (eval-when-compile (require 'esh-maint))
28 (require 'esh-util)
29
30 (defgroup eshell-ext nil
31 "External commands are invoked when operating system executables are
32 loaded into memory, thus beginning a new process."
33 :tag "External commands"
34 :group 'eshell)
35 24
36 ;;; Commentary: 25 ;;; Commentary:
37 26
38 ;; To force a command to invoked external, either provide an explicit 27 ;; To force a command to invoked external, either provide an explicit
39 ;; pathname for the command argument, or prefix the command name with 28 ;; pathname for the command argument, or prefix the command name with
40 ;; an asterix character. Example: 29 ;; an asterix character. Example:
41 ;; 30 ;;
42 ;; grep ; make invoke `grep' Lisp function, or `eshell/grep' 31 ;; grep ; make invoke `grep' Lisp function, or `eshell/grep'
43 ;; /bin/grep ; will definitely invoke /bin/grep 32 ;; /bin/grep ; will definitely invoke /bin/grep
44 ;; *grep ; will also invoke /bin/grep 33 ;; *grep ; will also invoke /bin/grep
34
35 (provide 'esh-ext)
36
37 (eval-when-compile
38 (require 'esh-cmd))
39 (require 'esh-util)
40
41 (defgroup eshell-ext nil
42 "External commands are invoked when operating system executables are
43 loaded into memory, thus beginning a new process."
44 :tag "External commands"
45 :group 'eshell)
45 46
46 ;;; User Variables: 47 ;;; User Variables:
47 48
48 (defcustom eshell-ext-load-hook '(eshell-ext-initialize) 49 (defcustom eshell-ext-load-hook '(eshell-ext-initialize)
49 "*A hook that gets run when `eshell-ext' is loaded." 50 "*A hook that gets run when `eshell-ext' is loaded."
209 (string-match "\\`[A-Za-z]:[/\\\\]\\'" 210 (string-match "\\`[A-Za-z]:[/\\\\]\\'"
210 default-directory))) 211 default-directory)))
211 (find-file-name-handler default-directory 212 (find-file-name-handler default-directory
212 'shell-command)))) 213 'shell-command))))
213 (if (and handler 214 (if (and handler
214 (not (and (eshell-under-xemacs-p) 215 (not (and (featurep 'xemacs)
215 (eq handler 'dired-handler-fn)))) 216 (eq handler 'dired-handler-fn))))
216 (eshell-remote-command handler command args)) 217 (eshell-remote-command handler command args))
217 (let ((interp (eshell-find-interpreter command))) 218 (let ((interp (eshell-find-interpreter command)))
218 (assert interp) 219 (assert interp)
219 (if (functionp (car interp)) 220 (if (functionp (car interp))