Commit 502a4ee9 authored by Kim F. Storm's avatar Kim F. Storm
Browse files

From Dan Nicolaescu <>

(term-down): Perform vertical motion if DOWN is negative.
(term-exec-1): Set both TERMCAP and TERMINFO unconditionally.
(term-termcap-format): Synchronyze with the eterm terminfo entry
in etc/e/eterm.ti.
(term-handle-colors-array): If the current foreground or
background are zero (i.e. unspecified), use the foreground and
background of the default face for reverse video.
(term-ansi-at-eval-string, term-ansi-default-fg)
(term-ansi-default-bg, term-ansi-current-temp): Delete unused variable.
(term-mem): Delete ununsed function.
(term-protocol-version): Increment.
(term-current-face): Set to default.
parent 6e3654ab
......@@ -396,7 +396,7 @@
;; This is passed to the inferior in the EMACS environment variable,
;; so it is important to increase it if there are protocol-relevant changes.
(defconst term-protocol-version "0.95")
(defconst term-protocol-version "0.96")
(require 'ange-ftp))
......@@ -457,7 +457,7 @@
;; we want suppressed.
(defvar term-terminal-parameter)
(defvar term-terminal-previous-parameter)
(defvar term-current-face 'term-default)
(defvar term-current-face 'default)
(defvar term-scroll-start 0) ;; Top-most line (inclusive) of scrolling region.
(defvar term-scroll-end) ;; Number of line (zero-based) after scrolling region.
(defvar term-pager-count nil) ;; If nil, paging is disabled.
......@@ -1365,11 +1365,14 @@ The main purpose is to get rid of the local keymap."
(defvar term-termcap-format
;;; : -undefine ic
"termcap capabilities supported")
......@@ -1386,10 +1389,9 @@ The main purpose is to get rid of the local keymap."
(format "TERM=%s" term-term-name)
(if (and (boundp 'system-uses-terminfo) system-uses-terminfo)
(format "TERMINFO=%s" data-directory)
(format term-termcap-format "TERMCAP="
term-term-name term-height term-width))
(format "TERMINFO=%s" data-directory)
(format term-termcap-format "TERMCAP="
term-term-name term-height term-width)
;; Breaks `./configure' of w3 and url which try to run $EMACS.
(format "EMACS=%s (term:%s)" emacs-version term-protocol-version)
(format "LINES=%d" term-height)
......@@ -1409,18 +1411,6 @@ if [ $1 = .. ]; then shift; fi; exec \"$@\""
command switches)))
;;; This should be in Emacs, but it isn't.
(defun term-mem (item list &optional elt=)
"Test to see if ITEM is equal to an item in LIST.
Option comparison function ELT= defaults to equal."
(let ((elt= (or elt= (function equal)))
(done nil))
(while (and list (not done))
(if (funcall elt= item (car list))
(setq done list)
(setq list (cdr list))))
;;; Input history processing in a buffer
;;; ===========================================================================
......@@ -2990,6 +2980,14 @@ See `term-prompt-regexp'."
((eq parameter 8)
(setq term-ansi-current-invisible 1))
;;; Reset reverse (i.e. terminfo rmso)
((eq parameter 24)
(setq term-ansi-current-reverse 0))
;;; Reset underline (i.e. terminfo rmul)
((eq parameter 27)
(setq term-ansi-current-underline 0))
;;; Foreground
((and (>= parameter 30) (<= parameter 37))
(setq term-ansi-current-color (- parameter 29)))
......@@ -3044,9 +3042,13 @@ See `term-prompt-regexp'."
(setq term-current-face
(list :background
(elt ansi-term-color-vector term-ansi-current-color)
(if (= term-ansi-current-color 0)
(face-foreground 'default)
(elt ansi-term-color-vector term-ansi-current-color))
(elt ansi-term-color-vector term-ansi-current-bg-color)))
(if (= term-ansi-current-bg-color 0)
(face-background 'default)
(elt ansi-term-color-vector term-ansi-current-bg-color))))
(if (= term-ansi-current-bold 1)
(setq term-current-face
(append '(:weight bold) term-current-face)))
......@@ -3503,7 +3505,7 @@ all pending output has been dealt with."))
(if (and check-for-scroll (or term-scroll-with-delete term-pager-count))
(setq down (term-handle-scroll down)))
(term-adjust-current-row-cache down)
(if (/= (point) (point-max))
(if (or (/= (point) (point-max)) (< down 0))
(setq down (- down (term-vertical-motion down))))
;; Extend buffer with extra blank lines if needed.
(cond ((> down 0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment