comparison lisp/url/url-util.el @ 91040:14c4a6aac623

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 866-879) - Merge multi-tty branch - Update from CVS - Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
author Miles Bader <miles@gnu.org>
date Thu, 11 Oct 2007 16:14:00 +0000
parents e18c264133a5
children 591c29778a30
comparison
equal deleted inserted replaced
91039:eefadc1e1d5e 91040:14c4a6aac623
166 (let (type data retval) 166 (let (type data retval)
167 (setq data (url-generic-parse-url url) 167 (setq data (url-generic-parse-url url)
168 type (url-type data)) 168 type (url-type data))
169 (if (member type '("www" "about" "mailto" "info")) 169 (if (member type '("www" "about" "mailto" "info"))
170 (setq retval url) 170 (setq retval url)
171 (url-set-target data nil) 171 (setf (url-target data) nil)
172 (setq retval (url-recreate-url data))) 172 (setq retval (url-recreate-url data)))
173 retval)) 173 retval))
174 174
175 ;;;###autoload 175 ;;;###autoload
176 (defun url-lazy-message (&rest args) 176 (defun url-lazy-message (&rest args)
188 "Return a 'real' date string that most HTTP servers can understand." 188 "Return a 'real' date string that most HTTP servers can understand."
189 (require 'timezone) 189 (require 'timezone)
190 (let* ((raw (if specified-time (current-time-string specified-time) 190 (let* ((raw (if specified-time (current-time-string specified-time)
191 (current-time-string))) 191 (current-time-string)))
192 (gmt (timezone-make-date-arpa-standard raw 192 (gmt (timezone-make-date-arpa-standard raw
193 (nth 1 (current-time-zone)) 193 (current-time-zone)
194 "GMT")) 194 "GMT"))
195 (parsed (timezone-parse-date gmt)) 195 (parsed (timezone-parse-date gmt))
196 (day (cdr-safe (assoc (substring raw 0 3) url-weekday-alist))) 196 (day (cdr-safe (assoc (substring raw 0 3) url-weekday-alist)))
197 (year nil) 197 (year nil)
198 (month (car 198 (month (car
419 fr-width (- fr-width 4)) 419 fr-width (- fr-width 4))
420 (while (and (>= str-width fr-width) 420 (while (and (>= str-width fr-width)
421 (string-match "/" fname)) 421 (string-match "/" fname))
422 (setq fname (substring fname (match-end 0) nil) 422 (setq fname (substring fname (match-end 0) nil)
423 modified (1+ modified)) 423 modified (1+ modified))
424 (url-set-filename urlobj fname) 424 (setf (url-filename urlobj) fname)
425 (setq url (url-recreate-url urlobj) 425 (setq url (url-recreate-url urlobj)
426 str-width (length url))) 426 str-width (length url)))
427 (if (> modified 1) 427 (if (> modified 1)
428 (setq fname (concat "/.../" fname)) 428 (setq fname (concat "/.../" fname))
429 (setq fname (concat "/" fname))) 429 (setq fname (concat "/" fname)))
430 (url-set-filename urlobj fname) 430 (setf (url-filename urlobj) fname)
431 (setq url (url-recreate-url urlobj))) 431 (setq url (url-recreate-url urlobj)))
432 url)) 432 url))
433 433
434 ;;;###autoload 434 ;;;###autoload
435 (defun url-view-url (&optional no-show) 435 (defun url-view-url (&optional no-show)