unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
Subject: narrow-to-page:  when page-delimiter spans lines, exclude if from narrowed bit.
Date: Tue, 6 Sep 2005 08:39:10 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.3.96.1050906081454.440A-100000@acm.acm> (raw)

Hi, Emacs!

Normally in narrow-to-page, when page-delimiter is something nice and
simple like "^^L", the delimiter at the end of the page is excluded from
the region narrowed to.

A change made in version 1.8 was intended to handle multi-line
delimiters, but this change wasn't completed.  Currently, when the page
delimiter spans line breaks, only the last line of the delimiter gets
excluded.  The following patch fixes this.



2005-09-06  Alan Mackenzie  <acm@muc.de>

	* page.el (narrow-to-page): Exclude _entire_ multi-line delimiter
	from the region narrowed to.

*** page.el	Mon Sep  5 12:44:15 2005
--- page-1.19.acm.el	Tue Sep  6 08:10:14 2005
***************
*** 112,118 ****
  	     (save-excursion
  	       (goto-char (match-beginning 0)) ; was (beginning-of-line)
  	       (looking-at page-delimiter)))
! 	(beginning-of-line))
      (narrow-to-region (point)
  		      (progn
  			;; Find the top of the page.
--- 112,118 ----
  	     (save-excursion
  	       (goto-char (match-beginning 0)) ; was (beginning-of-line)
  	       (looking-at page-delimiter)))
! 	(goto-char (match-beginning 0))) ; was (beginning-of-line)
      (narrow-to-region (point)
  		      (progn
  			;; Find the top of the page.


-- 
Alan Mackenzie (Munich, Germany)

                 reply	other threads:[~2005-09-06  8:39 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=Pine.LNX.3.96.1050906081454.440A-100000@acm.acm \
    --to=acm@muc.de \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).