view info/.arch-inventory @ 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 a33e80b6ae49
children
line wrap: on
line source

# There are only three real source files in this directory:
#
#   "dir", ".cvsignore", and this file, ".arch-inventory"

# Everything else is generated at compile time.  Unfortunately, the "backup"
# category overrides the "source" category, so we have to have horrible
# regexp that matches everything _except_ "dir"...

# 1 or 2 characters long
backup ^[a-zA-Z0-9][-_.a-zA-Z0-9]?$
# 4 or more characters long
backup ^[a-zA-Z0-9][-_.a-zA-Z0-9][-_.a-zA-Z0-9][-_.a-zA-Z0-9]+$
# 3 chars long, but 1st char not "d"
backup ^[abce-zA-Z0-9][-_.a-zA-Z0-9][-_.a-zA-Z0-9]$
# 3 chars long, but 2nd char not "i"
backup ^[a-zA-Z0-9][-_.a-hj-zA-Z0-9][-_.a-zA-Z0-9]$
# 3 chars long, but 3rd char not "r"
backup ^[a-zA-Z0-9][-_.a-zA-Z0-9][-_.a-qs-zA-Z0-9]$

# arch-tag: 60144ab9-cdc1-45b6-8193-b9683c80ec86