aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Janík <[email protected]>2002-05-18 08:05:54 +0000
committerPavel Janík <[email protected]>2002-05-18 08:05:54 +0000
commit17b1725804cc726fa23158e4bcddf1a27ae94ca1 (patch)
treeddc8479e0907a16a81f11c0e76d93c5297915d98
parentdacec5966e2e4978bb3c4a7476c3986c3a97b79d (diff)
(forms-jump-record, forms-insert-record, forms-delete-record): Calculate
lines from the beginning of the accessible portion rather than from the beginning of the buffer.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/forms.el13
2 files changed, 14 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 021b651d54..9c4c70376c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2002-05-17 Thomas Morgan <[email protected]>
+
+ * forms.el (forms-jump-record, forms-insert-record)
+ (forms-delete-record): Calculate lines from the beginning of the
+ accessible portion rather than from the beginning of the buffer.
+
2002-05-16 Eli Zaretskii <[email protected]>
* ps-mule.el (eval-and-compile): Add a trivial replacement for a
diff --git a/lisp/forms.el b/lisp/forms.el
index 0a25e77bd7..8b75766590 100644
--- a/lisp/forms.el
+++ b/lisp/forms.el
@@ -301,10 +301,10 @@
(provide 'forms) ;;; official
(provide 'forms-mode) ;;; for compatibility
-(defconst forms-version (substring "$Revision: 2.41 $" 11 -2)
+(defconst forms-version (substring "$Revision: 2.42 $" 11 -2)
"The version number of forms-mode (as string). The complete RCS id is:
- $Id: forms.el,v 2.41 2001/02/07 23:40:52 fx Exp $")
+ $Id: forms.el,v 2.42 2001/07/16 12:22:58 pj Exp $")
(defcustom forms-mode-hooks nil
"Hook run upon entering Forms mode."
@@ -1700,7 +1700,8 @@ As a side effect: sets `forms--the-record-list'."
(if (zerop disp)
nil
(setq cur (+ cur disp (- (forward-line disp)))))
- (setq cur (+ cur disp (- (goto-line arg)))))
+ (goto-char (point-min))
+ (setq cur (+ cur disp (- (forward-line (1- arg))))))
(forms--get-record)))
@@ -1810,7 +1811,8 @@ after the current record."
(save-excursion
(set-buffer forms--file-buffer)
- (goto-line ln)
+ (goto-char (point-min))
+ (forward-line (1- ln))
(open-line 1)
(insert the-record)
(beginning-of-line))
@@ -1833,7 +1835,8 @@ after the current record."
(let ((ln forms--current-record))
(save-excursion
(set-buffer forms--file-buffer)
- (goto-line ln)
+ (goto-char (point-min))
+ (forward-line (1- ln))
;; Use delete-region instead of kill-region, to avoid
;; adding junk to the kill-ring.
(delete-region (progn (beginning-of-line) (point))