[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114227: Fix some minor shell.el oddness related to
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r114227: Fix some minor shell.el oddness related to usage of error and message |
Date: |
Thu, 12 Sep 2013 05:40:54 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114227
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-09-11 22:40:50 -0700
message:
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.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/shell.el shell.el-20091113204419-o5vbwnq5f7feedwu-150
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-09-12 05:32:57 +0000
+++ b/lisp/ChangeLog 2013-09-12 05:40:50 +0000
@@ -1,5 +1,9 @@
2013-09-12 Glenn Morris <address@hidden>
+ * 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.
+
* dframe.el (dframe-timer-fn):
* files.el (dir-locals-read-from-file):
* mpc.el (mpc--status-timer-run, mpc--status-idle-timer-run)
=== modified file 'lisp/shell.el'
--- a/lisp/shell.el 2013-09-12 05:32:57 +0000
+++ b/lisp/shell.el 2013-09-12 05:40:50 +0000
@@ -791,7 +791,7 @@
Environment variables are expanded, see function `substitute-in-file-name'."
(if shell-dirtrackp
;; We fail gracefully if we think the command will fail in the shell.
- (condition-case nil
+ (with-demoted-errors "Couldn't cd: %s"
(let ((start (progn (string-match
(concat "^" shell-command-separator-regexp)
str) ; skip whitespace
@@ -824,8 +824,7 @@
(setq start (progn (string-match shell-command-separator-regexp
str end)
;; skip again
- (match-end 0)))))
- (error "Couldn't cd"))))
+ (match-end 0))))))))
(defun shell-unquote-argument (string)
"Remove all kinds of shell quoting from STRING."
@@ -907,7 +906,7 @@
(cond ((> num (length shell-dirstack))
(message "Directory stack not that deep."))
((= num 0)
- (error (message "Couldn't cd")))
+ (error "Couldn't cd"))
(shell-pushd-dextract
(let ((dir (nth (1- num) shell-dirstack)))
(shell-process-popd arg)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114227: Fix some minor shell.el oddness related to usage of error and message,
Glenn Morris <=