changeset 92493:402ee2cfca27

* bindings.el (mode-line-remote): Add mouse-face. Improve tooltip. (standard-mode-line-position): Add mouse-face. * progmodes/compile.el (compilation-menu-map): (compilation-mode-map): * progmodes/grep.el (grep-mode-map): Add :help. * emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): Define and initialize in one step. Add :help. Use :enable to activate menu items. Show the key binding for edebug-defun. (lisp-interaction-mode-map): Add a menu. * term.el (term-mode-map): Define and initialize in one step. * ediff-init.el (ediff-color-display-p): Simplify. (Xor): Remove unused function. (ediff-with-syntax-table): Simplify for emacs. * ediff-hook.el (menu-bar-ediff-menu): Don't depend on the menu-bar being loaded, it always is.
author Dan Nicolaescu <dann@ics.uci.edu>
date Wed, 05 Mar 2008 04:09:24 +0000
parents dbef59debced
children b5a82292599c
files lisp/ChangeLog lisp/bindings.el lisp/ediff-hook.el lisp/ediff-init.el lisp/emacs-lisp/lisp-mode.el lisp/progmodes/compile.el lisp/progmodes/grep.el lisp/term.el
diffstat 8 files changed, 197 insertions(+), 135 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Mar 05 03:57:43 2008 +0000
+++ b/lisp/ChangeLog	Wed Mar 05 04:09:24 2008 +0000
@@ -1,3 +1,26 @@
+2008-03-05  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* bindings.el (mode-line-remote): Add mouse-face.  Improve tooltip.
+	(standard-mode-line-position): Add mouse-face.
+
+	* progmodes/compile.el (compilation-menu-map):
+	(compilation-mode-map):
+	* progmodes/grep.el (grep-mode-map):  Add :help.
+
+	* emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): Define and
+	initialize in one step.  Add :help.  Use :enable to activate menu
+	items. Show the key binding for edebug-defun.
+	(lisp-interaction-mode-map): Add a menu.
+
+	* term.el (term-mode-map): Define and initialize in one step.
+
+	* ediff-init.el (ediff-color-display-p): Simplify.
+	(Xor): Remove unused function.
+	(ediff-with-syntax-table): Simplify for emacs.
+
+	* ediff-hook.el (menu-bar-ediff-menu): Don't depend on the
+	menu-bar being loaded, it always is.
+
 2008-03-05  Glenn Morris  <rgm@gnu.org>
 
 	* textmodes/tex-mode.el (tex-mode): Suppress warning about
--- a/lisp/bindings.el	Wed Mar 05 03:57:43 2008 +0000
+++ b/lisp/bindings.el	Wed Mar 05 04:09:24 2008 +0000
@@ -260,15 +260,16 @@
 (defvar mode-line-remote
   (list (propertize
 	 "%1@"
+	 'mouse-face 'mode-line-highlight
 	 'help-echo (purecopy (lambda (window object point)
  				(format "%s"
 					(save-selected-window
 					  (select-window window)
 					  (concat
-					  (if (file-remote-p default-directory)
-					      "Remote: "
-					    "Local: ")
-					  default-directory)))))))
+					   (if (file-remote-p default-directory)
+					       "Current directory is remote: "
+					     "Current directory is local: ")
+					   default-directory)))))))
   "Mode-line flag to show if default-directory for current buffer is remote.")
 
 (make-variable-buffer-local 'mode-line-remote)
@@ -370,6 +371,7 @@
 	`((-3 ,(propertize
 		"%p"
 		'local-map mode-line-column-line-number-mode-map
+		'mouse-face 'mode-line-highlight
 		;; XXX needs better description
 		'help-echo "Size indication mode\n\
 mouse-1: Display Line and Column Mode Menu"))
@@ -377,6 +379,7 @@
 	   (8 ,(propertize
 		" of %I"
 		'local-map mode-line-column-line-number-mode-map
+		'mouse-face 'mode-line-highlight
 		;; XXX needs better description
 		'help-echo "Size indication mode\n\
 mouse-1: Display Line and Column Mode Menu")))
@@ -385,17 +388,20 @@
 	     (10 ,(propertize
 		   " (%l,%c)"
 		   'local-map mode-line-column-line-number-mode-map
+		   'mouse-face 'mode-line-highlight
 		   'help-echo "Line number and Column number\n\
 mouse-1: Display Line and Column Mode Menu"))
 	     (6 ,(propertize
 		  " L%l"
 		  'local-map mode-line-column-line-number-mode-map
+		  'mouse-face 'mode-line-highlight
 		  'help-echo "Line Number\n\
 mouse-1: Display Line and Column Mode Menu"))))
 	   ((column-number-mode
 	     (5 ,(propertize
 		  " C%c"
 		  'local-map mode-line-column-line-number-mode-map
+		  'mouse-face 'mode-line-highlight
 		  'help-echo "Column number\n\
 mouse-1: Display Line and Column Mode Menu"))))))))
 
--- a/lisp/ediff-hook.el	Wed Mar 05 03:57:43 2008 +0000
+++ b/lisp/ediff-hook.el	Wed Mar 05 04:09:24 2008 +0000
@@ -154,9 +154,8 @@
 	    (not (featurep 'ediff-hook)))
 	   (ediff-xemacs-init-menus)))
 
- ;; Emacs--only if menu-bar is loaded
- (if (featurep 'menu-bar)
-     (progn
+ ;; Emacs
+ (progn
        ;; initialize menu bar keymaps
        (defvar menu-bar-ediff-misc-menu
 	 (make-sparse-keymap "Ediff Miscellanea"))
@@ -251,8 +250,6 @@
 	 '("Customize Ediff" . ediff-customize))
        (define-key menu-bar-ediff-misc-menu [ediff-doc]
 	 '("Ediff Manual" . ediff-documentation))
-       )
-
       ) ; emacs case
  ) ; ediff-cond-compile-for-xemacs-or-emacs
 
--- a/lisp/ediff-init.el	Wed Mar 05 03:57:43 2008 +0000
+++ b/lisp/ediff-init.el	Wed Mar 05 04:09:24 2008 +0000
@@ -795,12 +795,9 @@
 
 (defun ediff-color-display-p ()
   (condition-case nil
-      (ediff-cond-compile-for-xemacs-or-emacs
-       (eq (device-class (selected-device)) 'color) ; xemacs form
-       (if (fboundp 'display-color-p) ; emacs form
-	   (display-color-p)
-	 (x-display-color-p))
-	)
+      (if (featurep 'xemacs)
+	  (eq (device-class (selected-device)) 'color) ; xemacs form
+	(display-color-p)) ; emacs form
     (error nil)))
 
 
@@ -1822,9 +1819,6 @@
   "Don't skip difference regions."
   nil)
 
-(defsubst Xor (a b)
-  (or (and a (not b)) (and (not a) b)))
-
 (defsubst ediff-message-if-verbose (string &rest args)
   (if ediff-verbose-p
       (apply 'message string args)))
@@ -1846,22 +1840,23 @@
       (convert-standard-filename fname)
     fname))
 
-
-(if (fboundp 'with-syntax-table)
+(if (featurep 'emacs)
     (defalias 'ediff-with-syntax-table 'with-syntax-table)
-  ;; stolen from subr.el in emacs 21
-  (defmacro ediff-with-syntax-table (table &rest body)
-    (let ((old-table (make-symbol "table"))
-	  (old-buffer (make-symbol "buffer")))
-      `(let ((,old-table (syntax-table))
-	     (,old-buffer (current-buffer)))
-	 (unwind-protect
-	     (progn
-	       (set-syntax-table (copy-syntax-table ,table))
-	       ,@body)
-	   (save-current-buffer
-	     (set-buffer ,old-buffer)
-	     (set-syntax-table ,old-table)))))))
+  (if (fboundp 'with-syntax-table)
+      (defalias 'ediff-with-syntax-table 'with-syntax-table)
+    ;; stolen from subr.el in emacs 21
+    (defmacro ediff-with-syntax-table (table &rest body)
+      (let ((old-table (make-symbol "table"))
+	    (old-buffer (make-symbol "buffer")))
+	`(let ((,old-table (syntax-table))
+	       (,old-buffer (current-buffer)))
+	   (unwind-protect
+	       (progn
+		 (set-syntax-table (copy-syntax-table ,table))
+		 ,@body)
+	     (save-current-buffer
+	       (set-buffer ,old-buffer)
+	       (set-syntax-table ,old-table))))))))
 
 
 (provide 'ediff-init)
--- a/lisp/emacs-lisp/lisp-mode.el	Wed Mar 05 03:57:43 2008 +0000
+++ b/lisp/emacs-lisp/lisp-mode.el	Wed Mar 05 04:09:24 2008 +0000
@@ -37,6 +37,8 @@
 
 (defvar lisp-mode-abbrev-table nil)
 
+(define-abbrev-table 'lisp-mode-abbrev-table ())
+
 (defvar emacs-lisp-mode-syntax-table
   (let ((table (make-syntax-table)))
     (let ((i 0))
@@ -88,8 +90,6 @@
     (modify-syntax-entry ?| "\" 23bn" table)
     table))
 
-(define-abbrev-table 'lisp-mode-abbrev-table ())
-
 (defvar lisp-imenu-generic-expression
   (list
    (list nil
@@ -270,41 +270,52 @@
     map)
   "Keymap for commands shared by all sorts of Lisp modes.")
 
-(defvar emacs-lisp-mode-map ()
+(defvar emacs-lisp-mode-map 
+  (let ((map (make-sparse-keymap "Emacs-Lisp"))
+	(menu-map (make-sparse-keymap "Emacs-Lisp")))
+    (set-keymap-parent map lisp-mode-shared-map)
+    (define-key map "\e\t" 'lisp-complete-symbol)
+    (define-key map "\e\C-x" 'eval-defun)
+    (define-key map "\e\C-q" 'indent-pp-sexp)
+    (define-key map [menu-bar emacs-lisp] (cons "Emacs-Lisp" menu-map))
+    (define-key menu-map [edebug-defun]
+      '(menu-item "Instrument Function for Debugging" edebug-defun
+		  :help "Evaluate the top level form point is in, stepping through with Edebug"
+		  :keys "C-u C-M-x"))
+    (define-key menu-map [byte-recompile]
+      '(menu-item "Byte-recompile Directory..." byte-recompile-directory
+		  :help "Recompile every `.el' file in DIRECTORY that needs recompilation"))
+    (define-key menu-map [emacs-byte-compile-and-load]
+      '(menu-item "Byte-compile And Load" emacs-lisp-byte-compile-and-load
+		  :help "Byte-compile the current file (if it has changed), then load compiled code"))
+    (define-key menu-map [byte-compile]
+      '(menu-item "Byte-compile This File" emacs-lisp-byte-compile
+		  :help "Byte compile the file containing the current buffer"))
+    (define-key menu-map [separator-eval] '("--"))
+    (define-key menu-map [eval-buffer]
+      '(menu-item "Evaluate Buffer" eval-buffer
+		  :help "Execute the current buffer as Lisp code"))
+    (define-key menu-map [eval-region]
+      '(menu-item "Evaluate Region" eval-region
+		  :help "Execute the region as Lisp code"
+		  :enable (mark-active)))
+    (define-key menu-map [eval-sexp] 
+      '(menu-item "Evaluate Last S-expression" eval-last-sexp
+		  :help "Evaluate sexp before point; print value in minibuffer"))
+    (define-key menu-map [separator-format] '("--"))
+    (define-key menu-map [comment-region]
+      '(menu-item "Comment Out Region" comment-region
+		  :help "Comment or uncomment each line in the region"
+		  :enable (mark-active)))
+    (define-key menu-map [indent-region]
+      '(menu-item "Indent Region" indent-region
+		  :help "Indent each nonblank line in the region"
+		  :enable (mark-active)))
+    (define-key menu-map [indent-line] '("Indent Line" . lisp-indent-line))
+    map)
   "Keymap for Emacs Lisp mode.
 All commands in `lisp-mode-shared-map' are inherited by this map.")
 
-(if emacs-lisp-mode-map
-    ()
-  (let ((map (make-sparse-keymap "Emacs-Lisp")))
-    (setq emacs-lisp-mode-map (make-sparse-keymap))
-    (set-keymap-parent emacs-lisp-mode-map lisp-mode-shared-map)
-    (define-key emacs-lisp-mode-map "\e\t" 'lisp-complete-symbol)
-    (define-key emacs-lisp-mode-map "\e\C-x" 'eval-defun)
-    (define-key emacs-lisp-mode-map "\e\C-q" 'indent-pp-sexp)
-    (define-key emacs-lisp-mode-map [menu-bar] (make-sparse-keymap))
-    (define-key emacs-lisp-mode-map [menu-bar emacs-lisp]
-      (cons "Emacs-Lisp" map))
-    (define-key map [edebug-defun]
-      '("Instrument Function for Debugging" . edebug-defun))
-    (define-key map [byte-recompile]
-      '("Byte-recompile Directory..." . byte-recompile-directory))
-    (define-key map [emacs-byte-compile-and-load]
-      '("Byte-compile And Load" . emacs-lisp-byte-compile-and-load))
-    (define-key map [byte-compile]
-      '("Byte-compile This File" . emacs-lisp-byte-compile))
-    (define-key map [separator-eval] '("--"))
-    (define-key map [eval-buffer] '("Evaluate Buffer" . eval-buffer))
-    (define-key map [eval-region] '("Evaluate Region" . eval-region))
-    (define-key map [eval-sexp] '("Evaluate Last S-expression" . eval-last-sexp))
-    (define-key map [separator-format] '("--"))
-    (define-key map [comment-region] '("Comment Out Region" . comment-region))
-    (define-key map [indent-region] '("Indent Region" . indent-region))
-    (define-key map [indent-line] '("Indent Line" . lisp-indent-line))
-    (put 'eval-region 'menu-enable 'mark-active)
-    (put 'comment-region 'menu-enable 'mark-active)
-    (put 'indent-region 'menu-enable 'mark-active)))
-
 (defun emacs-lisp-byte-compile ()
   "Byte compile the file containing the current buffer."
   (interactive)
@@ -417,12 +428,30 @@
   (error "Process lisp does not exist"))
 
 (defvar lisp-interaction-mode-map
-  (let ((map (make-sparse-keymap)))
+  (let ((map (make-sparse-keymap))
+	(menu-map (make-sparse-keymap "Lisp-Interaction")))
     (set-keymap-parent map lisp-mode-shared-map)
     (define-key map "\e\C-x" 'eval-defun)
     (define-key map "\e\C-q" 'indent-pp-sexp)
     (define-key map "\e\t" 'lisp-complete-symbol)
     (define-key map "\n" 'eval-print-last-sexp)
+    (define-key map [menu-bar lisp-interaction] (cons "Lisp-Interaction" menu-map))
+    (define-key menu-map [eval-defun] 
+      '(menu-item "Evaluate Defun" eval-defun
+		  :help "Evaluate the top-level form containing point, or after point"))
+    (define-key menu-map [eval-print-last-sexp]
+      '(menu-item "Evaluate and print" eval-print-last-sexp
+		  :help "Evaluate sexp before point; print value into current buffer"))
+    (define-key map [edebug-defun-lisp-interaction]
+      '(menu-item "Instrument Function for Debugging" edebug-defun
+		  :help "Evaluate the top level form point is in, stepping through with Edebug"
+		  :keys "C-u C-M-x"))
+    (define-key menu-map [indent-pp-sexp]
+      '(menu-item "Indent or Pretty-Print" indent-pp-sexp
+		  :help "Indent each line of the list starting just after point, or prettyprint it"))
+    (define-key menu-map [lisp-complete-symbol]
+      '(menu-item "Complete Lisp Symbol" lisp-complete-symbol
+		  :help "Perform completion on Lisp symbol preceding point"))
     map)
   "Keymap for Lisp Interaction mode.
 All commands in `lisp-mode-shared-map' are inherited by this map.")
--- a/lisp/progmodes/compile.el	Wed Mar 05 03:57:43 2008 +0000
+++ b/lisp/progmodes/compile.el	Wed Mar 05 04:09:24 2008 +0000
@@ -1291,7 +1291,8 @@
   (let ((map (make-sparse-keymap "Errors"))
 	(opt-map (make-sparse-keymap "Skip")))
     (define-key map [stop-subjob]
-      '("Stop Compilation" . kill-compilation))
+      '(menu-item "Stop Compilation" kill-compilation
+		  :help "Kill the process made by the M-x compile or M-x grep commands"))
     (define-key map [compilation-mode-separator3]
       '("----" . nil))
     (define-key map [compilation-next-error-follow-minor-mode]
@@ -1325,11 +1326,14 @@
     (define-key map [compilation-mode-separator2]
       '("----" . nil))
     (define-key map [compilation-first-error]
-      '("First Error" . first-error))
+      '(menu-item "First Error" first-error
+		  :help "Restart at the first error, visit corresponding source code"))
     (define-key map [compilation-previous-error]
-      '("Previous Error" . previous-error))
+      '(menu-item "Previous Error" previous-error
+		  :help "Visit previous `next-error' message and corresponding source code"))
     (define-key map [compilation-next-error]
-      '("Next Error" . next-error))
+      '(menu-item "Next Error" next-error
+		  :help "Visit next `next-error' message and corresponding source code"))
     map))
 
 (defvar compilation-minor-mode-map
@@ -1400,11 +1404,14 @@
     (define-key map [menu-bar compilation compilation-separator2]
       '("----" . nil))
     (define-key map [menu-bar compilation compilation-grep]
-      '("Search Files (grep)..." . grep))
+      '(menu-item "Search Files (grep)..." grep
+		  :help "Run grep, with user-specified args, and collect output in a buffer"))
     (define-key map [menu-bar compilation compilation-recompile]
-      '("Recompile" . recompile))
+      '(menu-item "Recompile" recompile
+	:help "Re-compile the program including the current buffer"))
     (define-key map [menu-bar compilation compilation-compile]
-      '("Compile..." . compile))
+      '(menu-item "Compile..." compile
+		  :help "Compile the program including the current buffer.  Default: run `make'"))
     map)
   "Keymap for compilation log buffers.
 `compilation-minor-mode-map' is a parent of this.")
--- a/lisp/progmodes/grep.el	Wed Mar 05 03:57:43 2008 +0000
+++ b/lisp/progmodes/grep.el	Wed Mar 05 04:09:24 2008 +0000
@@ -197,25 +197,31 @@
       (cons "Grep" (make-sparse-keymap "Grep")))
 
     (define-key map [menu-bar grep compilation-kill-compilation]
-      '("Kill Grep" . kill-compilation))
-    (define-key map [menu-bar grep compilation-separator2]
-      '("----" . nil))
+      '(menu-item "Kill Grep" kill-compilation
+		  :help "Kill the currently running grep process"))
+    (define-key map [menu-bar grep compilation-separator2] '("----"))
     (define-key map [menu-bar grep compilation-compile]
-      '("Compile..." . compile))
+      '(menu-item "Compile..." compile
+		  :help "Compile the program including the current buffer.  Default: run `make'"))
     (define-key map [menu-bar grep compilation-grep]
-      '("Another grep..." . grep))
+      '(menu-item "Another grep..." grep
+		  :help "Run grep, with user-specified args, and collect output in a buffer."))
     (define-key map [menu-bar grep compilation-grep-find]
-      '("Recursive grep..." . grep-find))
+      '(menu-item "Recursive grep..." grep-find
+		  :help "Run grep via find, with user-specified args"))
     (define-key map [menu-bar grep compilation-recompile]
-      '("Repeat grep" . recompile))
-    (define-key map [menu-bar grep compilation-separator2]
-      '("----" . nil))
+      '(menu-item "Repeat grep" recompile
+		  :help "Run grep again"))
+    (define-key map [menu-bar grep compilation-separator2] '("----"))
     (define-key map [menu-bar grep compilation-first-error]
-      '("First Match" . first-error))
+      '(menu-item "First Match" first-error
+		  :help "Restart at the first match, visit corresponding location"))
     (define-key map [menu-bar grep compilation-previous-error]
-      '("Previous Match" . previous-error))
+      '(menu-item "Previous Match" previous-error
+		  :help "Visit the previous match and corresponding location"))
     (define-key map [menu-bar grep compilation-next-error]
-      '("Next Match" . next-error))
+      '(menu-item "Next Match" next-error
+		  :help "Visit the next match and corresponding location"))
     map)
   "Keymap for grep buffers.
 `compilation-minor-mode-map' is a cdr of this.")
--- a/lisp/term.el	Wed Mar 05 03:57:43 2008 +0000
+++ b/lisp/term.el	Wed Mar 05 04:09:24 2008 +0000
@@ -621,7 +621,53 @@
   :type 'hook
   :group 'term)
 
-(defvar term-mode-map nil)
+(defvar term-mode-map 
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\ep" 'term-previous-input)
+    (define-key map "\en" 'term-next-input)
+    (define-key map "\er" 'term-previous-matching-input)
+    (define-key map "\es" 'term-next-matching-input)
+    (unless (featurep 'xemacs)
+      (define-key map [?\A-\M-r]
+	'term-previous-matching-input-from-input)
+      (define-key map [?\A-\M-s] 'term-next-matching-input-from-input))
+    (define-key map "\e\C-l" 'term-show-output)
+    (define-key map "\C-m" 'term-send-input)
+    (define-key map "\C-d" 'term-delchar-or-maybe-eof)
+    (define-key map "\C-c\C-a" 'term-bol)
+    (define-key map "\C-c\C-u" 'term-kill-input)
+    (define-key map "\C-c\C-w" 'backward-kill-word)
+    (define-key map "\C-c\C-c" 'term-interrupt-subjob)
+    (define-key map "\C-c\C-z" 'term-stop-subjob)
+    (define-key map "\C-c\C-\\" 'term-quit-subjob)
+    (define-key map "\C-c\C-m" 'term-copy-old-input)
+    (define-key map "\C-c\C-o" 'term-kill-output)
+    (define-key map "\C-c\C-r" 'term-show-output)
+    (define-key map "\C-c\C-e" 'term-show-maximum-output)
+    (define-key map "\C-c\C-l" 'term-dynamic-list-input-ring)
+    (define-key map "\C-c\C-n" 'term-next-prompt)
+    (define-key map "\C-c\C-p" 'term-previous-prompt)
+    (define-key map "\C-c\C-d" 'term-send-eof)
+    (define-key map "\C-c\C-k" 'term-char-mode)
+    (define-key map "\C-c\C-j" 'term-line-mode)
+    (define-key map "\C-c\C-q" 'term-pager-toggle)
+
+    ;;  ;; completion:
+    ;;  (define-key map [menu-bar completion]
+    ;;    (cons "Complete" (make-sparse-keymap "Complete")))
+    ;;  (define-key map [menu-bar completion complete-expand]
+    ;;    '("Expand File Name" . term-replace-by-expanded-filename))
+    ;;  (define-key map [menu-bar completion complete-listing]
+    ;;    '("File Completion Listing" . term-dynamic-list-filename-completions))
+    ;;  (define-key map [menu-bar completion complete-file]
+    ;;    '("Complete File Name" . term-dynamic-complete-filename))
+    ;;  (define-key map [menu-bar completion complete]
+    ;;    '("Complete Before Point" . term-dynamic-complete))
+    ;;  ;; Put them in the menu bar:
+    ;;  (setq menu-bar-final-items (append '(terminal completion inout signals)
+    ;;				     menu-bar-final-items))
+    map))
+
 (defvar term-raw-map nil
   "Keyboard map for sending characters directly to the inferior process.")
 (defvar term-escape-char nil
@@ -725,53 +771,6 @@
       [ "Enable paging" term-pager-toggle (not term-pager-count)]
       [ "Disable paging" term-pager-toggle term-pager-count])))
 
-(unless term-mode-map
-  (setq term-mode-map (make-sparse-keymap))
-  (define-key term-mode-map "\ep" 'term-previous-input)
-  (define-key term-mode-map "\en" 'term-next-input)
-  (define-key term-mode-map "\er" 'term-previous-matching-input)
-  (define-key term-mode-map "\es" 'term-next-matching-input)
-  (unless (featurep 'xemacs)
-    (define-key term-mode-map [?\A-\M-r]
-      'term-previous-matching-input-from-input)
-    (define-key term-mode-map [?\A-\M-s] 'term-next-matching-input-from-input))
-  (define-key term-mode-map "\e\C-l" 'term-show-output)
-  (define-key term-mode-map "\C-m" 'term-send-input)
-  (define-key term-mode-map "\C-d" 'term-delchar-or-maybe-eof)
-  (define-key term-mode-map "\C-c\C-a" 'term-bol)
-  (define-key term-mode-map "\C-c\C-u" 'term-kill-input)
-  (define-key term-mode-map "\C-c\C-w" 'backward-kill-word)
-  (define-key term-mode-map "\C-c\C-c" 'term-interrupt-subjob)
-  (define-key term-mode-map "\C-c\C-z" 'term-stop-subjob)
-  (define-key term-mode-map "\C-c\C-\\" 'term-quit-subjob)
-  (define-key term-mode-map "\C-c\C-m" 'term-copy-old-input)
-  (define-key term-mode-map "\C-c\C-o" 'term-kill-output)
-  (define-key term-mode-map "\C-c\C-r" 'term-show-output)
-  (define-key term-mode-map "\C-c\C-e" 'term-show-maximum-output)
-  (define-key term-mode-map "\C-c\C-l" 'term-dynamic-list-input-ring)
-  (define-key term-mode-map "\C-c\C-n" 'term-next-prompt)
-  (define-key term-mode-map "\C-c\C-p" 'term-previous-prompt)
-  (define-key term-mode-map "\C-c\C-d" 'term-send-eof)
-  (define-key term-mode-map "\C-c\C-k" 'term-char-mode)
-  (define-key term-mode-map "\C-c\C-j" 'term-line-mode)
-  (define-key term-mode-map "\C-c\C-q" 'term-pager-toggle)
-
-;  ;; completion:
-;  (define-key term-mode-map [menu-bar completion]
-;    (cons "Complete" (make-sparse-keymap "Complete")))
-;  (define-key term-mode-map [menu-bar completion complete-expand]
-;    '("Expand File Name" . term-replace-by-expanded-filename))
-;  (define-key term-mode-map [menu-bar completion complete-listing]
-;    '("File Completion Listing" . term-dynamic-list-filename-completions))
-;  (define-key term-mode-map [menu-bar completion complete-file]
-;    '("Complete File Name" . term-dynamic-complete-filename))
-;  (define-key term-mode-map [menu-bar completion complete]
-;    '("Complete Before Point" . term-dynamic-complete))
-;  ;; Put them in the menu bar:
-;  (setq menu-bar-final-items (append '(terminal completion inout signals)
-;				     menu-bar-final-items))
-  )
-
 ;; Menu bars:
 (unless (featurep 'xemacs)
   ;; terminal: