[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Applying the same function to all open buffers
From: |
Kevin Rodgers |
Subject: |
Re: Applying the same function to all open buffers |
Date: |
Fri, 10 Nov 2006 08:29:04 -0700 |
User-agent: |
Thunderbird 1.5.0.8 (Windows/20061025) |
mads_lindstroem@yahoo.dk wrote:
How do I apply the same function to all open buffers?
(mapc 'same-function (buffer-list))
For example I would like to do a query-replace in all open buffers
like:
for-all-buffers 'query-replace
This might work, but there's probably a better way using ibuffer or
somthing:
(mapc (lambda (buffer)
(save-excursion
(switch-to-buffer buffer)
(call-interactively 'query-replace)))
(buffer-list))
--
Kevin