remove nterm-debug-assert it's not useful

 

File modified: lisp/nterm/nterm.el

Change342 at Sat Aug 14 13:33:56 2010 +0200 by Ivan Kanis <ivan@tao>

diff -r 4b10d172f987 -r f75db99a73be lisp/nterm/nterm.el
--- a/lisp/nterm/nterm.el	Sat Aug 14 11:13:26 2010 +0200
+++ b/lisp/nterm/nterm.el	Sat Aug 14 13:33:56 2010 +0200
@@ -130,8 +130,6 @@
 (defvar nterm-debug-cursor nil)
 (defvar nterm-debug-ansi nil)
 (defvar nterm-debug-vt52 nil)
-(defvar nterm-debug-assert nil)
-
 (defvar nterm-record-enable nil
   "Enable recording")
 
@@ -213,23 +211,24 @@
 (defun nterm-assert ()
   "Check integrity of the emulator"
   (interactive)
-  (let ((line (count-lines (point-min) (point-max))))
-    (if (not (= line nterm-height))
-        (error "Number of lines is %d but nterm-height is %d"
-               line nterm-height))
-    (setq line 0)
-    (while (< line nterm-height)
-      (let ((assert-width
-             (progn
-               (goto-line (1+ line))
-               (- (line-end-position) (point))))
-            (assert-expected-width
-             (if (nterm-mem-line-dwl line)
-                 (/ nterm-width 2) nterm-width)))
-        (if (not (= assert-width assert-expected-width))
-            (error "Line %d is not %d character long"
-                   line assert-expected-width)))
-      (setq line (1+ line)))))
+  (with-current-buffer nterm-buffer-name
+    (let ((line (count-lines (point-min) (point-max))))
+      (if (not (= line nterm-height))
+          (error "Number of lines is %d but nterm-height is %d"
+                 line nterm-height))
+      (setq line 0)
+      (while (< line nterm-height)
+        (let ((assert-width
+               (progn
+                 (goto-line (1+ line))
+                 (- (line-end-position) (point))))
+              (assert-expected-width
+               (if (nterm-mem-line-dwl line)
+                   (/ nterm-width 2) nterm-width)))
+          (if (not (= assert-width assert-expected-width))
+              (error "Line %d is not %d character long"
+                     line assert-expected-width)))
+        (setq line (1+ line))))))
 
 (defun nterm-blank-screen (&optional char)
   "Blank screen and memory with CHAR.
@@ -328,8 +327,6 @@
                         (message "received 0x%x %c dispatch %S"
                                  emulate-char emulate-char emulate-dispatch))
                     (funcall emulate-dispatch emulate-char)
-                    (if nterm-debug-assert
-                        (nterm-assert)))
                 (if nterm-debug-emulator
                     (message "received 0x%x not handled" emulate-char)))))
         (incf emulate-index)))))
@@ -611,7 +608,7 @@
 
 (defun nterm-background(index))
 
-;;; vt100 emulator
+;;; Vt100 emulator
 ;; I have used the vt100 User Guide at
 ;; http://vt100.net/docs/vt100-ug/
 (defvar nterm-vt100-state nil
@@ -797,6 +794,7 @@
 (defconst nterm-vt100-line-decdwl-bottom 3
   "Line is bottom double width")
 
+;;; Dispatch tables
 (nterm-defdispatch ; Primary dispatch of a VT100
  '(nterm-vt100-primary-dispatch
    128 nterm-vt100-char-self
@@ -1620,7 +1618,6 @@
   "Returns DECOM mode"
   (aref nterm-vt100-mode 6))
 
-
 (defun nterm-vt100-mode-deckpam ()
   (aref nterm-vt100-mode 10))
 


back