diff --git a/doc/ChangeLog b/doc/ChangeLog
index 59285267..4b95948f 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-23  Hrvoje Niksic  <hniksic@xemacs.org>
+
+	* texi2pod.pl.in: First process @@ then @}, so @samp{-wget@@} is
+	interpreted correctly.
+
 2005-04-20  Hrvoje Niksic  <hniksic@xemacs.org>
 
 	* wget.texi: Document behavior of -6 wrt mapped IPv4 addresses.
diff --git a/doc/texi2pod.pl.in b/doc/texi2pod.pl.in
index dc81e747..b2a3d385 100644
--- a/doc/texi2pod.pl.in
+++ b/doc/texi2pod.pl.in
@@ -204,9 +204,9 @@ while(<$inf>) {
     # Now the ones that have to be replaced by special escapes
     # (which will be turned back into text by unmunge())
     s/&/&amp;/g;
+    s/\@\@/&at;/g;
     s/\@\{/&lbrace;/g;
     s/\@\}/&rbrace;/g;
-    s/\@\@/&at;/g;
 
     # Inside a verbatim block, handle @var specially.
     if ($shift ne "") {