aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Janík2002-05-18 08:05:54 +0000
committerPavel Janík2002-05-18 08:05:54 +0000
commit17b1725804cc726fa23158e4bcddf1a27ae94ca1 (patch)
treeddc8479e0907a16a81f11c0e76d93c5297915d98
parentdacec5966e2e4978bb3c4a7476c3986c3a97b79d (diff)
downloademacs-17b1725804cc726fa23158e4bcddf1a27ae94ca1.tar.gz
emacs-17b1725804cc726fa23158e4bcddf1a27ae94ca1.zip
(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 021b651d540..9c4c70376cf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12002-05-17 Thomas Morgan <tlm@pocketmail.com>
2
3 * forms.el (forms-jump-record, forms-insert-record)
4 (forms-delete-record): Calculate lines from the beginning of the
5 accessible portion rather than from the beginning of the buffer.
6
12002-05-16 Eli Zaretskii <eliz@is.elta.co.il> 72002-05-16 Eli Zaretskii <eliz@is.elta.co.il>
2 8
3 * ps-mule.el (eval-and-compile): Add a trivial replacement for a 9 * ps-mule.el (eval-and-compile): Add a trivial replacement for a
diff --git a/lisp/forms.el b/lisp/forms.el
index 0a25e77bd73..8b75766590c 100644
--- a/lisp/forms.el
+++ b/lisp/forms.el
@@ -301,10 +301,10 @@
301(provide 'forms) ;;; official 301(provide 'forms) ;;; official
302(provide 'forms-mode) ;;; for compatibility 302(provide 'forms-mode) ;;; for compatibility
303 303
304(defconst forms-version (substring "$Revision: 2.41 $" 11 -2) 304(defconst forms-version (substring "$Revision: 2.42 $" 11 -2)
305 "The version number of forms-mode (as string). The complete RCS id is: 305 "The version number of forms-mode (as string). The complete RCS id is:
306 306
307 $Id: forms.el,v 2.41 2001/02/07 23:40:52 fx Exp $") 307 $Id: forms.el,v 2.42 2001/07/16 12:22:58 pj Exp $")
308 308
309(defcustom forms-mode-hooks nil 309(defcustom forms-mode-hooks nil
310 "Hook run upon entering Forms mode." 310 "Hook run upon entering Forms mode."
@@ -1700,7 +1700,8 @@ As a side effect: sets `forms--the-record-list'."
1700 (if (zerop disp) 1700 (if (zerop disp)
1701 nil 1701 nil
1702 (setq cur (+ cur disp (- (forward-line disp))))) 1702 (setq cur (+ cur disp (- (forward-line disp)))))
1703 (setq cur (+ cur disp (- (goto-line arg))))) 1703 (goto-char (point-min))
1704 (setq cur (+ cur disp (- (forward-line (1- arg))))))
1704 1705
1705 (forms--get-record))) 1706 (forms--get-record)))
1706 1707
@@ -1810,7 +1811,8 @@ after the current record."
1810 1811
1811 (save-excursion 1812 (save-excursion
1812 (set-buffer forms--file-buffer) 1813 (set-buffer forms--file-buffer)
1813 (goto-line ln) 1814 (goto-char (point-min))
1815 (forward-line (1- ln))
1814 (open-line 1) 1816 (open-line 1)
1815 (insert the-record) 1817 (insert the-record)
1816 (beginning-of-line)) 1818 (beginning-of-line))
@@ -1833,7 +1835,8 @@ after the current record."
1833 (let ((ln forms--current-record)) 1835 (let ((ln forms--current-record))
1834 (save-excursion 1836 (save-excursion
1835 (set-buffer forms--file-buffer) 1837 (set-buffer forms--file-buffer)
1836 (goto-line ln) 1838 (goto-char (point-min))
1839 (forward-line (1- ln))
1837 ;; Use delete-region instead of kill-region, to avoid 1840 ;; Use delete-region instead of kill-region, to avoid
1838 ;; adding junk to the kill-ring. 1841 ;; adding junk to the kill-ring.
1839 (delete-region (progn (beginning-of-line) (point)) 1842 (delete-region (progn (beginning-of-line) (point))