1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00
Commit Graph

502 Commits

Author SHA1 Message Date
Glenn Morris
2a1e24765b Replace version 24.2 with 24.3 where appropriate (hopefully) 2012-08-15 09:29:11 -07:00
Stefan Monnier
89534796c8 * lisp/url/url-http.el (url-http-parse-headers): Re-enable file-name-handlers.
Fixes: debbugs:11981
2012-08-14 10:54:51 -04:00
David Engster
577d5eea9a * lisp/url/url-util.el (url-file-directory, url-file-nondirectory): Avoid
file-name-directory and file-name-nondirectory internally.

Fixes: debbugs:11981
2012-08-12 13:35:15 -04:00
Jason Rumney
46fab912d8 Last change fixes Bug#12069 2012-08-11 22:50:28 +08:00
Jason Rumney
4ed1626da6 * lisp/url/url-http.el (url-http-create-request): Use url-http-proxy to
look up proxy credentials.
2012-08-11 22:48:37 +08:00
David Engster
7fa20d96f1 Fix various issues with url-dav package (Bug#11916).
* url-dav.el (url-dav-supported-p): Added doc-string and remove
check for feature `xml' and function `xml-expand-namespace' which
never existed in Emacs proper.
(url-dav-process-response): Remove all indentation and newlines
from XML before parsing.  Change call to `xml-parse-region' to do
namespace expansion with simple qualified names (Bug#11916).
(url-dav-request): Add autoload.
(url-dav-directory-files): Properly deal with empty directories.
Unhex URL before generating relative URLs.
(url-dav-file-directory-p): Fix check for 'DAV:collection.
2012-07-28 13:07:17 +02:00
Juanma Barranquero
ed9265fc7d Fix typos in ChangeLogs. 2012-07-14 04:08:32 +02:00
Stefan Monnier
a464a6c73a More CL cleanups and reduction of use of cl.el.
* woman.el, winner.el, vc/vc-rcs.el, vc/vc-hooks.el, vc/vc-hg.el:
* vc/vc-git.el, vc/vc-dir.el, vc/vc-bzr.el, vc/vc-annotate.el:
* textmodes/tex-mode.el, textmodes/sgml-mode.el, tar-mode.el:
* strokes.el, ses.el, server.el, progmodes/js.el, progmodes/gdb-mi.el:
* progmodes/flymake.el, progmodes/ebrowse.el, progmodes/compile.el:
* play/tetris.el, play/snake.el, play/pong.el, play/landmark.el:
* play/hanoi.el, play/decipher.el, play/5x5.el, nxml/nxml-mode.el:
* net/secrets.el, net/quickurl.el, midnight.el, mail/footnote.el:
* image-dired.el, ibuffer.el, ibuf-macs.el, ibuf-ext.el, hexl.el:
* eshell/eshell.el, eshell/esh-io.el, eshell/esh-ext.el:
* eshell/esh-cmd.el, eshell/em-ls.el, eshell/em-hist.el:
* eshell/em-cmpl.el, eshell/em-banner.el:
* url/url.el, url/url-queue.el, url/url-parse.el, url/url-http.el:
* url/url-future.el, url/url-dav.el, url/url-cookie.el:
* calendar/parse-time.el, test/eshell.el: Use cl-lib.
* wid-browse.el, wdired.el, vc/vc.el, vc/vc-mtn.el, vc/vc-cvs.el:
* vc/vc-arch.el, tree-widget.el, textmodes/texinfo.el:
* textmodes/refill.el, textmodes/css-mode.el, term/tvi970.el:
* term/ns-win.el, term.el, shell.el, ps-samp.el:
* progmodes/perl-mode.el, progmodes/pascal.el, progmodes/gud.el:
* progmodes/glasses.el, progmodes/etags.el, progmodes/cwarn.el:
* play/gamegrid.el, play/bubbles.el, novice.el, notifications.el:
* net/zeroconf.el, net/xesam.el, net/snmp-mode.el, net/mairix.el:
* net/ldap.el, net/eudc.el, net/browse-url.el, man.el:
* mail/mailheader.el, mail/feedmail.el:
* url/url-util.el, url/url-privacy.el, url/url-nfs.el, url/url-misc.el:
* url/url-methods.el, url/url-gw.el, url/url-file.el, url/url-expand.el:
Dont use CL.
* ibuf-ext.el (ibuffer-mark-old-buffers): Use float-time.
* eshell/esh-opt.el (eshell-eval-using-options): Quote code with
`lambda' rather than with `quote'.
(eshell-do-opt): Adjust accordingly.
(eshell-process-option): Simplify.
* eshell/esh-var.el:
* eshell/em-script.el: Require `esh-opt' for eshell-eval-using-options.
* emacs-pcase.el (pcase--dontcare-upats, pcase--let*)
(pcase--expand, pcase--u1): Rename pcase's internal `dontcare' pattern
to `pcase--dontcare'.
* emacs-cl.el (labels): Mark obsolete.
(cl--letf, letf): Move to cl-lib.
(cl--letf*, letf*): Remove.
* emacs-cl-lib.el (cl-nth-value): Use defalias.
* emacs-cl-macs.el (cl-dolist, cl-dotimes): Add indent rule.
(cl-progv): Rewrite.
(cl--letf, cl-letf): Move from cl.el.
(cl-letf*): New macro.
* emacs-cl-extra.el (cl--progv-before, cl--progv-after): Remove.
2012-07-11 19:13:41 -04:00
Glenn Morris
938beca46e * url-vars.el (mm-mime-mule-charset-alist, mm-coding-system-p): Declare. 2012-06-30 14:13:05 -07:00
Chong Yidong
a3f10d3e4b * url.el (url-retrieve-internal): Fix last change.
Fixes: debbugs:11627
2012-06-21 17:21:28 +08:00
Juanma Barranquero
22c4001c8e lisp/url/url-handlers.el (url-handler-regexp): Declare. 2012-06-13 18:25:03 +02:00
Chong Yidong
47fc1d6ba8 * url-handlers.el: Re-order file to avoid recursive load. 2012-06-12 18:00:53 +08:00
Chong Yidong
f1a4e679f3 Various minor variable/hook cleanups.
* lisp/emacs-lisp/edebug.el (edebug-inhibit-emacs-lisp-mode-bindings):
Rename from gud-inhibit-global-bindings.

* lisp/emacs-lisp/eieio.el (eieio-pre-method-execution-hooks): Doc fix.

* lisp/erc/erc-dcc.el (erc-dcc-chat-filter-functions): Rename from
erc-dcc-chat-filter-hook, since this is an abnormal hook.

* lisp/nxml/nxml-glyph.el (nxml-glyph-set-functions): Rename abnormal
hook from nxml-glyph-set-hook.

* lisp/progmodes/cwarn.el (cwarn-mode): Remove redundant variable
declaration.

* lisp/progmodes/pascal.el (pascal-toggle-completions): Doc fix.

* lisp/textmodes/bibtex.el (bibtex-string-file-path, bibtex-file-path):
Convert to defcustom.

* lisp/url/url-handlers.el (url-handler-regexp):
* lisp/url/url-nfs.el (url-nfs-automounter-directory-spec):
* lisp/url/url-vars.el (url-load-hook): Convert to defcustom.
2012-06-12 13:47:14 +08:00
Leo Liu
9979ea1c6c * lisp/url/url-http.el (url-http-codes): Fix mal-formed defconst. 2012-05-25 18:19:01 +08:00
Ted Zlatanov
4f0f72be56 mention bug#8706 in the last url-util.el ChangeLog entry 2012-05-15 04:53:49 -04:00
Ted Zlatanov
530e968e58 add url-build-query-string and improve url-parse-query-string as per bug#8706
* url/url-util.el (url-build-query-string): New function.
(url-parse-query-string): Allow that '=' is not required and split
URL parameters on ';', not just '&'.
2012-05-15 04:47:38 -04:00
Lars Magne Ingebrigtsen
ac9f0b75eb Make URL redirection work again.
The previous changes would make redirection fail, since the expansion
would end up with URLs that looked like "http:www.bing.com/hello".

* url-expand.el (url-default-expander): Copy over the fullness of
the new URL object based on the definition URL object.
2012-05-14 09:56:04 +02:00
Chong Yidong
9f9aa0448a Cleanups and improvements for FFAP and URL.
* ffap.el (ffap-url-unwrap-local): Make it work right.
Use url-generic-parse-url, and handle host names and Windows
filenames properly.
(ffap-url-unwrap-remote): Use url-generic-parse-url.
(ffap-url-unwrap-remote): Accept list values, specifying a list of
URL schemes to work on.
(ffap--toggle-read-only): New function.
(ffap-read-only, ffap-read-only-other-window)
(ffap-read-only-other-frame): Use it.
(ffap-fixup-url): Don't check ffap-ftp-regexp, since it is not
necessary for ffap-url-unwrap-remote.

* url-parse.el (url-path-and-query, url-port-if-non-default): New
functions.
(url-generic-parse-url): Don't set the portspec slot if it is not
specified; that is what `url-port' is for.
(url-port): Only require the scheme to be specified to call
url-scheme-get-property.

* url-util.el (url-encode-url): Use url-path-and-query.

* url-vars.el (url-mime-charset-string): Load mm-util lazily.

Fixes: debbugs:9131
2012-05-10 14:27:12 +08:00
Chong Yidong
bdac2d37fa * url-util.el (url--allowed-chars): Use upper-case for percent-encoding. 2012-05-09 20:20:26 +08:00
Chong Yidong
ce7b18ec41 Improve RFC 3986 conformance of url package.
Fix 2012-04-10 change to url.el.

* url-http.el (url-http-create-request): Ignore obsolete
attributes slot of url-object.

* url-parse.el: Improve RFC 3986 conformance.
(url-generic-parse-url): Do not populate the ATTRIBUTES slot,
since this is not reliable for general RFC 3986 URIs.  Keep the
whole path and query inside the FILENAME slot.  Improve docstring.
(url-recreate-url-attributes): Mark as obsolete.
(url-recreate-url): Handle missing scheme and userinfo.

* url-util.el (url-encode-url): New function for URL quoting.
(url-encoding-table, url-host-allowed-chars)
(url-path-allowed-chars): New constants.
(url--allowed-chars): New helper function.
(url-hexify-string): Use them.

* url-vars.el (url-nonrelative-link): Make the regexp stricter.

* url.el (url-retrieve-internal): Use url-encode-url.

Fixes: debbugs:7017
2012-05-09 16:33:48 +08:00
Stefan Monnier
e95a67dc75 Replace lexical-let by lexical-binding (except Gnus, CEDET, ERT).
* lisp/term/ns-win.el (ns-define-service):
* lisp/progmodes/pascal.el (pascal-goto-defun):
* lisp/progmodes/js.el (js--read-tab):
* lisp/progmodes/etags.el (tags-lazy-completion-table):
* lisp/emacs-lisp/syntax.el (syntax-propertize-via-font-lock):
* lisp/emacs-lisp/ewoc.el (ewoc--wrap):
* lisp/emacs-lisp/assoc.el (aput, adelete, amake):
* lisp/doc-view.el (doc-view-convert-current-doc):
* lisp/url/url.el (url-retrieve-synchronously):
* lisp/vc/diff.el (diff-no-select): Replace lexical-let by lexical-binding.
2012-04-26 08:43:28 -04:00
Lars Magne Ingebrigtsen
d3f7611b03 Tiny url-util.el code clean-up. 2012-04-10 19:03:34 +02:00
Lars Magne Ingebrigtsen
8d8d31f91e Revert previous url-util patch.
The caller can as easily do the decoding themselves.
2012-04-10 19:02:04 +02:00
William Xu
a967e26b40 (url-retrieve-internal): Hexify multibye URL string first when necessary.
Also mention this in the relevant doc strings.

Fixes: debbugs:7017
2012-04-10 13:22:08 +02:00
Glenn Morris
78658677a2 Comment trivia. 2012-04-10 00:15:09 -07:00
Lars Magne Ingebrigtsen
4bbc3323df (url-unhex-string): Add an optional CODING-SYSTEM parameter.
Fixes: debbugs:6252
2012-04-10 04:14:13 +02:00
Lars Magne Ingebrigtsen
9ea49b28ab Add a policy list of domains that url.el can set cookies for
* etc/publicsuffix.txt: New file.

* lisp/url/url-cookie.el (url-cookie-two-dot-domains): Remove.
(url-cookie-host-can-set-p): Use `url-domsuf-cookie-allowed-p'
instead of the variable above.

Fixes: debbugs:1401
2012-04-10 03:57:45 +02:00
Chong Yidong
fb7ada5f94 Remove * characters from the front of variable docstrings. 2012-04-09 21:05:48 +08:00
Lars Magne Ingebrigtsen
e0fe1d5589 Fix race condition in url-queue when doing the callback
* url-queue.el (url-queue-kill-job): Check whether the buffer has
been killed asynchronously before selecting it.
2012-03-25 15:38:22 +02:00
Lars Magne Ingebrigtsen
cc2ab73270 Always call the callback when timing out url-queue jobs
* url-queue.el (url-queue-kill-job): Make sure that the callback
is always called, even if we have a timeout.
2012-03-14 03:44:09 +01:00
Chong Yidong
091006330e Allow url-http to handle expired keepalive connections.
* lisp/url/url-http.el (url-http-end-of-document-sentinel): Handle
keepalive expiry by calling url-http again.
(url-http): New arg, for the above.

Fixes: debbugs:10223
2012-03-11 23:12:26 +08:00
Devon Sean McCullough
179f69112d Bugfix for url-http-find-free-connection.
* lisp/url/url-http.el (url-http-find-free-connection): Don't pass a nil
argument to url-http-mark-connection-as-busy.

Fixes: debbugs:10891
2012-03-11 17:43:01 +08:00
Lars Ingebrigtsen
27e7172ced Avoid a race condition in url-queue-kill-job
* url-queue.el (url-queue-kill-job): Delete the process sentinel
before killing the process to avoid a race condition between the
two processes killing off the process buffer.
2012-02-20 13:12:48 +01:00
Lars Ingebrigtsen
1e54a73bf0 Warn instead of erroring when pruning the URL cache
* url.el (url-retrieve-internal): Warn about file errors when
pruning the cache instead of bugging out.
2012-02-20 09:22:41 +01:00
Lars Ingebrigtsen
55645c6797 Make url-queue not kill a random buffer on error
* url-queue.el (url-queue-callback-function): Remove the job from
the queue so that we don't kill the current buffer, which will
then make the callback function kill a random buffer.
2012-02-19 09:49:09 +01:00
Lars Ingebrigtsen
f15bcb40f4 Kill jobs that we remove from the queue
* url-queue.el (url-queue-kill-job): Refactored out code.
(url-queue-remove-jobs-from-host): Use it to kill jobs that are in
flight.
2012-02-14 19:43:21 +01:00
Ted Zlatanov
e72a771d50 * url-future.el: Minor doc update. 2012-02-14 08:18:05 -05:00
Leo Liu
1deeb569b1 Remove unused require in url-future.el 2012-02-14 10:14:43 +08:00
Ted Zlatanov
6c0c7cfc67 Move url-future.el ERT test to test/automated/url-future-tests.el.
* lisp/url/url-future.el (url-future-test): Move to test/automated.

* test/automated/url-future-tests.el (url-future-tests): Move from
lisp/url/url-future.el and rename.
2012-02-13 13:45:36 -05:00
Lars Ingebrigtsen
3647f557cf Fix typo in last checkin. 2012-02-10 18:30:39 +01:00
Lars Ingebrigtsen
3b8eb822d9 Cookie/redirection URL fixup
(url-http-parse-headers): When redirecting, pass on
the `inhibit-cookie' parameter.
2012-02-10 18:25:31 +01:00
Glenn Morris
a48ec60ca1 Fix previous URL doc change
* lisp/url/url-queue.el (url-queue-retrieve): Fic previous doc fix.

* doc/misc/url.texi (Retrieving URLs): Update url-retrieve arguments.
Mention url-queue-retrieve.

* etc/NEWS: Related edit.
2012-02-10 09:22:09 -08:00
Andreas Schwab
d7c5e1622f * url-http.el (url-http-clean-headers): Return the number of
removed characters.
	(url-http-wait-for-headers-change-function): Adjust end position
	after cleaning the headers.  (Bug#10768)
2012-02-10 12:36:42 +01:00
Glenn Morris
b74c9672c2 Document url-queue-retrieve
* doc/misc/url.texi (Retrieving URLs): Update url-retrieve arguments.
Mention url-queue-retrieve.

* lisp/url/url-queue.el (url-queue-retrieve): Doc fix.

* etc/NEWS: Edits.
2012-02-09 22:23:47 -05:00
Glenn Morris
e1ac4066d1 Minor-mode doc fixes for ARG behavior
* lisp/completion.el (dynamic-completion-mode):
* lisp/dirtrack.el (dirtrack-debug-mode):
* lisp/electric.el (electric-layout-mode):
* lisp/epa-mail.el (epa-mail-mode, epa-global-mail-mode):
* lisp/face-remap.el (text-scale-mode, buffer-face-mode):
* lisp/iimage.el (iimage-mode):
* lisp/image-mode.el (image-transform-mode):
* lisp/minibuffer.el (completion-in-region-mode):
* lisp/scroll-lock.el (scroll-lock-mode):
* lisp/simple.el (next-error-follow-minor-mode):
* lisp/tar-mode.el (tar-subfile-mode):
* lisp/tooltip.el (tooltip-mode):
* lisp/vcursor.el (vcursor-use-vcursor-map):
* lisp/wid-browse.el (widget-minor-mode):
* lisp/emulation/tpu-edt.el (tpu-edt-mode):
* lisp/emulation/tpu-extras.el (tpu-cursor-free-mode):
* lisp/international/iso-ascii.el (iso-ascii-mode):
* lisp/language/thai-util.el (thai-word-mode):
* lisp/mail/supercite.el (sc-minor-mode):
* lisp/net/goto-addr.el (goto-address-mode):
* lisp/net/rcirc.el (rcirc-multiline-minor-mode, rcirc-track-minor-mode):
* lisp/progmodes/cwarn.el (cwarn-mode):
* lisp/progmodes/flymake.el (flymake-mode):
* lisp/progmodes/glasses.el (glasses-mode):
* lisp/progmodes/hideshow.el (hs-minor-mode):
* lisp/progmodes/pascal.el (pascal-outline-mode):
* lisp/textmodes/enriched.el (enriched-mode):
* lisp/vc/smerge-mode.el (smerge-mode):
Doc fixes (minor mode argument).

* etc/NEWS: Related markup.
2012-02-07 21:12:24 -05:00
Lars Ingebrigtsen
aacaa41911 Allow specifying whether to inhibit cookies on a per-URL basis
* url-http.el (url-http-create-request): Don't send cookies unless
requested.
(url-http-parse-headers): Don't store cookies unless requested.

* url.el (url-retrieve): Ditto

* url-queue.el (url-queue-retrieve): Take an optional
`inhibit-cookies' parameter.

* url-parse.el (url): Add the `use-cookies' slot to the URL struct
to be able to keep track of whether to do cookies or not on a
per-URL basis.
2012-02-08 01:04:42 +01:00
Lars Ingebrigtsen
7dd679eb09 Add extra checks before expiring the URL cache
(url-cache-prune-cache): Check that the directory exists before
trying to delete it.
2012-02-06 22:37:56 +01:00
Lars Ingebrigtsen
1968bb1b5c Expire URL items from the on-disk cache once in a while
* url.el (url-retrieve-number-of-calls): New variable.
(url-retrieve-internal): Use it to expire the cache once in a
while.

* url-cache.el (url-cache-prune-cache): New function.
2012-02-06 22:06:15 +01:00
Lars Ingebrigtsen
b6ea20f39c Try to mitigate DNS failures when downloading stuff asynchronously
* url-queue.el (url-queue-setup-runners): New function that uses
`run-with-idle-timer' for extra asynchronicity.
(url-queue-remove-jobs-from-host): New function.
(url-queue-callback-function): Remove jobs from the same host if
connection failed.
2012-02-06 02:13:24 +01:00
Juanma Barranquero
6df6ae42fe Fix typos in ChangeLogs. 2012-01-31 17:15:03 +01:00