[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/url/url-util.el,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/url/url-util.el,v |
Date: |
Mon, 15 Oct 2007 02:07:58 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 07/10/15 02:07:53
Index: lisp/url/url-util.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/url/url-util.el,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- lisp/url/url-util.el 21 Sep 2007 02:55:41 -0000 1.19
+++ lisp/url/url-util.el 15 Oct 2007 02:07:51 -0000 1.20
@@ -259,18 +259,24 @@
(/ (* x 100) y)))
;;;###autoload
-(defun url-basepath (file &optional x)
- "Return the base pathname of FILE, or the actual filename if X is true."
+(defun url-file-directory (file)
+ "Return the directory part of FILE, for a URL."
(cond
((null file) "")
((string-match (eval-when-compile (regexp-quote "?")) file)
- (if x
- (file-name-nondirectory (substring file 0 (match-beginning 0)))
- (file-name-directory (substring file 0 (match-beginning 0)))))
- (x (file-name-nondirectory file))
+ (file-name-directory (substring file 0 (match-beginning 0))))
(t (file-name-directory file))))
;;;###autoload
+(defun url-file-nondirectory (file)
+ "Return the nondirectory part of FILE, for a URL."
+ (cond
+ ((null file) "")
+ ((string-match (eval-when-compile (regexp-quote "?")) file)
+ (file-name-nondirectory (substring file 0 (match-beginning 0))))
+ (t (file-name-nondirectory file))))
+
+;;;###autoload
(defun url-parse-query-string (query &optional downcase allow-newlines)
(let (retval pairs cur key val)
(setq pairs (split-string query "&"))
@@ -385,7 +391,7 @@
If optional variable X is t,
then return the basename of the file with the extension stripped off."
(if (and fname
- (setq fname (url-basepath fname t))
+ (setq fname (url-file-nondirectory fname))
(string-match "\\.[^./]+$" fname))
(if x (substring fname 0 (match-beginning 0))
(substring fname (match-beginning 0) nil))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/url/url-util.el,v,
Miles Bader <=