]> code.delx.au - gnu-emacs/blobdiff - lisp/term.el
Update AUCTeX
[gnu-emacs] / lisp / term.el
index b1144268a09ee03faa4c6ce8d7ca6924bb88c3de..9866db7e29cb6e9bbde1a8ad3af96ad137f3a4d3 100644 (file)
@@ -658,14 +658,12 @@ Buffer local variable.")
 (put 'term-scroll-show-maximum-output 'permanent-local t)
 (put 'term-ptyp 'permanent-local t)
 
-;; True if running under XEmacs (previously Lucid Emacs).
-(defmacro term-is-xemacs ()  '(string-match "Lucid" emacs-version))
 ;; Do FORM if running under XEmacs (previously Lucid Emacs).
 (defmacro term-if-xemacs (&rest forms)
-  (if (term-is-xemacs) (cons 'progn forms)))
+  (if (featurep 'xemacs) (cons 'progn forms)))
 ;; Do FORM if NOT running under XEmacs (previously Lucid Emacs).
 (defmacro term-ifnot-xemacs (&rest forms)
-  (if (not (term-is-xemacs)) (cons 'progn forms)))
+  (if (not (featurep 'xemacs)) (cons 'progn forms)))
 
 (defmacro term-in-char-mode () '(eq (current-local-map) term-raw-map))
 (defmacro term-in-line-mode () '(not (term-in-char-mode)))
@@ -707,18 +705,18 @@ Buffer local variable.")
 
 ;;; faces -mm
 
-(defcustom term-default-fg-color nil
+(defcustom term-default-fg-color 'unspecified
   "Default color for foreground in `term'."
   :group 'term
   :type 'string)
 
-(defcustom term-default-bg-color nil
+(defcustom term-default-bg-color 'unspecified
   "Default color for background in `term'."
   :group 'term
   :type 'string)
 
 (defvar ansi-term-color-vector
-  [nil "black" "red" "green" "yellow" "blue"
+  [unspecified "black" "red" "green" "yellow" "blue"
    "magenta" "cyan" "white"])
 
 ;;; Inspiration came from comint.el -mm
@@ -923,6 +921,14 @@ is buffer-local.")
     (define-key term-raw-map [next] 'term-send-next)))
 
 (term-set-escape-char ?\C-c)
+
+(defun term-window-width ()
+  (if (featurep 'xemacs)
+      (1- (window-width))
+    (if window-system
+       (window-width)
+      (1- (window-width)))))
+
 \f
 (put 'term-mode 'mode-class 'special)
 
@@ -980,8 +986,10 @@ Entry to this mode runs the hooks on `term-mode-hook'."
   (make-local-variable 'term-saved-home-marker)
   (make-local-variable 'term-height)
   (make-local-variable 'term-width)
-  (setq term-width (1- (window-width)))
+  (setq term-width (term-window-width))
   (setq term-height (1- (window-height)))
+  (term-ifnot-xemacs
+   (set (make-local-variable 'overflow-newline-into-fringe) nil))
   (make-local-variable 'term-terminal-parameter)
   (make-local-variable 'term-saved-cursor)
   (make-local-variable 'term-last-input-start)
@@ -1116,9 +1124,9 @@ Entry to this mode runs the hooks on `term-mode-hook'."
 
 (defun term-check-size (process)
   (if (or (/= term-height (1- (window-height)))
-         (/= term-width (1- (window-width))))
+         (/= term-width (term-window-width)))
       (progn
-       (term-reset-size (1- (window-height)) (1- (window-width)))
+       (term-reset-size (1- (window-height)) (term-window-width))
        (set-process-window-size process term-height term-width))))
 
 (defun term-send-raw-string (chars)
@@ -3072,8 +3080,7 @@ See `term-prompt-regexp'."
              (setq term-current-face
                    (append '(:underline t) term-current-face))))))
 
-;      (message "Debug %S" term-current-face)
-
+;;;    (message "Debug %S" term-current-face)
   (setq term-ansi-face-already-done 0))