all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thomas Morgan <tlm@pocketmail.com>
Subject: Buffer narrowing in Forms mode
Date: 15 May 2002 01:18:34 -0400	[thread overview]
Message-ID: <m2it5qf0ph.fsf@pocketmail.com> (raw)

This patch fixes the behavior of Forms mode with narrowed buffers.

Whenever Forms mode needs to move to a specified line number,
it should calculate from the beginning of the accessible portion
rather than from the beginning of the buffer.

I reported this patch a year ago, but I don't think it was noticed.

*** forms.el.~2.42.~	Mon Jul 16 08:22:58 2001
--- forms.el	Wed May 15 01:07:24 2002
***************
*** 1700,1706 ****
  	   (if (zerop disp)
  	       nil
  	     (setq cur (+ cur disp (- (forward-line disp)))))
! 	 (setq cur (+ cur disp (- (goto-line arg)))))
  
         (forms--get-record)))
  
--- 1700,1707 ----
  	   (if (zerop disp)
  	       nil
  	     (setq cur (+ cur disp (- (forward-line disp)))))
! 	 (goto-char (point-min))
! 	 (setq cur (+ cur disp (- (forward-line (1- arg))))))
  
         (forms--get-record)))
  
***************
*** 1810,1816 ****
  
      (save-excursion
        (set-buffer forms--file-buffer)
!       (goto-line ln)
        (open-line 1)
        (insert the-record)
        (beginning-of-line))
--- 1811,1818 ----
  
      (save-excursion
        (set-buffer forms--file-buffer)
!       (goto-char (point-min))
!       (forward-line (1- ln))
        (open-line 1)
        (insert the-record)
        (beginning-of-line))
***************
*** 1833,1839 ****
        (let ((ln forms--current-record))
  	(save-excursion
  	  (set-buffer forms--file-buffer)
! 	  (goto-line ln)
  	  ;; Use delete-region instead of kill-region, to avoid
  	  ;; adding junk to the kill-ring.
  	  (delete-region (progn (beginning-of-line) (point))
--- 1835,1842 ----
        (let ((ln forms--current-record))
  	(save-excursion
  	  (set-buffer forms--file-buffer)
! 	  (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))

                 reply	other threads:[~2002-05-15  5:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2it5qf0ph.fsf@pocketmail.com \
    --to=tlm@pocketmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.