]> git.eshelyaron.com Git - emacs.git/commitdiff
Cosmetic changes for some lisp/url files.
authorGlenn Morris <rgm@gnu.org>
Sun, 3 Oct 2010 21:37:41 +0000 (14:37 -0700)
committerGlenn Morris <rgm@gnu.org>
Sun, 3 Oct 2010 21:37:41 +0000 (14:37 -0700)
* lisp/url/url-util.el (url-get-url-filename-chars): Don't eval-and-compile.
(url-get-url-at-point): Don't use eval-when-compile.

* lisp/url/url-cache.el (url-cache-create-filename-human-readable)
(url-cache-create-filename-using-md5):
* lisp/url/url-util.el (url-file-directory, url-file-nondirectory):
Don't use eval-when-compile and regexp-quote.

lisp/url/ChangeLog
lisp/url/url-cache.el
lisp/url/url-util.el

index fb6f1221a762c74d7605363cb8201c60d7b3986b..f50808ff8ddec2b1ecbb3e12f8a41088fe080621 100644 (file)
@@ -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
index a2ed064d72ba88aa7acae93178f1805765c56351..4ef8ab5d902da4a80af42c0e3a5ee808af700d36 100644 (file)
@@ -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
index 95fdcfb369cea23f875bb6f5e831377ee3dce70a..62a9a75f2db67b7b367575562873a3df0902a984 100644 (file)
@@ -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)