diff options
| author | Glenn Morris | 2013-09-11 22:40:50 -0700 |
|---|---|---|
| committer | Glenn Morris | 2013-09-11 22:40:50 -0700 |
| commit | 8c05cb1082e51eb6367fba2f5dc0115113b6c2a1 (patch) | |
| tree | 45850dd3fa904e3413d8f2527b252621a5ab256b | |
| parent | 30213927b6eebe291cd425d5863f54bffe0b8a83 (diff) | |
| download | emacs-8c05cb1082e51eb6367fba2f5dc0115113b6c2a1.tar.gz emacs-8c05cb1082e51eb6367fba2f5dc0115113b6c2a1.zip | |
Fix some minor shell.el oddness related to usage of error and message
* lisp/shell.el (shell-directory-tracker): Output error as a message
rather than just returning it as a string.
(shell-process-pushd): Remove useless use of message.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/shell.el | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d5b6b09aab7..70ef9480ab4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2013-09-12 Glenn Morris <rgm@gnu.org> | 1 | 2013-09-12 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * shell.el (shell-directory-tracker): Output error as a message | ||
| 4 | rather than just returning it as a string. | ||
| 5 | (shell-process-pushd): Remove useless use of message. | ||
| 6 | |||
| 3 | * dframe.el (dframe-timer-fn): | 7 | * dframe.el (dframe-timer-fn): |
| 4 | * files.el (dir-locals-read-from-file): | 8 | * files.el (dir-locals-read-from-file): |
| 5 | * mpc.el (mpc--status-timer-run, mpc--status-idle-timer-run) | 9 | * mpc.el (mpc--status-timer-run, mpc--status-idle-timer-run) |
diff --git a/lisp/shell.el b/lisp/shell.el index 387d1057bd4..2047543f288 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -791,7 +791,7 @@ and `shell-pushd-dunique' control the behavior of the relevant command. | |||
| 791 | Environment variables are expanded, see function `substitute-in-file-name'." | 791 | Environment variables are expanded, see function `substitute-in-file-name'." |
| 792 | (if shell-dirtrackp | 792 | (if shell-dirtrackp |
| 793 | ;; 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. |
| 794 | (condition-case nil | 794 | (with-demoted-errors "Couldn't cd: %s" |
| 795 | (let ((start (progn (string-match | 795 | (let ((start (progn (string-match |
| 796 | (concat "^" shell-command-separator-regexp) | 796 | (concat "^" shell-command-separator-regexp) |
| 797 | str) ; skip whitespace | 797 | str) ; skip whitespace |
| @@ -824,8 +824,7 @@ Environment variables are expanded, see function `substitute-in-file-name'." | |||
| 824 | (setq start (progn (string-match shell-command-separator-regexp | 824 | (setq start (progn (string-match shell-command-separator-regexp |
| 825 | str end) | 825 | str end) |
| 826 | ;; skip again | 826 | ;; skip again |
| 827 | (match-end 0))))) | 827 | (match-end 0)))))))) |
| 828 | (error "Couldn't cd")))) | ||
| 829 | 828 | ||
| 830 | (defun shell-unquote-argument (string) | 829 | (defun shell-unquote-argument (string) |
| 831 | "Remove all kinds of shell quoting from STRING." | 830 | "Remove all kinds of shell quoting from STRING." |
| @@ -907,7 +906,7 @@ Environment variables are expanded, see function `substitute-in-file-name'." | |||
| 907 | (cond ((> num (length shell-dirstack)) | 906 | (cond ((> num (length shell-dirstack)) |
| 908 | (message "Directory stack not that deep.")) | 907 | (message "Directory stack not that deep.")) |
| 909 | ((= num 0) | 908 | ((= num 0) |
| 910 | (error (message "Couldn't cd"))) | 909 | (error "Couldn't cd")) |
| 911 | (shell-pushd-dextract | 910 | (shell-pushd-dextract |
| 912 | (let ((dir (nth (1- num) shell-dirstack))) | 911 | (let ((dir (nth (1- num) shell-dirstack))) |
| 913 | (shell-process-popd arg) | 912 | (shell-process-popd arg) |