1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-13 09:32:47 +00:00
Commit Graph

206 Commits

Author SHA1 Message Date
Lars Ingebrigtsen
64b469f6ae Don't infloop in url.el when sending invalid basic auth
* lisp/url/url-http.el (url-http-handle-authentication): Bail out
if the wrong credentials were passed to the server instead of
inflooping (bug#27022).
2019-07-26 10:55:45 +02:00
Mattias Engdegård
866f527ddf Optional space and unit in `file-size-human-readable' (bug#35756)
To improve readability of strings produced by
`file-size-human-readable', add two optional arguments:

- SPACE, to provide a string (typically a space or non-breaking space)
to put between the number and unit.  For compatibility, the default is
an empty string.

- UNIT, a string to use as unit.  For compatibility, the default is
"B" in `iec' mode and the empty string otherwise.

Also fix a glitch with small numbers in `iec' mode which caused a
stray "i" in the result.

* lisp/files.el (file-size-human-readable):
Add optional SPACE and UNIT arguments and handle small numbers correctly.
(files--ask-user-about-large-file, warn-maybe-out-of-memory):
Call with `iec' and space.
* test/lisp/files-tests.el (files-test-file-size-human-readable): New test.
* lisp/url/url-http.el (url-http-simple-after-change-function)
(url-http-content-length-after-change-function): Call with `iec' and space.
* etc/NEWS (Lisp Changes): Mention the change.
2019-06-23 20:30:50 +02:00
Paul Eggert
f744797af1 Go back to "Maintainer: emacs-devel@gnu.org"
Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is
no special maintainer for a file.  Although this wasn't documented
it was common practice and removing the lines didn't have consensus.
2019-05-25 14:25:18 -07:00
Paul Eggert
bef1be8730 Fixes for "Maintainer:" and related lines
Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines,
which are not that useful.  It also cleans up and regularizes a
few similar lines.
2019-05-19 21:34:27 -07:00
Stefan Monnier
5f9671e57e * lisp/emacs-lisp/package.el: Fix decoding of downloaded files
This is a different fix for bug#34909, which should also fix bug#35739.

Our downloading code used to automatically decode the result according
to the usual heuristics for files.  This caused problems when we later
needed to save the data in a file that needed to be byte-for-byte
equal to the original in order to pass the signature verification,
especially because we didn't keep track of which coding-system was
used to decode the data.

(package--unless-error): New macro extracted from
package--with-response-buffer-1, so that we can specify edebug and
indent specs.
(package--with-response-buffer-1): Use it.  More importantly, change
code so it runs `body` in a unibyte buffer with undecoded data.
(package--download-one-archive): Don't encode with utf-8 since the data
is not decoded yet.
(describe-package-1): Explicitly decode the readem.txt files here.

* lisp/url/url-handlers.el (url-insert-file-contents): Use it.
(url-insert): Don't decode if buffer is unibyte.

* lisp/url/url-http.el (url-http--insert-file-helper): New function,
extracted from url-insert-file-contents.
2019-05-18 18:32:47 -04:00
Lars Ingebrigtsen
4f1df40db3 Fix obscure HTTP chunked parsing problem
* lisp/url/url-http.el
(url-http-chunked-encoding-after-change-function): Ensure that we
parse the entire initial chunked header as the length (bug#35658).
2019-05-15 07:12:26 +02:00
Lars Ingebrigtsen
15bd081ce6 Indent url-http-chunked-encoding-after-change-function 2019-05-15 06:59:12 +02:00
Dmitry Gutov
8635e011ed Don't signal error from url debug functions
* lisp/url/url-http.el (url-http-debug): Don't signal error.

* lisp/url/url-util.el (url-debug): Same (bug#34763).
2019-04-13 03:36:45 +03:00
Noam Postavsky
b36913d803 Allow partial decompression (Bug#33133)
* src/decompress.c (Fzlib_decompress_region): Add optional
ALLOW-PARTIAL parameter.
* lisp/url/url-http.el (url-handle-content-transfer-encoding): Use it.
* doc/lispref/text.texi (Decompression): Document it.
* etc/NEWS: Announce it.
2019-04-02 22:02:32 -04:00
Paul Eggert
e14c0d748e More minor regex cleanup
Problems reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00643.html
plus a few others that I noticed.
* lisp/auth-source-pass.el (auth-source-pass--parse-data):
* lisp/org/org-datetree.el (org-datetree--find-create):
* lisp/org/org-pcomplete.el (org-thing-at-point):
* lisp/progmodes/js.el (js--end-of-do-while-loop-p):
* lisp/textmodes/sgml-mode.el:
(sgml-electric-tag-pair-before-change-function):
* lisp/textmodes/texnfo-upd.el (texinfo-menu-copy-old-description):
* lisp/url/url-http.el (url-http-parse-response):
Fix regular expression and similar syntax.
2019-03-19 18:47:53 -07:00
Paul Eggert
bc2a93d5b7 Fix more regular expression typos
Problem reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00548.html
except that I didn’t address the issues involving Hebrew,
or involving comint-prompt-regexp.
* lisp/align.el (align-rules-list, align-exclude-rules-list):
* lisp/auth-source-pass.el (auth-source-pass--parse-secret)
(auth-source-pass--parse-data):
* lisp/cedet/data-debug.el (data-debug-next)
(data-debug-prev, data-debug-expand-or-contract):
* lisp/comint.el (comint-within-quotes):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
* lisp/emulation/viper-ex.el (ex-cmd-complete):
* lisp/gnus/gnus-cite.el (gnus-message-search-citation-line):
* lisp/gnus/nnir.el (nnir-imap-end-of-input):
* lisp/mail/mail-extr.el (mail-extr-all-letters):
* lisp/minibuffer.el (minibuffer-maybe-quote-filename):
* lisp/nxml/rng-nxml.el (rng-complete-tag)
(rng-complete-end-tag, rng-complete-attribute-name):
* lisp/obsolete/vip.el (vip-get-ex-token, vip-get-ex-pat):
* lisp/org/org-pcomplete.el (org-thing-at-point):
* lisp/org/org.el (org-set-tags)
(org-increase-number-at-point)
(org-fill-line-break-nobreak-p):
* lisp/pcomplete.el (pcomplete-parse-comint-arguments):
* lisp/progmodes/ada-mode.el (ada-compile-goto-error):
* lisp/progmodes/cperl-mode.el (cperl-highlight-charclass)
(cperl-find-pods-heres, cperl-not-bad-style-regexp)
(cperl-regext-to-level-start):
* lisp/progmodes/ebnf-yac.el (ebnf-yac-skip-spaces):
* lisp/progmodes/flymake-proc.el (flymake-proc-master-tex-init):
* lisp/progmodes/flymake.el (flymake-diag-region):
* lisp/progmodes/fortran.el (fortran-current-line-indentation):
* lisp/progmodes/idlw-complete-structtag.el:
(idlwave-complete-structure-tag):
* lisp/progmodes/idlwave.el (idlwave-complete-sysvar-or-tag):
* lisp/progmodes/prolog.el (prolog-pred-end)
(prolog-clause-info):
* lisp/progmodes/ruby-mode.el (ruby-forward-sexp)
(ruby-backward-sexp):
* lisp/progmodes/verilog-mode.el (verilog-repair-open-comma):
* lisp/term.el (term-within-quotes):
* lisp/textmodes/bib-mode.el (bib-capitalize-title-stop-words):
* lisp/textmodes/refbib.el (r2b-capitalize-title-stop-words):
* lisp/textmodes/reftex-parse.el (reftex-nth-arg):
* lisp/textmodes/rst.el (rst-svn-rev):
* lisp/url/url-http.el (url-http-parse-response):
* test/lisp/progmodes/f90-tests.el (f90-test-bug3730):
Fix regular expression typos.
2019-03-18 17:02:29 -07:00
Eli Zaretskii
9486d87cfe Avoid gratuitous errors in 'url-retrieve-synchronously'
* lisp/url/url-http.el (url-http-debug):
* lisp/url/url-util.el (url-debug): Don't signal an error if
quit-flag is non-nil, but not t.  This could happen because
some unrelated code is running inside while-no-input.
(Bug#34763)
2019-03-13 18:53:08 +02:00
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Michael Heerdegen
1808d254a5 Replace insignificant backquotes
Replace most insignificant occurrences of '`' with a straight quote,
sharp quote or nothing.  This includes backquotes in 'pcase' patterns.

* admin/admin.el:
* lisp/apropos.el:
* lisp/arc-mode.el:
* lisp/auth-source.el:
* lisp/avoid.el:
* lisp/bindings.el:
* lisp/bs.el:
* lisp/calculator.el:
* lisp/calendar/todo-mode.el:
* lisp/cedet/semantic.el:
* lisp/cedet/semantic/analyze/debug.el:
* lisp/cedet/semantic/bovine.el:
* lisp/cedet/semantic/dep.el:
* lisp/cedet/semantic/grammar.el:
* lisp/cedet/semantic/wisent/comp.el:
* lisp/cedet/semantic/wisent/grammar.el:
* lisp/cedet/srecode/mode.el:
* lisp/cus-edit.el:
* lisp/doc-view.el:
* lisp/elec-pair.el:
* lisp/electric.el:
* lisp/emacs-lisp/autoload.el:
* lisp/emacs-lisp/benchmark.el:
* lisp/emacs-lisp/byte-opt.el:
* lisp/emacs-lisp/bytecomp.el:
* lisp/emacs-lisp/cconv.el:
* lisp/emacs-lisp/cl-extra.el:
* lisp/emacs-lisp/cl-generic.el:
* lisp/emacs-lisp/cl-macs.el:
* lisp/emacs-lisp/copyright.el:
* lisp/emacs-lisp/debug.el:
* lisp/emacs-lisp/eieio-compat.el:
* lisp/emacs-lisp/ert.el:
* lisp/emacs-lisp/generator.el:
* lisp/emacs-lisp/inline.el:
* lisp/emacs-lisp/macroexp.el:
* lisp/emacs-lisp/map.el:
* lisp/emacs-lisp/package-x.el:
* lisp/emacs-lisp/package.el:
* lisp/emacs-lisp/radix-tree.el:
* lisp/emacs-lisp/smie.el:
* lisp/epa.el:
* lisp/erc/erc-dcc.el:
* lisp/erc/erc-track.el:
* lisp/erc/erc.el:
* lisp/eshell/em-ls.el:
* lisp/eshell/esh-cmd.el:
* lisp/files.el:
* lisp/filesets.el:
* lisp/font-lock.el:
* lisp/frameset.el:
* lisp/gnus/gnus-agent.el:
* lisp/gnus/gnus-art.el:
* lisp/gnus/gnus-cite.el:
* lisp/gnus/gnus-group.el:
* lisp/gnus/gnus-msg.el:
* lisp/gnus/gnus-salt.el:
* lisp/gnus/gnus-srvr.el:
* lisp/gnus/gnus-sum.el:
* lisp/gnus/gnus-topic.el:
* lisp/gnus/gnus-util.el:
* lisp/gnus/gnus.el:
* lisp/gnus/message.el:
* lisp/gnus/mm-util.el:
* lisp/gnus/mml.el:
* lisp/gnus/nnheader.el:
* lisp/gnus/nnimap.el:
* lisp/gnus/nnmairix.el:
* lisp/gnus/spam.el:
* lisp/hexl.el:
* lisp/hi-lock.el:
* lisp/ibuf-ext.el:
* lisp/ibuffer.el:
* lisp/ido.el:
* lisp/info.el:
* lisp/international/mule-cmds.el:
* lisp/international/mule-util.el:
* lisp/json.el:
* lisp/jsonrpc.el:
* lisp/language/cyrillic.el:
* lisp/language/european.el:
* lisp/language/georgian.el:
* lisp/language/tibetan.el:
* lisp/language/utf-8-lang.el:
* lisp/language/vietnamese.el:
* lisp/ldefs-boot.el:
* lisp/mail/mail-extr.el:
* lisp/man.el:
* lisp/menu-bar.el:
* lisp/mh-e/mh-acros.el:
* lisp/mh-e/mh-folder.el:
* lisp/mh-e/mh-mime.el:
* lisp/mh-e/mh-show.el:
* lisp/mh-e/mh-speed.el:
* lisp/minibuffer.el:
* lisp/mpc.el:
* lisp/net/ange-ftp.el:
* lisp/net/hmac-def.el:
* lisp/net/newst-backend.el:
* lisp/net/quickurl.el:
* lisp/net/tramp-archive.el:
* lisp/net/tramp-compat.el:
* lisp/notifications.el:
* lisp/obsolete/pgg-parse.el:
* lisp/obsolete/vc-arch.el:
* lisp/obsolete/xesam.el:
* lisp/org/ob-C.el:
* lisp/org/ob-core.el:
* lisp/org/ob-exp.el:
* lisp/org/ob-groovy.el:
* lisp/org/ob-haskell.el:
* lisp/org/ob-io.el:
* lisp/org/ob-lisp.el:
* lisp/org/ob-lob.el:
* lisp/org/ob-lua.el:
* lisp/org/ob-octave.el:
* lisp/org/ob-perl.el:
* lisp/org/ob-python.el:
* lisp/org/ob-ref.el:
* lisp/org/ob-ruby.el:
* lisp/org/ob-sql.el:
* lisp/org/org-agenda.el:
* lisp/org/org-capture.el:
* lisp/org/org-clock.el:
* lisp/org/org-colview.el:
* lisp/org/org-duration.el:
* lisp/org/org-element.el:
* lisp/org/org-entities.el:
* lisp/org/org-gnus.el:
* lisp/org/org-indent.el:
* lisp/org/org-info.el:
* lisp/org/org-inlinetask.el:
* lisp/org/org-lint.el:
* lisp/org/org-list.el:
* lisp/org/org-mouse.el:
* lisp/org/org-plot.el:
* lisp/org/org-src.el:
* lisp/org/org-table.el:
* lisp/org/org.el:
* lisp/org/ox-ascii.el:
* lisp/org/ox-html.el:
* lisp/org/ox-latex.el:
* lisp/org/ox-man.el:
* lisp/org/ox-md.el:
* lisp/org/ox-org.el:
* lisp/org/ox-publish.el:
* lisp/org/ox-texinfo.el:
* lisp/org/ox.el:
* lisp/play/bubbles.el:
* lisp/play/gamegrid.el:
* lisp/progmodes/autoconf.el:
* lisp/progmodes/cc-defs.el:
* lisp/progmodes/cc-engine.el:
* lisp/progmodes/cc-fonts.el:
* lisp/progmodes/cc-langs.el:
* lisp/progmodes/cperl-mode.el:
* lisp/progmodes/ebrowse.el:
* lisp/progmodes/elisp-mode.el:
* lisp/progmodes/flymake-cc.el:
* lisp/progmodes/flymake.el:
* lisp/progmodes/fortran.el:
* lisp/progmodes/grep.el:
* lisp/progmodes/gud.el:
* lisp/progmodes/idlwave.el:
* lisp/progmodes/js.el:
* lisp/progmodes/m4-mode.el:
* lisp/progmodes/make-mode.el:
* lisp/progmodes/mixal-mode.el:
* lisp/progmodes/modula2.el:
* lisp/progmodes/octave.el:
* lisp/progmodes/opascal.el:
* lisp/progmodes/prolog.el:
* lisp/progmodes/ps-mode.el:
* lisp/progmodes/python.el:
* lisp/progmodes/ruby-mode.el:
* lisp/progmodes/sh-script.el:
* lisp/progmodes/sql.el:
* lisp/progmodes/verilog-mode.el:
* lisp/ps-mule.el:
* lisp/rtree.el:
* lisp/ruler-mode.el:
* lisp/ses.el:
* lisp/simple.el:
* lisp/startup.el:
* lisp/subr.el:
* lisp/term/ns-win.el:
* lisp/textmodes/bibtex.el:
* lisp/textmodes/conf-mode.el:
* lisp/textmodes/css-mode.el:
* lisp/textmodes/refill.el:
* lisp/textmodes/sgml-mode.el:
* lisp/textmodes/tex-mode.el:
* lisp/tutorial.el:
* lisp/url/url-dav.el:
* lisp/url/url-gw.el:
* lisp/url/url-http.el:
* lisp/url/url-methods.el:
* lisp/url/url-privacy.el:
* lisp/vc/cvs-status.el:
* lisp/vc/diff-mode.el:
* lisp/vc/ediff-init.el:
* lisp/vc/ediff-ptch.el:
* lisp/vc/log-edit.el:
* lisp/vc/log-view.el:
* lisp/vc/pcvs-info.el:
* lisp/vc/pcvs.el:
* lisp/vc/smerge-mode.el:
* lisp/vc/vc-git.el:
* lisp/vc/vc-hg.el:
* lisp/vc/vc-mtn.el:
* lisp/vc/vc-rcs.el:
* lisp/whitespace.el:
* lisp/window.el:
* test/lisp/electric-tests.el:
* test/lisp/emacs-lisp/cl-lib-tests.el:
* test/lisp/emacs-lisp/ert-tests.el:
* test/lisp/epg-tests.el:
* test/lisp/jsonrpc-tests.el:
* test/src/data-tests.el:
* test/src/json-tests.el: Replace most insignificant backquotes.
2018-11-25 21:08:08 +01:00
Andreas Schwab
08594a975a * lisp/url/url-http.el (url-http-create-request): Doc fix. 2018-06-29 17:33:43 +02:00
Andreas Schwab
84613dae5c Use a non-proxy request when retrieving https URLs via a proxy
* lisp/url/url-http.el
(url-https-proxy-after-change-function): Bind url-http-proxy
to nil around url-http-create-request.
2018-06-29 17:25:37 +02:00
Noam Postavsky
97d5d1a1f4 Move tls.el and starttls.el to lisp/obsolete/ (Bug#31457)
* lisp/obsolete/tls.el: Moved from lisp/net/tls.el.
* lisp/gnus/nnimap.el:
* lisp/url/url-http.el: Don't require tls, since it's obsolete.
* lisp/net/network-stream.el: Only require tls if we actually try to
use it (i.e., when (gnutls-available-p) returns nil).  Declare some
functions to fix compilation warnings.

* lisp/obsolete/starttls.el: Moved from lisp/net/starttls.el.
* lisp/net/sieve-manage.el:
* lisp/net/network-stream.el: Don't require `starttls' at the
top-level, declare the variables and functions used instead.
(network-stream-open-starttls): Only require `starttls' if
needed (i.e., gnutls-available-p fails).

* etc/NEWS: Announce obsoletion.
2018-06-18 20:01:44 -04:00
Lars Ingebrigtsen
ca5713deff Make url-http-create-request work with non-ASCII data again
* lisp/url/url-http.el (url-http-create-request): Ensure that the
entire request string is unibyte (bug#31248).
2018-04-24 14:09:53 +02:00
Lars Ingebrigtsen
560553b1fa (url-http): Ensure that the referrer is all-ASCII
* lisp/url/url-http.el (url-http): Ensure that the referrer is all-ASCII.
2018-04-13 16:41:13 +02:00
Lars Ingebrigtsen
4a63023303 Make Unicode domain names work again in URL after recent changes
* lisp/net/gnutls.el (open-gnutls-stream): IDNA-encode hostnames
before passing them on to gnutls for verification.

* lisp/net/network-stream.el (network-stream-open-starttls): Ditto.

* lisp/url/url-http.el (url-http--get-referer): Be IDNA-aware.
(url-http-create-request): Don't de-Unicodify host names, because
they may be IDNA names (that are later encoded).

* lisp/url/url-util.el (url-domain): Be IDNA-aware when doing
domain name computations.
2018-04-13 16:38:10 +02:00
Peder O. Klingenberg
9822a6a570 Change gnutls-verify-error to be first-match
* doc/misc/url.texi (Customization): Describe the new user
option url-lastloc-privacy-level.

* lisp/net/eww.el (eww-render): Set url-current-lastloc to the
url we are rendering, to get the referer header right on
subsequent requests.

* lisp/url/url-http.el (url-http--get-referer): New function
to determine which referer to send, if any, considering the
users privacy settings and the target url we are visiting.
(url-http-referer): New variable keeping track of the referer
computed by url-http--get-referer
(url-http-create-request): Use url-http-referer instead of the
optional argument to set up the referer header.  Leave
checking of privacy settings to url-http--get-referer.
(url-http): Set up url-http-referer by using
url-http--get-referer.

* lisp/url/url-queue.el (url-queue): New struct member
context-buffer for keeping track of the context a queued job
started from.
(url-queue-retrieve): Store the current buffer in the queue
object.
(url-queue-start-retrieve): Make sure url-retrieve is called
in the context of the original buffer, if available.

* lisp/url/url-util.el (url-domain): New function to determine
the domain of a given URL.

* lisp/url/url-vars.el (url-current-lastloc): New variable to
keep track of the desired "last location" (referer header).
(url-lastloc-privacy-level): New custom setting for more
fine-grained control over how lastloc (referer) is sent to
servers (Bug#27012).
2018-04-13 15:08:18 +02:00
Lars Ingebrigtsen
e6c4a0298e Treat 302 redirects as if they were 303 redirects
* lisp/url/url-http.el (url-http-parse-headers): Treat 302 as 303,
since this is what the standards recommend these days (bug#25703).
See https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection
2018-04-13 02:21:30 +02:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Andreas Schwab
d7d3b14a99 * lisp/url/url-http.el
(url-http-wait-for-headers-change-function): Change message to
url-http-debug.
2017-12-24 19:14:23 +01:00
Eli Zaretskii
a4f7518817 Fix url-http use of url-current-object
* lisp/url/url-http.el (url-http): Bind url-current-object before
calling url-http-find-free-connection.  (Bug#28515)
2017-09-30 16:33:30 +03:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Lars Brinkhoff
b6738682ae Make the URL library use records.
* lisp/url/url.el, lisp/url/url-cache.el, lisp/url/url-dav.el,
lisp/url/url-expand.el, lisp/url/url-file.el, lisp/url/url-imap.el,
lisp/url/url-ldap.el: Use `url-p' instead of `vectorp'.

* lisp/url/url-http.el (url-http): Check for type `url' instead of
`vector'.
2017-04-04 08:23:46 +02:00
Paul Eggert
bcf244ef9b Merge from origin/emacs-25
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
2017-01-01 01:10:47 -08:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Devon Sean McCullough
e6834952ed Doc fix for url-http
* lisp/url/url-http.el (url-http): Document better return values
  (bug#13187) (tiny change)

(cherry picked from commit 344303c8d9)
2016-10-02 12:27:32 -04:00
Paul Eggert
dcd90f60eb Merge from origin/emacs-25
0ffc9ce Update admin/authors.el
0ad7410 Update Antinews in ELisp manual
ea0f750 Fix comments on window height macros
0bbdeed Fix 'url-http-create-request' when cookies are used
0045998 Fix cross reference in frames.texi
1392894 ; * etc/DEBUG: Minor copyedits.
304a5c8 ; * etc/DEBUG: Improve documentation of getting control to GDB.
56bf7d7 Fix regexp-opt documentation (bug #17862)
803ad6f ; Fix documentation of seq-subseq
ed4530d * lisp/emacs-lisp/gv.el (gv-ref): Fix example of PLACE in doc...
88ea396 ; Spelling fixes
17197d0 Fix tags-query-replace docstring
80a7f8b Clarify documentation of precision in format specs
88a5052 Improve and clarify documentation of subprocesses
89eb09f * etc/PROBLEMS: Mention gnutls-cli 3.5.3 (Bug#24247).

# Conflicts:
#	etc/PROBLEMS
#	src/process.c
2016-09-26 13:32:28 -07:00
Toke Høiland-Jørgensen
0bbdeed10f Fix 'url-http-create-request' when cookies are used
* lisp/url/url-http.el (url-http-create-request): Make sure the
cookie headers are a unibyte string.  For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00202.html.

Copyright-paperwork-exempt: yes
2016-09-10 22:09:33 +03:00
Leo Liu
6f125aa3de Add 451 to url-http-codes
* lisp/url/url-http.el (url-http-codes): Add 451.
2016-08-31 16:39:13 +08:00
Paul Eggert
590dab5a68 Merge from origin/emacs-25
8c2946e In NEWS describe new handling of window margins (Bug#24193)
0cee66c Facultatively ignore margins when splitting and resizing wind...
8d68147 Document CATEGORY arg to modify-category-entry
8342e74 Document char-script-table's effect on word motion
e9ff485 Further fix for 'url-http-create-request' and multibyte strings
0695235 Fix docstring of eval-expression
98b01dd Clarify when 'cursor' property is in effect
75f1882 Convert the remaining strings to unibyte before concatenating
d2db5dd Fix bug with handling the bidi cache
ccd0e92 * doc/lispref/text.texi (Change Hooks): Minor copyedits.
f785ff4 Clarify documentation of before/after-change-functions
3c9cb57 Document use of vectors in keymaps

# Conflicts:
#	src/xdisp.c
2016-08-22 14:38:49 -07:00
Eli Zaretskii
e9ff4857cb Further fix for 'url-http-create-request' and multibyte strings
* lisp/url/url-http.el (url-http-create-request): Run
url-mime-charset-string through url-http--encode-string.
(Bug#24117)
2016-08-13 11:28:53 +03:00
Dmitry Gutov
75f1882479 Convert the remaining strings to unibyte before concatenating
* lisp/url/url-http.el (url-http--encode-string): New function.
(url-http-create-request): Use it to convert ASCII to unibyte.
(Bug#24117)
2016-08-11 21:06:49 +03:00
Paul Eggert
fdcf46d33e Merge from origin/emacs-25
0377fe2 ; Spelling fixes
f253695 Update docs for `customize-mode'
4395aaa Fix documentation of 'assoc-string' and 'compare-strings'
ab0ebb9 ; Only load .elc file in tests.
a98aa02 Error on multibyte characters in HTTP request
ea512a7 * lisp/gnus/mm-decode.el (mm-convert-shr-links): Mask keys th...
8297331 ; Revert "Ensure undo-boundary after insert-file-contents."
dc5e65b Unset GIT_DIR when calling Git commands
6cdd8f7 Ensure undo-boundary after insert-file-contents.
4793f5f Clarify documentation of 'line-spacing' and 'line-height'
5f37572 Fix removal of variables from process-environment
e5e886d * admin/authors.el (authors-ignored-files, authors-valid-file...
db0777b * admin/authors.el (authors-aliases, authors-fixed-case): Add...

# Conflicts:
#	doc/lispref/modes.texi
#	lisp/gnus/mm-decode.el
2016-06-26 00:16:25 +02:00
Dmitry Gutov
a98aa02a5d Error on multibyte characters in HTTP request
* lisp/url/url-http.el (url-http-create-request): Check the
constructed request in the end to verify that it does not contain
multibyte characters (bug#23750).
2016-06-22 21:20:23 +03:00
Dmitry Gutov
07a986ea7e ; Revert "Prohibit multibyte characters in url-http-data"
This reverts commit 2ede29575f.

In favor of a better solution to be pushed to emacs-25.
2016-06-22 21:10:11 +03:00
Dmitry Gutov
2ede29575f Prohibit multibyte characters in url-http-data
It didn't work anyway, but this makes any such errors more obvious
by catching them earlier.

* lisp/url/url-http.el (url-http-create-request):
Use string-to-unibyte (bug#23750).
2016-06-19 21:06:39 +03:00
Stefan Monnier
276a6545ad * lisp/url/url-http.el: Use lexical-binding
(url-http-simple-after-change-function): Use buffer-size rather than `nd'.
(url-http-wait-for-headers-change-function): Remove unused var
`content-length'.
(url-http): Remove unused vars `host' and `port'.
2016-05-23 20:09:33 -04:00
Paul Eggert
65c8c7cb96 Pacify ‘make check-declare’
* lisp/cedet/srecode/insert.el (data-debug-new-buffer)
(data-debug-insert-stuff-list, data-debug-insert-thing):
* lisp/emulation/viper-ex.el (viper-change-state-to-vi)
(viper-change-state-to-emacs):
* lisp/emulation/viper-macs.el (viper-change-state-to-vi):
* lisp/org/ob-asymptote.el (orgtbl-to-generic):
* lisp/org/ob-awk.el (orgtbl-to-generic):
* lisp/org/ob-core.el (org-edit-src-code, orgtbl-to-generic):
* lisp/org/ob-emacs-lisp.el (orgtbl-to-generic):
* lisp/org/ob-exp.el (org-element-context):
* lisp/org/ob-gnuplot.el (org-time-string-to-time)
(orgtbl-to-generic):
* lisp/org/ob-haskell.el (org-export-to-file):
* lisp/org/ob-latex.el (org-create-formula-image)
(org-latex-compile):
* lisp/org/ob-python.el (run-python):
* lisp/org/ob-sh.el (orgtbl-to-generic):
* lisp/org/ob-tangle.el (org-link-escape, org-back-to-heading):
* lisp/org/org-colview.el (org-agenda-redo):
* lisp/org/org-feed.el (url-retrieve-synchronously):
* lisp/org/org-info.el (Info-find-node):
* lisp/org/org-list.el (org-previous-line-empty-p):
* lisp/org/org-macs.el (org-string-match-p):
* lisp/org/org.el (org-beamer-mode):
Fix prototype to match current definition.
* lisp/emacs-lisp/advice.el (function-called-at-point):
* lisp/progmodes/prolog.el (compilation-shell-minor-mode):
Fix typo: extra '.
* lisp/emacs-lisp/cl-generic.el (cl-defmethod):
Insert ,' to pacify check-declare.
* lisp/org/ob-comint.el (tramp-flush-directory-property):
* lisp/org/ob-tangle.el (org-babel-update-block-body):
* lisp/org/org-bibtex.el (org-babel-trim):
* lisp/org/org-pcomplete.el (org-export-backend-options):
* lisp/org/org-protocol.el (org-publish-get-project-from-filename):
Fix file name in declare-function.
* lisp/org/ob-comint.el (with-parsed-tramp-file-name)
* lisp/org/ob-core.el (with-parsed-tramp-file-name):
* lisp/org/org.el (org-beamer-mode):
* lisp/url/url-http.el (gnutls-negotiate):
Append ‘t’ to declare-function, since the declaration isn’t a defun.
* lisp/org/ob-core.el (show-all):
Declare outline-show-all instead, since it is the
non-obsolete version of this function.
(org-save-outline-visibility): Remove; not needed.
* lisp/org/ob-scheme.el (run-geiser, geiser-mode)
(geiser-eval-region, geiser-repl-exit):
* lisp/org/ox-org.el (htmlize-buffer):
Prepend "ext:" to file name, since it is not part of Emacs.
* lisp/org/ob-sh.el (org-babel-comint-in-buffer)
* lisp/org/org-gnus.el (nnimap-group-overview-filename):
Remove decl, since function was removed.
* lisp/org/ob-sh.el (org-babel-comint-with-output):
* lisp/org/org-macro.el (org-with-wide-buffer):
Omit unnecessary (and mismatching) decl.
* lisp/org/org-agenda.el (calendar-absolute-from-iso):
* lisp/org/org-clock.el (calendar-iso-to-absolute):
Declare calendar-iso-to-absolute instead, since it is the
non-obsolete version of this function.
* lisp/org/org-compat.el (w32-focus-frame):
Remove decl, since function is now obsolete.
2016-05-14 19:57:44 -07:00
Tao Fang
7b9a5c2a45 Fix: (void-variable url-http-response-status)
* lisp/url/url-http.el
(url-https-proxy-after-change-function): Display the error
message before doing the callback to avoid a void variable
situation (bug#23290).
2016-04-26 01:24:44 +02:00
Clément Pit--Claudel
234ef3b432 Compute User-Agent dynamically in url-http
* url-http.el (url-http-user-agent-string): Compute User-Agent
string dynamically.
(url-http--user-agent-default-string): New function.

* url-vars.el (url-privacy-level): Allow `emacs' in list of
information not to send.
(url-user-agent): Add nil and `default' options; do not
pre-compute value.
2016-04-24 14:51:33 +02:00
Lars Magne Ingebrigtsen
0d7aad1b30 Revert "Backport HTTPS proxy fix"
This reverts commit 2d1a6054b1.

It's too late in the Emacs 25 release cycle to add things like this to
Emacs 25.1.  It's border line new feature.
2016-04-06 18:36:18 +02:00
Tao Fang
2d1a6054b1 Backport HTTPS proxy fix
Cherry-picked from 3c623c26ae

Backport:
2016-04-06 13:45:26 +02:00
Tao Fang
3c623c26ae Allow URL using HTTPS proxies using CONNECT
* lisp/url/url-http.el (url-http-find-free-connection): Allow
using proxies (bug#11788).
(url-http-end-of-document-sentinel): Ditto.
(url-http): The protocol may change from http to https and
vice versa.
(url-https-proxy-connect): Allow using CONNECT proxies for https.
2016-04-04 22:21:34 +02:00
Lars Ingebrigtsen
7c1e6ebfcb Allow binding `url-mime-accept-string'
* lisp/url/url-http.el (url-http): Allow binding
`url-mime-accept-string' (bug#22855).

Backport:

(cherry picked from commit 144bb0cf32)
2016-03-01 14:50:01 +11:00
Lars Ingebrigtsen
144bb0cf32 Allow binding `url-mime-accept-string'
* lisp/url/url-http.el (url-http): Allow binding
`url-mime-accept-string' (bug#22855).
2016-03-01 14:49:26 +11:00