[Top][All Lists]

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

Re: line beginning with a regexp.

From: G Annamalai
Subject: Re: line beginning with a regexp.
Date: 23 Feb 2001 11:11:24 +0530
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 (Eduardo Ochs) writes:

>   (defun foo () (interactive)
>     (let ((fill-column 4000))
>       (fill-region-as-paragraph
>        (point)
>        (search-forward ");"))))

Yes.  This also worked.  I mapped this function to a key and used
keyboard macros to work on the whole buffer.

> (defun query-replaces (&rest rest)
>   (save-excursion
>     (save-restriction
>       (narrow-to-region (point) (mark))
>       (while rest
>       (goto-char (point-min))
>       (query-replace (car rest) (car (cdr rest)))
>       ;; (query-replace-regexp (regexp-quote (car rest)) (car (cdr rest)))
>       (setq rest (cdr (cdr rest)))))))

This, as I can see, is the elisp code for Maragato's interactive
solution.  This one is also working perfectly well.  Since my
file had more than two thousand lines I replaced query-replace
with replace-string.

Thank you for all you help.  I sure am learning to use Emacs more


Vi is the God of editors.
Emacs is the editor of Gods.

reply via email to

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