[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A few questions about occur-mode
From: |
Juanma Barranquero |
Subject: |
Re: A few questions about occur-mode |
Date: |
Mon, 23 Sep 2002 13:04:54 +0200 |
On Mon, 23 Sep 2002 00:45:01 +0100, John Paul Wallington <address@hidden> wrote:
> `occur-next' and `occur-prev' work in the EMACS_21_1_RC branch.
You're right. Somewhere in the big revamp of occur this functionality
was lost somehow.
> In HEAD they could be changed to use `occur-match' property instead of
> `occur-point', or `occur-engine' could add `occur-point' properties to
> its output. Which is better ?
Using occur-match seems more economical, but then `occur-next' and
`occur-prev' should have to be modified. The occur-point property was
set in just one character at the end of the match; with occur-match, the
entire match is propertized and occur-{next|prev} would first jump to
the start of the match, then to the end. Not that is difficult, of
course. sh-script.el should have to be modified too.
OTOH, adding back occur-point is a one- or two- line change:
Index: replace.el
===================================================================
RCS file: /cvs/emacs/lisp/replace.el,v
retrieving revision 1.159
diff -u -2 -r1.159 replace.el
--- replace.el 18 Sep 2002 16:03:58 -0000 1.159
+++ replace.el 23 Sep 2002 11:03:55 -0000
@@ -822,5 +822,6 @@
`(font-lock-face ,match-face)))
curstring)
- (setq start (match-end 0))))
+ (setq start (match-end 0))
+ (put-text-property start (1+ start) 'occur-point t
curstring)))
;; Generate the string to insert for this match
(let* ((out-line
/L/e/k/t/u
- A few questions about occur-mode, Juanma Barranquero, 2002/09/20
- Re: A few questions about occur-mode, Richard Stallman, 2002/09/23
- Re: A few questions about occur-mode, Juanma Barranquero, 2002/09/24
- Re: A few questions about occur-mode, Juanma Barranquero, 2002/09/24
- Re: A few questions about occur-mode, Richard Stallman, 2002/09/24
- Re: A few questions about occur-mode, Richard Stallman, 2002/09/24
- Re: A few questions about occur-mode, Richard Stallman, 2002/09/22