[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: replace-regexp in lisp function

From: David Kastrup
Subject: Re: replace-regexp in lisp function
Date: Mon, 18 Jan 2010 15:11:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

Sven Garbade <address@hidden> writes:

> Hi,
> many thanks. C-x Esc Esc gave me:
>   (query-replace-regexp "\\(<<\\)"
>                       (quote (replace-eval-replacement concat "\\1cn" 
> (replace-quote (+
> (line-number-at-pos) replace-count)) ",")) nil
>                       (if (and transient-mark-mode mark-active) 
> (region-beginning))
>                       (if (and transient-mark-mode mark-active) (region-end)))
> which works inside my function. Looks quite complicate for me...

Depending on the application, the expression (if (and
transient-mark-mode mark-active) (region-beginning)) and its cousin can
get replaced by known values, such as (point-min) and (point-max).

David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]