emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108667: Change term.el to use fon


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108667: Change term.el to use font-lock.
Date: Fri, 02 Nov 2012 02:19:25 -0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108667
fixes bug: http://debbugs.gnu.org/7692
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Wed 2012-06-20 17:21:06 +0800
message:
  Change term.el to use font-lock.
  
  * term.el (term-mode): Set font-lock-defaults.
  (term-move-columns, term-insert-char, term-emulate-terminal)
  (term-erase-in-line, term-insert-spaces): Use font-lock-face.
modified:
  lisp/ChangeLog
  lisp/term.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-06-20 08:34:21 +0000
+++ b/lisp/ChangeLog    2012-06-20 09:21:06 +0000
@@ -3,7 +3,10 @@
        * term.el (term-window-width): Handle the case of a missing right
        fringe (Bug#8837).
        (term-check-size): Use window-text-height (Bug#5445).
-       (term-mode): Use define-derived-mode.  Minor cleanups.
+       (term-mode): Use define-derived-mode.  Minor cleanups.  Set
+       font-lock-defaults (Bug#7692).
+       (term-move-columns, term-insert-char, term-emulate-terminal)
+       (term-erase-in-line, term-insert-spaces): Use font-lock-face.
 
 2012-06-20  Michael Albinus  <address@hidden>
 

=== modified file 'lisp/term.el'
--- a/lisp/term.el      2012-06-20 08:34:21 +0000
+++ b/lisp/term.el      2012-06-20 09:21:06 +0000
@@ -1100,7 +1100,9 @@
   (set (make-local-variable '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)
+
+  (set (make-local-variable 'font-lock-defaults) '(nil t))
+
   (when (featurep 'xemacs)
     (set-buffer-menubar
      (append current-menubar (list term-terminal-menu))))
@@ -2583,13 +2585,13 @@
     ;; from the last character on the line, set the face for the chars
     ;; to default.
     (when (> (point) point-at-eol)
-      (put-text-property point-at-eol (point) 'face 'default))))
+      (put-text-property point-at-eol (point) 'font-lock-face 'default))))
 
 ;; Insert COUNT copies of CHAR in the default face.
 (defun term-insert-char (char count)
   (let ((old-point (point)))
     (insert-char char count)
-    (put-text-property old-point (point) 'face 'default)))
+    (put-text-property old-point (point) 'font-lock-face 'default)))
 
 (defun term-current-row ()
   (cond (term-current-row)
@@ -2813,7 +2815,7 @@
                          (setq term-current-column nil)
 
                          (put-text-property old-point (point)
-                                            'face term-current-face)
+                                            'font-lock-face term-current-face)
                          ;; If the last char was written in last column,
                          ;; back up one column, but remember we did so.
                          ;; Thus we emulate xterm/vt100-style line-wrapping.
@@ -3713,7 +3715,7 @@
       (when wrapped
        (insert ? ))
       (insert ?\n)
-      (put-text-property saved-point (point) 'face 'default)
+      (put-text-property saved-point (point) 'font-lock-face 'default)
       (goto-char saved-point))))
 
 (defun term-erase-in-display (kind)
@@ -3761,7 +3763,7 @@
     ;; from the last character on the line, set the face for the chars
     ;; to default.
     (when (>= (point) pnt-at-eol)
-      (put-text-property pnt-at-eol (point) 'face 'default))
+      (put-text-property pnt-at-eol (point) 'font-lock-face 'default))
     (when (> save-eol (point))
       (delete-region (point) save-eol))
     (goto-char save-point)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]