diff options
| author | Kim F. Storm | 2004-04-05 21:34:05 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-04-05 21:34:05 +0000 |
| commit | 6781410f612123fac0df3a64dc7e4f3ff18e578a (patch) | |
| tree | 731c93304c306c44f246c220a11903740f4634fa | |
| parent | 571fd4d55d35f7419bce0222c56b6684ce601ae4 (diff) | |
| download | emacs-6781410f612123fac0df3a64dc7e4f3ff18e578a.tar.gz emacs-6781410f612123fac0df3a64dc7e4f3ff18e578a.zip | |
(term-is-xemacs): Remove.
(term-if-xemacs, term-ifnot-xemacs): Test (featurep 'xemacs).
(term-window-width): New function.
(term-mode, term-check-size): Use it.
(term-mode): Disable overflow-newline-into-fringe in term buffer.
| -rw-r--r-- | lisp/term.el | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lisp/term.el b/lisp/term.el index b1144268a09..f1bd8d9a4f6 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -658,14 +658,12 @@ Buffer local variable.") | |||
| 658 | (put 'term-scroll-show-maximum-output 'permanent-local t) | 658 | (put 'term-scroll-show-maximum-output 'permanent-local t) |
| 659 | (put 'term-ptyp 'permanent-local t) | 659 | (put 'term-ptyp 'permanent-local t) |
| 660 | 660 | ||
| 661 | ;; True if running under XEmacs (previously Lucid Emacs). | ||
| 662 | (defmacro term-is-xemacs () '(string-match "Lucid" emacs-version)) | ||
| 663 | ;; Do FORM if running under XEmacs (previously Lucid Emacs). | 661 | ;; Do FORM if running under XEmacs (previously Lucid Emacs). |
| 664 | (defmacro term-if-xemacs (&rest forms) | 662 | (defmacro term-if-xemacs (&rest forms) |
| 665 | (if (term-is-xemacs) (cons 'progn forms))) | 663 | (if (featurep 'xemacs) (cons 'progn forms))) |
| 666 | ;; Do FORM if NOT running under XEmacs (previously Lucid Emacs). | 664 | ;; Do FORM if NOT running under XEmacs (previously Lucid Emacs). |
| 667 | (defmacro term-ifnot-xemacs (&rest forms) | 665 | (defmacro term-ifnot-xemacs (&rest forms) |
| 668 | (if (not (term-is-xemacs)) (cons 'progn forms))) | 666 | (if (not (featurep 'xemacs)) (cons 'progn forms))) |
| 669 | 667 | ||
| 670 | (defmacro term-in-char-mode () '(eq (current-local-map) term-raw-map)) | 668 | (defmacro term-in-char-mode () '(eq (current-local-map) term-raw-map)) |
| 671 | (defmacro term-in-line-mode () '(not (term-in-char-mode))) | 669 | (defmacro term-in-line-mode () '(not (term-in-char-mode))) |
| @@ -923,6 +921,14 @@ is buffer-local.") | |||
| 923 | (define-key term-raw-map [next] 'term-send-next))) | 921 | (define-key term-raw-map [next] 'term-send-next))) |
| 924 | 922 | ||
| 925 | (term-set-escape-char ?\C-c) | 923 | (term-set-escape-char ?\C-c) |
| 924 | |||
| 925 | (defun term-window-width () | ||
| 926 | (if (featurep 'xemacs) | ||
| 927 | (1- (window-width)) | ||
| 928 | (if window-system | ||
| 929 | (window-width) | ||
| 930 | (1- (window-width))))) | ||
| 931 | |||
| 926 | 932 | ||
| 927 | (put 'term-mode 'mode-class 'special) | 933 | (put 'term-mode 'mode-class 'special) |
| 928 | 934 | ||
| @@ -980,8 +986,10 @@ Entry to this mode runs the hooks on `term-mode-hook'." | |||
| 980 | (make-local-variable 'term-saved-home-marker) | 986 | (make-local-variable 'term-saved-home-marker) |
| 981 | (make-local-variable 'term-height) | 987 | (make-local-variable 'term-height) |
| 982 | (make-local-variable 'term-width) | 988 | (make-local-variable 'term-width) |
| 983 | (setq term-width (1- (window-width))) | 989 | (setq term-width (term-window-width)) |
| 984 | (setq term-height (1- (window-height))) | 990 | (setq term-height (1- (window-height))) |
| 991 | (term-ifnot-xemacs | ||
| 992 | (set (make-local-variable 'overflow-newline-into-fringe) nil)) | ||
| 985 | (make-local-variable 'term-terminal-parameter) | 993 | (make-local-variable 'term-terminal-parameter) |
| 986 | (make-local-variable 'term-saved-cursor) | 994 | (make-local-variable 'term-saved-cursor) |
| 987 | (make-local-variable 'term-last-input-start) | 995 | (make-local-variable 'term-last-input-start) |
| @@ -1116,9 +1124,9 @@ Entry to this mode runs the hooks on `term-mode-hook'." | |||
| 1116 | 1124 | ||
| 1117 | (defun term-check-size (process) | 1125 | (defun term-check-size (process) |
| 1118 | (if (or (/= term-height (1- (window-height))) | 1126 | (if (or (/= term-height (1- (window-height))) |
| 1119 | (/= term-width (1- (window-width)))) | 1127 | (/= term-width (term-window-width))) |
| 1120 | (progn | 1128 | (progn |
| 1121 | (term-reset-size (1- (window-height)) (1- (window-width))) | 1129 | (term-reset-size (1- (window-height)) (term-window-width)) |
| 1122 | (set-process-window-size process term-height term-width)))) | 1130 | (set-process-window-size process term-height term-width)))) |
| 1123 | 1131 | ||
| 1124 | (defun term-send-raw-string (chars) | 1132 | (defun term-send-raw-string (chars) |