Mercurial > emacs
changeset 110744:dab4cfd7ea71
Cosmetic changes for some lisp/url files.
* 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.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 03 Oct 2010 14:37:41 -0700 |
parents | 9efd09876018 |
children | af2db97ca17a |
files | lisp/url/ChangeLog lisp/url/url-cache.el lisp/url/url-util.el |
diffstat | 3 files changed, 17 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/url/ChangeLog Sun Oct 03 14:27:04 2010 -0700 +++ b/lisp/url/ChangeLog Sun Oct 03 14:37:41 2010 -0700 @@ -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
--- a/lisp/url/url-cache.el Sun Oct 03 14:27:04 2010 -0700 +++ b/lisp/url/url-cache.el Sun Oct 03 14:37:41 2010 -0700 @@ -103,8 +103,7 @@ (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 @@ (nreverse (delq nil (split-string (or hostname "localhost") - (eval-when-compile - (regexp-quote ".")))))))) + "\\.")))))) (fname (url-filename urlobj))) (and fname (expand-file-name checksum
--- a/lisp/url/url-util.el Sun Oct 03 14:27:04 2010 -0700 +++ b/lisp/url/url-util.el Sun Oct 03 14:37:41 2010 -0700 @@ -248,7 +248,7 @@ "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 @@ "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 @@ (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 @@ (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)