unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* narrow-to-page:  when page-delimiter spans lines, exclude if from narrowed bit.
@ 2005-09-06  8:39 Alan Mackenzie
  0 siblings, 0 replies; only message in thread
From: Alan Mackenzie @ 2005-09-06  8:39 UTC (permalink / 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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-06  8:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-06  8:39 narrow-to-page: when page-delimiter spans lines, exclude if from narrowed bit Alan Mackenzie

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).