From 9c465dbf1dcf367bff1e66086d98b47d0e0fff7f Mon Sep 17 00:00:00 2001 From: morioka Date: Tue, 26 Jan 1999 08:45:21 +0000 Subject: [PATCH] (std11-field-end): Add new optional argument `bound'. --- std11.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/std11.el b/std11.el index fd7133f..a083236 100644 --- a/std11.el +++ b/std11.el @@ -39,11 +39,12 @@ (defconst std11-next-field-head-regexp (concat "\n" std11-field-name-regexp ":")) -(defun std11-field-end () - "Move to end of field and return this point." - (if (re-search-forward std11-next-field-head-regexp nil t) +(defun std11-field-end (&optional bound) + "Move to end of field and return this point. +The optional argument BOUNDs the search; it is a buffer position." + (if (re-search-forward std11-next-field-head-regexp bound t) (goto-char (match-beginning 0)) - (if (re-search-forward "^$" nil t) + (if (re-search-forward "^$" bound t) (goto-char (1- (match-beginning 0))) (end-of-line) )) -- 1.7.10.4