emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/emulation/tpu-edt.el, v [EMACS_22_BA


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/emulation/tpu-edt.el, v [EMACS_22_BASE]
Date: Mon, 06 Aug 2007 16:21:37 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Stefan Monnier <monnier>        07/08/06 16:21:36

Index: emulation/tpu-edt.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emulation/tpu-edt.el,v
retrieving revision 1.49.2.3
retrieving revision 1.49.2.4
diff -u -b -r1.49.2.3 -r1.49.2.4
--- emulation/tpu-edt.el        2 Aug 2007 17:43:00 -0000       1.49.2.3
+++ emulation/tpu-edt.el        6 Aug 2007 16:21:33 -0000       1.49.2.4
@@ -826,10 +826,13 @@
         (use-local-map tpu-buffer-local-map)))
   (local-set-key key func))
 
-(defun tpu-current-line nil
+(defun tpu-current-line ()
   "Return the vertical position of point in the selected window.
 Top line is 0.  Counts each text line only once, even if it wraps."
-  (+ (count-lines (window-start) (point)) (if (= (current-column) 0) 1 0) -1))
+  (or
+   (cdr (nth 6 (posn-at-point)))
+   (if (eq (window-start) (point)) 0
+     (1- (count-screen-lines (window-start) (point) 'count-final-newline)))))
 
 
 ;;;
@@ -2479,6 +2482,7 @@
         (if (eq tpu-global-map parent)
             (set-keymap-parent map (keymap-parent parent))
           (setq map parent)))))
+  (ad-disable-regexp "\\`tpu-")
   (setq tpu-edt-mode nil))
 
 (provide 'tpu-edt)




reply via email to

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