diff options
author | Miles Bader <miles@gnu.org> | 2007-08-13 13:41:28 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-08-13 13:41:28 +0000 |
commit | 37cc095b6a175fb5a2fb18fa029eaf3aa3b3fa53 (patch) | |
tree | 7fb68e80f66e55100c48b9751cf70c74af2d4bf1 /lisp/emulation/tpu-edt.el | |
parent | 031b6333283be57d971e557b83da31c6be937b0a (diff) | |
parent | 9d2db4c6637fe37d75f947063bcb2ecce319a1bc (diff) | |
download | emacs-37cc095b6a175fb5a2fb18fa029eaf3aa3b3fa53.tar.gz |
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-851
Diffstat (limited to 'lisp/emulation/tpu-edt.el')
-rw-r--r-- | lisp/emulation/tpu-edt.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el index f3792b92e42..81187112a66 100644 --- a/lisp/emulation/tpu-edt.el +++ b/lisp/emulation/tpu-edt.el @@ -792,10 +792,13 @@ Create the key map if necessary." (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))))) ;;; @@ -2422,6 +2425,7 @@ If FILE is nil, try to load a default file. The default file names are (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) |