]> git.eshelyaron.com Git - emacs.git/commitdiff
(browse-url-url-encode-chars): Use the right parameter name in the function body.
authorMichaël Cadilhac <michael.cadilhac@lrde.org>
Wed, 19 Sep 2007 11:22:03 +0000 (11:22 +0000)
committerMichaël Cadilhac <michael.cadilhac@lrde.org>
Wed, 19 Sep 2007 11:22:03 +0000 (11:22 +0000)
Reported by Johannes Weiner.

lisp/ChangeLog
lisp/net/browse-url.el

index c0b26d26108a5727880456988871e1d93a440196..1c76b0e48f13c92f65a26c87484ede32572b41e1 100644 (file)
@@ -1,3 +1,9 @@
+2007-09-19  Micha\e,Ak\e(Bl Cadilhac  <michael@cadilhac.name>
+
+       * net/browse-url.el (browse-url-url-encode-chars): Use the right
+       parameter name in the function body.
+       Reported by Johannes Weiner.
+
 2007-09-19  Glenn Morris  <rgm@gnu.org>
 
        * net/socks.el (socks-open-network-stream): Signal an explicit
index 33dfb3278649506dc92375d6c9edc2a8e3963688..4d098322c16fed1e239d60f754fa054b8d0ac57c 100644 (file)
@@ -622,15 +622,15 @@ down (this *won't* always work)."
 (defun browse-url-url-encode-chars (text chars)
   "URL-encode the chars in TEXT that match CHARS.
 CHARS is a regexp-like character alternative (e.g., \"[,)$]\")."
-  (let ((encoded-url (copy-sequence url))
+  (let ((encoded-text (copy-sequence text))
        (s 0))
-    (while (setq s (string-match chars encoded-url s))
-      (setq encoded-url
+    (while (setq s (string-match chars encoded-text s))
+      (setq encoded-text
            (replace-match (format "%%%x"
-                                  (string-to-char (match-string 0 encoded-url)))
-                          t t encoded-url)
+                                  (string-to-char (match-string 0 encoded-text)))
+                          t t encoded-text)
            s (1+ s)))
-    encoded-url))
+    encoded-text))
 
 (defun browse-url-encode-url (url)
   "Escape annoying characters in URL.