0
votes

the signature of the query-replace function in emacs looks like this :

(query-replace FROM-STRING TO-STRING &optional DELIMITED START END) My question is how can I specify the DELIMITED argument.

The docs indicate: " Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace only matches surrounded by word boundaries."

So I'm assuming it would be just like a numeric argument specified before a command (i.e. calling undo 8 times with M-8 C-x u) but haven't figured it out. Can anyone help?

2

2 Answers

1
votes

(query-replace "foo" "bar" "your demeter") or C-u M-%

1
votes

Ross mentioned using M-< to get to the buffer beginning, then using M-%. Know too that you can always use C-x h to mark the whole buffer as the region. (But you do not need to do that here -- just use M-<.)