Commit graph

124381 commits

Author SHA1 Message Date
Lars Ingebrigtsen
b11531e99f Use XCAR/XCDR instead of Fcar etc 2016-02-01 01:15:43 +01:00
Lars Ingebrigtsen
8858b2ce88 Fix GC problem in async TLS connection
* process.h: All Lisp_Object slots have to come first,
otherwise they won't be protected from gc.
2016-02-01 01:10:57 +01:00
Lars Ingebrigtsen
4ff81f8fac Further TLS async work
* gnutls.c (boot_error): New function to either signal an
error or return an error code.
(Fgnutls_boot): Don't signal errors when running asynchronously.

* process.h (pset_status): Move here from process.c to be
able to use from gnutls.c.

* process.c (connect_network_socket): Do the TLS boot here
when running asynchronously.
(wait_reading_process_output): Rework the dns_processes
handling for more safety.
2016-02-01 00:27:07 +01:00
Lars Ingebrigtsen
9972329387 Clean up dead code
* lisp/net/gnutls.el (gnutls-async-sentinel): Remove.
2016-02-01 00:23:33 +01:00
Lars Ingebrigtsen
cecf6c9ac5 Rework the mechanisms for async GnuTLS connections
* lisp/net/gnutls.el (open-gnutls-stream): Compute the
gnutls-boot parameters and pass them to the process object.
(gnutls-negotiate): New parameter :return-keywords that won't
connect to anything, just compute the keywords.

* lisp/url/url-http.el (url-http): Revert async TLS sentinel
hack, which is no longer necessary.

* src/gnutls.c (Fgnutls_asynchronous_parameters): Rename from
gnutls-mark-process.

* src/process.c (connect_network_socket): If we're connecting to
an asynchronous TLS socket, complete the GnuTLS boot sequence here.

* src/process.h: New parameter gnutls_async_parameters.
2016-01-31 02:32:21 +01:00
Lars Ingebrigtsen
1f71df7aac Fix segfault from double free
* process.c (check_for_dns): Protect against double free
issues.
2016-01-31 02:00:12 +01:00
Lars Ingebrigtsen
e2d0ccc96e Remove debugging 2016-01-31 01:41:33 +01:00
Lars Ingebrigtsen
0f47153b97 Implement asynchronous GnuTLS connections
* doc/misc/emacs-gnutls.texi (Help For Developers): Mention
the nowait parameter.

* lisp/net/gnutls.el (open-gnutls-stream): Allow asynchronous
connections with the new nowait parameter.

* lisp/net/network-stream.el (network-stream-open-tls): Pass
on :nowait to open-gnutls-stream.

* lisp/url/url-http.el (url-http): Don't overwrite the
sentinel created by open-gnutls-stream.

* src/gnutls.c (Fgnutls_mark_process): New function.

* src/process.c (send_process): Don't write to GnuTLS sockets that
haven't been initialised yed.

* src/process.h: New slot gnutls_wait_p.
2016-01-31 01:34:45 +01:00
Lars Ingebrigtsen
cc45809152 Clean up compilation warnings 2016-01-30 09:09:02 +01:00
Lars Ingebrigtsen
4d43071112 Make async resolution more efficient
* process.c (wait_reading_process_output): Use a list of
process objects instead of looping through an array to check
for name resolution.  This should be much faster.
2016-01-30 09:07:24 +01:00
Lars Ingebrigtsen
e5b34678c4 More async memory leaks
* src/process.c (check_for_dns): Free even more allocated async stuff.
2016-01-30 05:31:21 +01:00
Lars Ingebrigtsen
c1b235ab6b Compilation for for systems with getaddrinfo_a
* process.c (Fmake_network_process): Make stuff work again on
systems with getaddrinfo_a.
2016-01-30 04:43:10 +01:00
Lars Ingebrigtsen
e5b2f25f35 Save correct server data
* process.c (connect_network_socket): Save the correct contact
info for servers.
2016-01-30 04:34:48 +01:00
Lars Ingebrigtsen
e99dc4a749 Compilation for for non-GNU systems
* process.c (Fmake_network_process): Make compilation work
again on hosts that don't have getaddrinfo_a.
2016-01-30 03:57:54 +01:00
Lars Ingebrigtsen
233e89cf23 Avoid memory leaks in async DNS
* process.c (check_for_dns): Free async DNS resources after
they've been used.
2016-01-30 03:51:04 +01:00
Lars Ingebrigtsen
0677d94e2d * process.c (check_for_dns): Free the result data. 2016-01-30 02:39:52 +01:00
Lars Ingebrigtsen
e9eb6107db Fix server connections
* process.c (Fmake_network_process): Make creating server
listening ports work again.
2016-01-30 02:25:08 +01:00
Lars Ingebrigtsen
860303cc4d Further make_network_process clean up
* process.c (Fmake_network_process): Remove setting of unused
family variable.
2016-01-30 01:33:30 +01:00
Lars Ingebrigtsen
4876011820 Clean up GETADDRINFO usage in make-network-process
* process.c (Fmake_network_process): Clean up the GETADDRINFO
handling.
2016-01-30 01:28:34 +01:00
Lars Ingebrigtsen
fdfb68690f Implement asynchronous name resolution
* process.c (Fmake_network_process): Do asynchronous DNS
lookups if we have getaddrinfo_a and the user requests :nowait.
(check_for_dns): New function.
(wait_reading_process_output): Check for pending name
resolution in the idle loop.

* process.h: Add structure for async DNS.
2016-01-30 00:49:18 +01:00
Lars Ingebrigtsen
44e235dd88 Fix memory leak
* process.c (connect_network_socket): Free previous sockaddr
before allocating a new one.
2016-01-29 00:36:11 +01:00
Lars Ingebrigtsen
7c6a60fa2c Return IP addresses in the correct order
* src/process.c (Fmake_network_process): Return the IP addresses
in the same order as getaddrinfo does.
(set_network_socket_coding_system): Clean up the code slightly.
2016-01-29 00:25:07 +01:00
Lars Ingebrigtsen
b013e6a90c Add checks for getaddrinfo_a
* configure.ac: Detect getaddrinfo_a.
2016-01-28 23:51:55 +01:00
Lars Ingebrigtsen
e09c0972c3 Refactor make_network_process
* src/process.c (set_network_socket_coding_system)
(connect_network_socket): Refactor out of
make_network_process to allow calling connect_network_socket
asynchronously.
(Fmake_network_process): Do nothing but parsing the parameters
and name resolution, leaving the connection to
connect_network_socket.
2016-01-28 23:50:47 +01:00
Glenn Morris
6d25cbeaaf ; Auto-commit of ChangeLog files. 2016-01-24 06:23:36 -05:00
Michael Albinus
8cdb9ac0fb Improve user name completion in Tramp
* lisp/net/tramp.el (tramp-parse-passwd, tramp-parse-etc-group):
Call also "getent passwd" or "getent group", if possible.
(tramp-parse-putty): Cache the result.
2016-01-23 16:20:21 +01:00
Michael Albinus
9b23750083 * etc/NEWS: Move kqueue entries to Emacs 25.1 sections. 2016-01-22 20:00:44 +01:00
Glenn Morris
9830b81292 Remove handling of non-string time-stamp formats, obsolete for 20 years.
* lisp/time-stamp.el (time-stamp-format): Doc fix.
(time-stamp-old-format-warn, time-stamp-fconcat): Remove.
(time-stamp-string): Ignore non-string formats.

; * etc/NEWS: Mention this.
2016-01-20 20:11:16 -05:00
Eli Zaretskii
4786c02b83 Anoter fix for problematic merge from emacs-25
* src/w32fns.c (globals_of_w32fns): Move initialization of
resetstkoflw to a non-Cygwin part.
2016-01-20 19:34:27 +02:00
Michael Albinus
1d5f46b20e Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2016-01-20 11:03:36 +01:00
Michael Albinus
282030fd34 * test/Makefile.in (mostlyclean): Use ${LOGFILES}. 2016-01-20 11:03:15 +01:00
Eli Zaretskii
64a568d610 Fix MS-Windows build broken by a botched merge from emacs-25
* src/w32.c (w32_crypto_hprov): New static variable.
(globals_of_w32): Initialize w32_crypto_hprov.
(w32_init_crypt_random, w32_init_random): New functions.
Include wincrypt.h.
* src/w32.h (w32_init_random): Add prototype.
2016-01-20 11:47:19 +02:00
Vincent Belaïche
b895c72059 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2016-01-20 08:30:51 +01:00
Vincent Belaïche
badcd38aa8 Correct a whole bunch of bugs coming with renamed cell relocation.
* lisp/ses.el (ses-localvars): rename variable
`ses--renamed-cell-symb-list' into `ses--in-killing-named-cell-list'
and adjust the comment about it.
(ses-plist-delq): new defun.
(ses--ses-buffer-list): new defvar.
(ses--unbind-cell-name): new defun.
(ses-relocate-symbol): Do not relocate symbol when it is a named cell.
(ses-relocate-formula): Undo change of
2011-12-27T19:30:39Z!vincentb1@users.sourceforge.net that was
preventing relocation for named cell --- now doing this is delegated
to function `ses-relocate-symbol'.
(ses-relocate-range): In docstring, undo change of
2016-01-03T07:31:52Z!johnw@newartisans.com, `ses-range' must remain
lower case as it is not a variable.
(ses-relocate-all): Cell name relocation : 1) check that cell is a
renamed cell by testing `ses-cell' property to :ses-named, rather than
comparing name to corresponding standard name. Set rowcol of renamed
cell into the hashmap --- `ses-cell' property must not be used for
that as the same name can be used for different locations in different
SES sheets ; 2) use `local-variable-if-set-p' rather than `boundp' and
`local-variable-p' to check if cell name is already in use in this
sheet or needs initialisation.
(ses-relocate-all): Cell value relocation : 1) like for name
relocation use the `ses-cell' property rather than comparing actual
name to corresponding standard name. 2) Correct bug introduced in
2011-12-27T19:30:39Z!vincentb1@users.sourceforge.net, as the test was
made the other way round than the intention --- ie value relocation
was disabled for standard cell, not for renamed cell as was the
intention.
(ses-relocate-all): Add loop for unbinding deleted renamed cells
names.
(ses-killbuffer-hook): new defun.
(ses-mode): Add the ses--ses-buffer-list maintenance mechanism ---
kill buffer hook, plus pushing current buffer if new in list.
(ses-delete-row, ses-delete-column): Collect deleted renamed cells
into `ses--in-killing-named-cell-list'.
(ses-rename-cell): Remove update of variable
`ses--renamed-cell-symb-list', this variable is renamed to
`ses--in-killing-named-cell-list', and its setting is done in
functions `ses-delete-row' and , `ses-delete-column' now.
(ses-rename-cell): Change correction of
2015-12-30T23:10:37Z!vincentb1@users.sourceforge.net concerning
computation of the range over which `cursor-intangible' property was
to be updated. This correction was ok for non spilling cells, but not
for cells spilling over following blank cells. Simply use
`next-single-property-change' rather than computing the end column
from column widths.
2016-01-20 08:28:06 +01:00
John Wiegley
1b76d91683 - 2016-01-18 22:59:51 -08:00
John Wiegley
bca49307c8 ; Merge from origin/emacs-25
The following commit was skipped:

6e79b63 ; Auto-commit of loaddefs files.
2016-01-18 22:56:34 -08:00
John Wiegley
140016558b Merge from origin/emacs-25
3ae7934 ; * etc/NEWS: Mark entries that don't need further treatment.
6165c36 * lisp/files.el (dir-locals--all-files): Respect absolute file-names
2ffdf15 * lisp/help-fns.el (describe-variable): Fix a left-over parenthesis
71ecd62 * lisp/dired-x.el (dired-omit-here-always): Use add-dir-local-variable
f0b82b3 * lisp/files.el (dir-locals--all-files): Use completion instead of wildcards
86e4513 Fix incompatbilities with MS-Windows 2000 and older
4e96521 Mention in PROBLEMS an issue with MS-Windows NT4
15c23aa Ensure 8-byte aligned memory allocation on MS-Windows 9X
39afa42 Fix tests for active region in hideif.el
05df666 Fix interactive specs in some hideif.el commands
2016-01-18 22:56:34 -08:00
John Wiegley
7823745acb ; Merge from origin/emacs-25
The following commit was skipped:

bb0cd31 Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25
2016-01-18 22:56:33 -08:00
John Wiegley
6acd2aa02c - 2016-01-18 22:56:33 -08:00
Paul Eggert
564c84f4b1 Avoid stdio in SIGINT handler
* admin/merge-gnulib (GNULIB_MODULES): Add ignore-value.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/ignore-value.h: New file, from gnulib.
* src/keyboard.c: Include it.
(write_stdout, read_stdin): New functions.
(handle_interrupt): Use them instead of printf and getchar,
and avoid fflush when handling signals.
2016-01-18 22:30:28 -08:00
Jens Lechtenboerger
9e0fc61954 Refactor mml-smime.el, mml1991.el, mml2015.el
(Maybe this is the last merge from Gnus git to Emacs git)

Cf. discussion on ding mailing list, messages in
<http://thread.gmane.org/gmane.emacs.gnus.general/86228>.
Common code from the three files mml-smime.el, mml1991.el, and
mml2015.el is moved to mml-sec.el.  Auxiliary functions are added
to gnus-util.el.

The code is supported by test cases with necessary test keys.

Documentation in message.texi is updated.

* doc/misc/message.texi (Security, Using S/MIME):
Update for refactoring mml-smime.el, mml1991.el, mml2015.el.
(Using OpenPGP): Rename from "Using PGP/MIME"; update contents.
(Passphrase caching, Encrypt-to-self, Bcc Warning): New sections.

* lisp/gnus/gnus-util.el (gnus-test-list, gnus-subsetp, gnus-setdiff):
New functions.

* lisp/gnus/mml-sec.el: Require gnus-util and epg.
(epa--select-keys): Autoload.
(mml-signencrypt-style-alist, mml-secure-cache-passphrase): Doc fix.
(mml-secure-openpgp-signers): New user option;
make mml1991-signers and mml2015-signers obsolete aliases to it.
(mml-secure-smime-signers): New user option;
make mml-smime-signers an obsolete alias to it.
(mml-secure-openpgp-encrypt-to-self): New user option;
make mml1991-encrypt-to-self and mml2015-encrypt-to-self obsolete
aliases to it.
(mml-secure-smime-encrypt-to-self): New user option;
make mml-smime-encrypt-to-self an obsolete alias to it.
(mml-secure-openpgp-sign-with-sender): New user option;
make mml2015-sign-with-sender an obsolete alias to it.
(mml-secure-smime-sign-with-sender): New user option;
make mml-smime-sign-with-sender an obsolete alias to it.
(mml-secure-openpgp-always-trust): New user option;
make mml2015-always-trust an obsolete alias to it.
(mml-secure-fail-when-key-problem, mml-secure-key-preferences):
New user options.
(mml-secure-cust-usage-lookup, mml-secure-cust-fpr-lookup)
(mml-secure-cust-record-keys, mml-secure-cust-remove-keys)
(mml-secure-add-secret-key-id, mml-secure-clear-secret-key-id-list)
(mml-secure-cache-passphrase-p, mml-secure-cache-expiry-interval)
(mml-secure-passphrase-callback, mml-secure-check-user-id)
(mml-secure-secret-key-exists-p, mml-secure-check-sub-key)
(mml-secure-find-usable-keys, mml-secure-select-preferred-keys)
(mml-secure-fingerprint, mml-secure-filter-keys)
(mml-secure-normalize-cust-name, mml-secure-select-keys)
(mml-secure-select-keys-1, mml-secure-signer-names, mml-secure-signers)
(mml-secure-self-recipients, mml-secure-recipients)
(mml-secure-epg-encrypt, mml-secure-epg-sign): New functions.

* lisp/gnus/mml-smime.el: Require epg;
refactor declaration and autoloading of epg functions.
(mml-smime-use): Doc fix.
(mml-smime-cache-passphrase, mml-smime-passphrase-cache-expiry):
Obsolete.
(mml-smime-get-dns-cert, mml-smime-get-ldap-cert):
Use format instead of gnus-format-message.
(mml-smime-epg-secret-key-id-list): Remove variable.
(mml-smime-epg-passphrase-callback, mml-smime-epg-find-usable-key)
(mml-smime-epg-find-usable-secret-key): Remove functions.
(mml-smime-epg-sign, mml-smime-epg-encrypt): Refactor.

* lisp/gnus/mml1991.el (mml1991-cache-passphrase)
(mml1991-passphrase-cache-expiry): Obsolete.
(mml1991-epg-secret-key-id-list): Remove variable.
(mml1991-epg-passphrase-callback, mml1991-epg-find-usable-key)
(mml1991-epg-find-usable-secret-key): Remove functions.
(mml1991-epg-sign, mml1991-epg-encrypt): Refactor.

* lisp/gnus/mml2015.el (mml2015-cache-passphrase)
(mml2015-passphrase-cache-expiry): Obsolete.
(mml2015-epg-secret-key-id-list): Remove variable.
(mml2015-epg-passphrase-callback, mml2015-epg-check-user-id)
(mml2015-epg-check-sub-key, mml2015-epg-find-usable-key)
(mml2015-epg-find-usable-secret-key): Remove functions.
(mml2015-epg-decrypt, mml2015-epg-clear-decrypt, mml2015-epg-sign)
(mml2015-epg-encrypt): Refactor.
2016-01-18 22:30:14 -08:00
Paul Eggert
cd19641ed3 Merge from gnulib
This mostly just updates copyright dates of gnulib files.
It also updates to the latest version of texinfo.tex.
2016-01-18 22:29:10 -08:00
YAMAMOTO Mitsuharu
394c81c092 Move variables to inner loop, preparing for Mac port merge
* src/keyboard.c (command_loop_1): Move variables `cmd',
`keybuf', and `i' to inner loop.
2016-01-18 22:29:10 -08:00
Paul Eggert
2e5a89fad1 Minor improvements to (random t) documentation
* doc/lispref/numbers.texi (Random Numbers):
* src/fns.c (Frandom):
Omit unnecessary details about randomness fallback.
Say that it is a fallback.
2016-01-18 21:33:31 -08:00
Dmitry Gutov
0ed8b42d22 ; Fix a typo 2016-01-19 08:05:23 +03:00
Dmitry Gutov
2ac78c2346 Rename methods in Ruby etags example file
* test/etags/ruby-src/test.rb: Rename the example methods to
correspond to the common terminology used in Ruby.
* test/etags/CTAGS.good:
* test/etags/ETAGS.good_1:
* test/etags/ETAGS.good_2:
* test/etags/ETAGS.good_3:
* test/etags/ETAGS.good_4:
* test/etags/ETAGS.good_5:
* test/etags/ETAGS.good_6: Adjust accordingly.
2016-01-19 08:03:41 +03:00
Dmitry Gutov
29da1cb3e7 Propertize backtick in 'def `(abc)' as symbol constituent
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Propertize backtick in 'def `(abc)' as symbol constituent.
(ruby-syntax-propertize-function):
Rename to ruby-syntax-propertize.
2016-01-19 07:58:46 +03:00
Eli Zaretskii
874a10b13f Fix scrolling under scroll-preserve-screen-position on TTY
* src/window.c (window_scroll_line_based): When setting point to
preserve screen coordinates, don't let cursor enter either of the
two scroll margins.  (Bug#22395)
2016-01-18 21:53:34 +02:00
Lars Magne Ingebrigtsen
2f838b7689 Fix shr table rendering of nested tables
* shr.el (shr-table-body): Don't include all tbodies in nested
tables in the levels above.
2016-01-18 20:37:44 +01:00
Dmitry Gutov
4e559f22a0 * lisp/progmodes/project.el (project--read-regexp): Quote the identifier. 2016-01-18 22:14:17 +03:00