Mercurial > emacs
view doc/lispref/back.texi @ 107653:bfde3c2dbef5
Make occur handle multi-line matches cleanly with context.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01280.html
* replace.el (occur-accumulate-lines): Add optional arg `pt'.
(occur-engine): Add local variables `ret', `prev-after-lines',
`prev-lines'. Use more arguments for `occur-context-lines'.
Set first elem of its returned list to `data', and the second elem
to `prev-after-lines'. Don't print the separator line.
In the end, print remaining context after-lines.
(occur-context-lines): Add new arguments `begpt', `endpt',
`lines', `prev-lines', `prev-after-lines'. Rewrite to combine
after-lines of the previous match with before-lines of the
current match and not overlap them. Return a list with two
values: the output line and the list of context after-lines.
* search.texi (Other Repeating Search): Remove line that `occur'
can not handle multiline matches.
* occur-testsuite.el (occur-tests): Add tests for context lines.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Tue, 30 Mar 2010 19:03:08 +0300 |
parents | 1d1d5d9bd884 |
children | 376148b31b5e |
line wrap: on
line source
\input texinfo @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @c @c %**start of header @setfilename back-cover @settitle GNU Emacs Lisp Reference Manual @c %**end of header . @sp 7 @center @titlefont {GNU Emacs Lisp} @sp 1 @quotation Most of the GNU Emacs text editor is written in the programming language called Emacs Lisp. You can write new code in Emacs Lisp and install it as an extension to the editor. However, Emacs Lisp is more than a mere ``extension language''; it is a full computer programming language in its own right. You can use it as you would any other programming language. Because Emacs Lisp is designed for use in an editor, it has special features for scanning and parsing text as well as features for handling files, buffers, displays, subprocesses, and so on. Emacs Lisp is closely integrated with the editing facilities; thus, editing commands are functions that can also conveniently be called from Lisp programs, and parameters for customization are ordinary Lisp variables. This manual describes Emacs Lisp. Generally speaking, the earlier chapters describe features of Emacs Lisp that have counterparts in many programming languages, and later chapters describe features that are peculiar to Emacs Lisp or relate specifically to editing. @end quotation @hfil @bye @ignore arch-tag: ac7694c8-1f02-4b42-9531-33ba13b179e1 @end ignore