aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorJoakim Verona2013-09-12 07:46:45 +0200
committerJoakim Verona2013-09-12 07:46:45 +0200
commit7701e0724215b82d2f635c19d7e7f2a9863e687c (patch)
treeb759e59df3edf3f5d661db8d24296cd3da116160 /lisp/shell.el
parentdd30d6b73383df67468e4705492206bae6a8185c (diff)
parent96b3f75a809761389cbbdc2eb0ed85f4559a8eef (diff)
downloademacs-7701e0724215b82d2f635c19d7e7f2a9863e687c.tar.gz
emacs-7701e0724215b82d2f635c19d7e7f2a9863e687c.zip
merge from trunk
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el21
1 files changed, 9 insertions, 12 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 3ca2564b65c..2047543f288 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -1,7 +1,6 @@
1;;; shell.el --- specialized comint.el for running the shell -*- lexical-binding: t -*- 1;;; shell.el --- specialized comint.el for running the shell -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 1988, 1993-1997, 2000-2013 Free Software Foundation, 3;; Copyright (C) 1988, 1993-1997, 2000-2013 Free Software Foundation, Inc.
4;; Inc.
5 4
6;; Author: Olin Shivers <shivers@cs.cmu.edu> 5;; Author: Olin Shivers <shivers@cs.cmu.edu>
7;; Simon Marshall <simon@gnu.org> 6;; Simon Marshall <simon@gnu.org>
@@ -792,7 +791,7 @@ and `shell-pushd-dunique' control the behavior of the relevant command.
792Environment variables are expanded, see function `substitute-in-file-name'." 791Environment variables are expanded, see function `substitute-in-file-name'."
793 (if shell-dirtrackp 792 (if shell-dirtrackp
794 ;; We fail gracefully if we think the command will fail in the shell. 793 ;; We fail gracefully if we think the command will fail in the shell.
795 (condition-case nil 794 (with-demoted-errors "Couldn't cd: %s"
796 (let ((start (progn (string-match 795 (let ((start (progn (string-match
797 (concat "^" shell-command-separator-regexp) 796 (concat "^" shell-command-separator-regexp)
798 str) ; skip whitespace 797 str) ; skip whitespace
@@ -825,8 +824,7 @@ Environment variables are expanded, see function `substitute-in-file-name'."
825 (setq start (progn (string-match shell-command-separator-regexp 824 (setq start (progn (string-match shell-command-separator-regexp
826 str end) 825 str end)
827 ;; skip again 826 ;; skip again
828 (match-end 0))))) 827 (match-end 0))))))))
829 (error "Couldn't cd"))))
830 828
831(defun shell-unquote-argument (string) 829(defun shell-unquote-argument (string)
832 "Remove all kinds of shell quoting from STRING." 830 "Remove all kinds of shell quoting from STRING."
@@ -908,7 +906,7 @@ Environment variables are expanded, see function `substitute-in-file-name'."
908 (cond ((> num (length shell-dirstack)) 906 (cond ((> num (length shell-dirstack))
909 (message "Directory stack not that deep.")) 907 (message "Directory stack not that deep."))
910 ((= num 0) 908 ((= num 0)
911 (error (message "Couldn't cd"))) 909 (error "Couldn't cd"))
912 (shell-pushd-dextract 910 (shell-pushd-dextract
913 (let ((dir (nth (1- num) shell-dirstack))) 911 (let ((dir (nth (1- num) shell-dirstack)))
914 (shell-process-popd arg) 912 (shell-process-popd arg)
@@ -1015,12 +1013,11 @@ command again."
1015 ds)) 1013 ds))
1016 (setq i (match-end 0))) 1014 (setq i (match-end 0)))
1017 (let ((ds (nreverse ds))) 1015 (let ((ds (nreverse ds)))
1018 (condition-case nil 1016 (with-demoted-errors "Couldn't cd: %s"
1019 (progn (shell-cd (car ds)) 1017 (shell-cd (car ds))
1020 (setq shell-dirstack (cdr ds) 1018 (setq shell-dirstack (cdr ds)
1021 shell-last-dir (car shell-dirstack)) 1019 shell-last-dir (car shell-dirstack))
1022 (shell-dirstack-message)) 1020 (shell-dirstack-message)))))
1023 (error (message "Couldn't cd"))))))
1024 (if started-at-pmark (goto-char (marker-position pmark))))) 1021 (if started-at-pmark (goto-char (marker-position pmark)))))
1025 1022
1026;; For your typing convenience: 1023;; For your typing convenience: