X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/3c4ca7155293ffc2d04708007131bcbc882d8913..c175d44072c6a54eb921a3c55fdc2bf2f7816ddd:/lisp/term.el diff --git a/lisp/term.el b/lisp/term.el index e6466b8fa9..b37e71280d 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1,7 +1,7 @@ ;;; term.el --- general command interpreter in a window stuff -;; Copyright (C) 1988, 1990, 1992, 1994-1995, 2001-2012 -;; Free Software Foundation, Inc. +;; Copyright (C) 1988, 1990, 1992, 1994-1995, 2001-2013 Free Software +;; Foundation, Inc. ;; Author: Per Bothner ;; Maintainer: Dan Nicolaescu , Per Bothner @@ -397,6 +397,12 @@ (require 'ring) (require 'ehelp) +(declare-function ring-empty-p "ring" (ring)) +(declare-function ring-ref "ring" (ring index)) +(declare-function ring-insert-at-beginning "ring" (ring item)) +(declare-function ring-length "ring" (ring)) +(declare-function ring-insert "ring" (ring item)) + (defgroup term nil "General command interpreter in a window." :group 'processes) @@ -772,14 +778,14 @@ Buffer local variable.") (defcustom term-default-fg-color nil "If non-nil, default color for foreground in Term mode." :group 'term - :type 'string) + :type '(choice (const nil) (string :tag "color"))) (make-obsolete-variable 'term-default-fg-color "use the face `term' instead." "24.3") (defcustom term-default-bg-color nil "If non-nil, default color for foreground in Term mode." :group 'term - :type 'string) + :type '(choice (const nil) (string :tag "color"))) (make-obsolete-variable 'term-default-bg-color "use the face `term' instead." "24.3") @@ -3216,18 +3222,24 @@ See `term-prompt-regexp'." (let ((color (if term-ansi-current-reverse (face-foreground - (elt ansi-term-color-vector term-ansi-current-color)) + (elt ansi-term-color-vector term-ansi-current-color) + nil 'default) (face-background - (elt ansi-term-color-vector term-ansi-current-bg-color))))) + (elt ansi-term-color-vector term-ansi-current-bg-color) + nil 'default)))) (setq term-current-face (list :background color :foreground color)) ) ;; No need to bother with anything else if it's invisible. (setq term-current-face (list :foreground - (face-foreground (elt ansi-term-color-vector term-ansi-current-color)) + (face-foreground + (elt ansi-term-color-vector term-ansi-current-color) + nil 'default) :background - (face-background (elt ansi-term-color-vector term-ansi-current-bg-color)) + (face-background + (elt ansi-term-color-vector term-ansi-current-bg-color) + nil 'default) :inverse-video term-ansi-current-reverse)) (when term-ansi-current-bold @@ -4178,11 +4190,16 @@ the process. Any more args are arguments to PROGRAM." (term-mode) (term-char-mode) - ;; I wanna have find-file on C-x C-f -mm - ;; your mileage may definitely vary, maybe it's better to put this in your - ;; .emacs ... - - (term-set-escape-char ?\C-x) + ;; Historical baggage. A call to term-set-escape-char used to not + ;; undo any previous call to t-s-e-c. Because of this, ansi-term + ;; ended up with both C-x and C-c as escape chars. Who knows what + ;; the original intention was, but people could have become used to + ;; either. (Bug#12842) + (let (term-escape-char) + ;; I wanna have find-file on C-x C-f -mm + ;; your mileage may definitely vary, maybe it's better to put this in your + ;; .emacs ... + (term-set-escape-char ?\C-x)) (switch-to-buffer term-ansi-buffer-name))