summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/url/ChangeLog10
-rw-r--r--lisp/url/url-cache.el6
-rw-r--r--lisp/url/url-util.el13
3 files changed, 17 insertions, 12 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index fb6f1221a76..f50808ff8dd 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-03 Glenn Morris <rgm@gnu.org>
+
+ * url-util.el (url-get-url-filename-chars): Don't eval-and-compile.
+ (url-get-url-at-point): Don't use eval-when-compile.
+
+ * url-cache.el (url-cache-create-filename-human-readable)
+ (url-cache-create-filename-using-md5):
+ * url-util.el (url-file-directory, url-file-nondirectory):
+ Don't use eval-when-compile and regexp-quote.
+
2010-10-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* url-vars.el (url-mime-charset-string): Changed the default to
diff --git a/lisp/url/url-cache.el b/lisp/url/url-cache.el
index a2ed064d72b..4ef8ab5d902 100644
--- a/lisp/url/url-cache.el
+++ b/lisp/url/url-cache.el
@@ -103,8 +103,7 @@ The actual return value is the last modification time of the cache file."
(user-real-login-name)
(cons (or protocol "file")
(reverse (split-string (or hostname "localhost")
- (eval-when-compile
- (regexp-quote ".")))))))
+ "\\.")))))
(fname (url-filename urlobj)))
(if (and fname (/= (length fname) 0) (= (aref fname 0) ?/))
(setq fname (substring fname 1 nil)))
@@ -164,8 +163,7 @@ Very fast if you have an `md5' primitive function, suitably fast otherwise."
(nreverse
(delq nil
(split-string (or hostname "localhost")
- (eval-when-compile
- (regexp-quote "."))))))))
+ "\\."))))))
(fname (url-filename urlobj)))
(and fname
(expand-file-name checksum
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index 95fdcfb369c..62a9a75f2db 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -248,7 +248,7 @@ Will not do anything if `url-show-status' is nil."
"Return the directory part of FILE, for a URL."
(cond
((null file) "")
- ((string-match (eval-when-compile (regexp-quote "?")) file)
+ ((string-match "\\?" file)
(file-name-directory (substring file 0 (match-beginning 0))))
(t (file-name-directory file))))
@@ -257,7 +257,7 @@ Will not do anything if `url-show-status' is nil."
"Return the nondirectory part of FILE, for a URL."
(cond
((null file) "")
- ((string-match (eval-when-compile (regexp-quote "?")) file)
+ ((string-match "\\?" file)
(file-name-nondirectory (substring file 0 (match-beginning 0))))
(t (file-name-nondirectory file))))
@@ -436,10 +436,8 @@ This uses `url-current-object', set locally to the buffer."
(url-recreate-url url-current-object)
(message "%s" (url-recreate-url url-current-object)))))
-(eval-and-compile
- (defvar url-get-url-filename-chars "-%.?@a-zA-Z0-9()_/:~=&"
- "Valid characters in a URL.")
- )
+(defvar url-get-url-filename-chars "-%.?@a-zA-Z0-9()_/:~=&"
+ "Valid characters in a URL.")
(defun url-get-url-at-point (&optional pt)
"Get the URL closest to point, but don't change position.
@@ -457,8 +455,7 @@ Has a preference for looking backward when not directly on a symbol."
(if (not (bobp))
(backward-char 1)))))
(if (and (char-after (point))
- (string-match (eval-when-compile
- (concat "[" url-get-url-filename-chars "]"))
+ (string-match (concat "[" url-get-url-filename-chars "]")
(char-to-string (char-after (point)))))
(progn
(skip-chars-backward url-get-url-filename-chars)