;;; term.el --- general command interpreter in a window stuff
-;;; Copyright (C) 1988, 1990, 1992, 1994, 1995, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 1990, 1992, 1994, 1995, 2002, 2003,
+;; 2004, 2005 Free Software Foundation, Inc.
;; Author: Per Bothner <per@bothner.com>
;; Maintainer: Dan Nicolaescu <dann@ics.uci.edu>, Per Bothner <per@bothner.com>
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Marck 13 2001
;;; Fixes for CJK support by Yong Lu <lyongu@yahoo.com>.
(require 'ehelp)
(defgroup term nil
- "General command interpreter in a window"
+ "General command interpreter in a window."
:group 'processes
:group 'unix)
"Function that submits old text in term mode.
This function is called when return is typed while the point is in old text.
It returns the text to be submitted as process input. The default is
-term-get-old-input-default, which grabs the current line, and strips off
-leading text matching term-prompt-regexp")
+`term-get-old-input-default', which grabs the current line, and strips off
+leading text matching `term-prompt-regexp'.")
(defvar term-dynamic-complete-functions
'(term-replace-by-expanded-history term-dynamic-complete-filename)
(function (lambda (str) (not (string-match "\\`\\s *\\'" str))))
"Predicate for filtering additions to input history.
Only inputs answering true to this function are saved on the input
-history list. Default is to save anything that isn't all whitespace")
+history list. Default is to save anything that isn't all whitespace.")
(defvar term-input-filter-functions '()
"Functions to call before input is sent to the process.
(defvar term-input-sender (function term-simple-send)
"Function to actually send to PROCESS the STRING submitted by user.
-Usually this is just 'term-simple-send, but if your mode needs to
+Usually this is just `term-simple-send', but if your mode needs to
massage the input string, this is your hook. This is called from
-the user command term-send-input. `term-simple-send' just sends
+the user command `term-send-input'. `term-simple-send' just sends
the string plus a newline.")
(defcustom term-eol-on-send t
:group 'term)
(defcustom term-mode-hook '()
- "Called upon entry into term-mode
+ "Called upon entry into term mode.
This is run before the process is cranked up."
:type 'hook
:group 'term)
(defcustom term-exec-hook '()
- "Called each time a process is exec'd by term-exec.
+ "Called each time a process is exec'd by `term-exec'.
This is called after the process is cranked up. It is useful for things that
-must be done each time a process is executed in a term-mode buffer (e.g.,
-\(process-kill-without-query)). In contrast, the term-mode-hook is only
+must be done each time a process is executed in a term mode buffer (e.g.,
+`process-kill-without-query'). In contrast, `term-mode-hook' is only
executed once when the buffer is created."
:type 'hook
:group 'term)
(defvar term-raw-map nil
"Keyboard map for sending characters directly to the inferior process.")
(defvar term-escape-char nil
- "Escape character for char-sub-mode of term mode.
+ "Escape character for char sub-mode of term mode.
Do not change it directly; use `term-set-escape-char' instead.")
(defvar term-raw-escape-map nil)
(make-local-variable 'term-current-face)
(make-local-variable 'term-pending-frame)
(setq term-pending-frame nil)
+ ;; Cua-mode's keybindings interfere with the term keybindings, disable it.
+ (set (make-local-variable 'cua-mode) nil)
(run-mode-hooks 'term-mode-hook)
(term-if-xemacs
(set-buffer-menubar
;;; Name to use for TERM.
;;; Using "emacs" loses, because bash disables editing if TERM == emacs.
-(defvar term-term-name "eterm")
+(defvar term-term-name "eterm-color")
; Format string, usage:
; (format term-termcap-string emacs-term-name "TERMCAP=" 24 80)
(defvar term-termcap-format
(sit-for 0)
(message "Hit space to flush")
(let ((ch (read-event)))
- (if (eq ch ?\ )
+ (if (eq ch ?\s)
(set-window-configuration conf)
(setq unread-command-events (list ch)))))))
(progn
(mouse-choose-completion first)
(set-window-configuration conf))
- (if (eq first ?\ )
+ (if (eq first ?\s)
(set-window-configuration conf)
(setq unread-command-events (listify-key-sequence key)))))))