aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1994-04-14 22:49:23 +0000
committerKarl Heuer1994-04-14 22:49:23 +0000
commit5109bfb09faa1685df0db60c7d2568d1d2fa9355 (patch)
tree555cdde8ec2b3af35c7b081e155c4881b21c3c06
parent5a336c131fe8d05d724ead90967a6ab8573ae951 (diff)
downloademacs-5109bfb09faa1685df0db60c7d2568d1d2fa9355.tar.gz
emacs-5109bfb09faa1685df0db60c7d2568d1d2fa9355.zip
(shell-mode-map): Fix menu bar options.
(shell-replace-by-expanded-directory): Don't print message.
-rw-r--r--lisp/shell.el49
1 files changed, 22 insertions, 27 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index b0bb9db9787..2cc0e5481ef 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -1,25 +1,26 @@
1;;; shell.el --- specialized comint.el for running the shell. 1;;; shell.el --- specialized comint.el for running the shell.
2;;; Copyright (C) 1988, 1993, 1994 Free Software Foundation, Inc. 2
3;; Copyright (C) 1988, 1993, 1994 Free Software Foundation, Inc.
3 4
4;; Author: Olin Shivers <shivers@cs.cmu.edu> 5;; Author: Olin Shivers <shivers@cs.cmu.edu>
5;; Maintainer: Simon Marshall <s.marshall@dcs.hull.ac.uk> 6;; Maintainer: Simon Marshall <s.marshall@dcs.hull.ac.uk>
6;; Keywords: processes 7;; Keywords: processes
7 8
8;;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
9 10
10;;; GNU Emacs is free software; you can redistribute it and/or modify 11;; GNU Emacs is free software; you can redistribute it and/or modify
11;;; it under the terms of the GNU General Public License as published by 12;; it under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 2, or (at your option) 13;; the Free Software Foundation; either version 2, or (at your option)
13;;; any later version. 14;; any later version.
14 15
15;;; GNU Emacs is distributed in the hope that it will be useful, 16;; GNU Emacs is distributed in the hope that it will be useful,
16;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 17;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details. 19;; GNU General Public License for more details.
19 20
20;;; You should have received a copy of the GNU General Public License 21;; 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 22;; along with GNU Emacs; see the file COPYING. If not, write to
22;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 23;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23 24
24;;; Commentary: 25;;; Commentary:
25 26
@@ -258,19 +259,14 @@ Thus, this does not include the shell's current directory.")
258 (define-key shell-mode-map "\t" 'comint-dynamic-complete) 259 (define-key shell-mode-map "\t" 'comint-dynamic-complete)
259 (define-key shell-mode-map "\M-?" 260 (define-key shell-mode-map "\M-?"
260 'comint-dynamic-list-filename-completions) 261 'comint-dynamic-list-filename-completions)
261 ;; Undefine the general completion first. 262 (define-key-after (lookup-key shell-mode-map [menu-bar completion])
262 (define-key shell-mode-map [menu-bar completion complete] nil) 263 [complete-env-variable] '("Complete Env. Variable Name" .
263 (define-key shell-mode-map [menu-bar completion expand-directory] 264 shell-dynamic-complete-environment-variable)
264 '("Expand Directory Reference" . shell-replace-by-expanded-directory)) 265 'complete-file)
265 (define-key shell-mode-map [menu-bar completion complete-env-variable] 266 (define-key-after (lookup-key shell-mode-map [menu-bar completion])
266 '("Complete Env. Variable Name" . 267 [expand-directory] '("Expand Directory Reference" .
267 shell-dynamic-complete-environment-variable)) 268 shell-replace-by-expanded-directory)
268 (define-key shell-mode-map [menu-bar completion complete-command] 269 'complete-expand)))
269 '("Complete Command Name" . shell-dynamic-complete-command))
270 ;; Redefine (requires a new key) so that it is at the top.
271 (define-key shell-mode-map [menu-bar completion complete-shell]
272 '("Complete Before Point" . comint-dynamic-complete))
273 ))
274 270
275(defvar shell-mode-hook '() 271(defvar shell-mode-hook '()
276 "*Hook for customising Shell mode.") 272 "*Hook for customising Shell mode.")
@@ -789,7 +785,6 @@ Returns t if successful."
789 (interactive) 785 (interactive)
790 (if (comint-match-partial-filename) 786 (if (comint-match-partial-filename)
791 (save-excursion 787 (save-excursion
792 (message "Expanding directory references...")
793 (goto-char (match-beginning 0)) 788 (goto-char (match-beginning 0))
794 (let ((stack (cons default-directory shell-dirstack)) 789 (let ((stack (cons default-directory shell-dirstack))
795 (index (cond ((looking-at "=-/?") 790 (index (cond ((looking-at "=-/?")