From: Juri Linkov <juri@jurta.org>
To: emacs-devel@gnu.org
Subject: Re: Occur multi-line matches
Date: Tue, 30 Mar 2010 19:05:55 +0300 [thread overview]
Message-ID: <8739zhdcbg.fsf@mail.jurta.org> (raw)
In-Reply-To: <87k4sxfsqk.fsf@mail.jurta.org> (Juri Linkov's message of "Sat, 27 Mar 2010 21:51:31 +0200")
If someone for some reason might want to keep the old behaviour,
then a new option could be added. This patch gives a hint where
to use such an option to restore the old behaviour:
=== modified file 'lisp/replace.el'
--- lisp/replace.el 2010-03-28 23:16:36 +0000
+++ lisp/replace.el 2010-03-29 16:02:35 +0000
@@ -1379,7 +1379,7 @@ (defun occur-context-lines (out-line nli
;; Combine after-lines of the previous match
;; with before-lines of the current match.
- (when prev-after-lines
+ (when nil ;; use some new option
;; Don't overlap prev after-lines with current before-lines.
(if (>= (+ prev-lines (length prev-after-lines))
(- lines (length before-lines)))
@@ -1390,7 +1390,7 @@ (defun occur-context-lines (out-line nli
;; Separate non-overlapping context lines with a dashed line.
(setq separator "-------\n")))
- (when prev-lines
+ (when nil ;; use some new option
;; Don't overlap current before-lines with previous match line.
(if (<= (- lines (length before-lines))
prev-lines)
@@ -1408,7 +1408,7 @@ (defun occur-context-lines (out-line nli
(append
(and prev-after-lines
(occur-engine-add-prefix prev-after-lines))
- (and separator (list separator))
+ (and prev-after-lines (list "-------\n"))
(occur-engine-add-prefix before-lines)
(list out-line)))
;; And the second element is the list of context after-lines.
--
Juri Linkov
http://www.jurta.org/emacs/
prev parent reply other threads:[~2010-03-30 16:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-23 7:27 Occur multi-line matches Juri Linkov
2010-03-23 7:42 ` Juri Linkov
2010-03-23 13:01 ` Stefan Monnier
2010-03-23 15:19 ` Richard Stallman
2010-03-27 19:51 ` Juri Linkov
2010-03-30 16:05 ` Juri Linkov [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8739zhdcbg.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.