[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102484: * lisp/shell.el (shell): Use
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102484: * lisp/shell.el (shell): Use current-buffer by default if it's already |
Date: |
Tue, 23 Nov 2010 09:19:54 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102484
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2010-11-23 09:19:54 -0500
message:
* lisp/shell.el (shell): Use current-buffer by default if it's already
a shell mode buffer and its process is dead. Suggested by <address@hidden>.
modified:
lisp/ChangeLog
lisp/shell.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-11-23 08:00:56 +0000
+++ b/lisp/ChangeLog 2010-11-23 14:19:54 +0000
@@ -1,7 +1,13 @@
+2010-11-23 Stefan Monnier <address@hidden>
+
+ * shell.el (shell): Use current-buffer by default if it's already
+ a shell mode buffer and its process is dead.
+ Suggested by <address@hidden>.
+
2010-11-23 Tassilo Horn <address@hidden>
- * mail/emacsbug.el (report-emacs-bug-query-existing-bugs): Mention
- that the keywords should be comma separated.
+ * mail/emacsbug.el (report-emacs-bug-query-existing-bugs):
+ Mention that the keywords should be comma separated.
2010-11-23 Chong Yidong <address@hidden>
=== modified file 'lisp/shell.el'
--- a/lisp/shell.el 2010-11-12 14:13:48 +0000
+++ b/lisp/shell.el 2010-11-23 14:19:54 +0000
@@ -554,13 +554,19 @@
(generate-new-buffer-name "*shell*"))
(if (file-remote-p default-directory)
;; It must be possible to declare a local default-directory.
+ ;; FIXME: This can't be right: it changes the default-directory
+ ;; of the current-buffer rather than of the *shell* buffer.
(setq default-directory
(expand-file-name
(read-file-name
"Default directory: " default-directory default-directory
t nil 'file-directory-p))))))))
(require 'ansi-color)
- (setq buffer (get-buffer-create (or buffer "*shell*")))
+ (setq buffer (if (or buffer (not (derived-mode-p 'shell-mode))
+ (comint-check-proc (current-buffer)))
+ (get-buffer-create (or buffer "*shell*"))
+ ;; If the current buffer is a dead shell buffer, use it.
+ (current-buffer)))
;; Pop to buffer, so that the buffer's window will be correctly set
;; when we call comint (so that comint sets the COLUMNS env var properly).
(pop-to-buffer buffer)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102484: * lisp/shell.el (shell): Use current-buffer by default if it's already,
Stefan Monnier <=