summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <dominik@science.uva.nl>2006-12-18 11:53:08 +0000
committerCarsten Dominik <dominik@science.uva.nl>2006-12-18 11:53:08 +0000
commit7e4661393919dce268d25def2cb8287a2331b4be (patch)
treea2ef64d7f40a8b5a452efa6714a7f28661f0fee0
parent8195676affea176f0a219d47d962e90f3c8418e0 (diff)
downloademacs-7e4661393919dce268d25def2cb8287a2331b4be.tar.gz
(org-current-line): Make sure that lines are
counted from beginning of buffer. (org-table-copy-region, org-table-paste-rectangle): Make sure that lines are counted from beginning of buffer.
-rw-r--r--lisp/textmodes/org.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index d9baad489a3..6133f531aae 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -5,7 +5,7 @@
;; Author: Carsten Dominik <dominik at science dot uva dot nl>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
-;; Version: 4.56b
+;; Version: 4.56c
;;
;; This file is part of GNU Emacs.
;;
@@ -3238,7 +3238,7 @@ The following commands are available:
(defsubst org-current-line (&optional pos)
(save-excursion
(and pos (goto-char pos))
- (+ (if (bolp) 1 0) (count-lines (point-min) (point)))))
+ (+ (if (bolp) 1 0) (count-lines 1 (point)))))
(defun org-current-time ()
"Current time, possibly rounded to `org-time-stamp-rounding-minutes'."
@@ -12375,11 +12375,11 @@ with `org-table-paste-rectangle'."
(rpl (if cut " " nil)))
(goto-char beg)
(org-table-check-inside-data-field)
- (setq l01 (count-lines (point-min) (point))
+ (setq l01 (org-current-line)
c01 (org-table-current-column))
(goto-char end)
(org-table-check-inside-data-field)
- (setq l02 (count-lines (point-min) (point))
+ (setq l02 (org-current-line)
c02 (org-table-current-column))
(setq l1 (min l01 l02) l2 (max l01 l02)
c1 (min c01 c02) c2 (max c01 c02))
@@ -12410,7 +12410,7 @@ lines."
(error "First cut/copy a region to paste!"))
(org-table-check-inside-data-field)
(let* ((clip org-table-clip)
- (line (count-lines (point-min) (point)))
+ (line (org-current-line))
(col (org-table-current-column))
(org-enable-table-editor t)
(org-table-automatic-realign nil)