summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-07-16 17:37:57 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-07-16 17:37:57 -0700
commit4f8a4547454e24304b4182fbf4ae4b34a7bdc92b (patch)
treed03d6d6cdd4b10a62633ed5f9da42d60dac016d0 /src
parentf0eb61e99dce9005dc94c909046f6130b3d4a97c (diff)
parent64a465b2d97d00f27ed74513047ced07b798b9fd (diff)
downloademacs-4f8a4547454e24304b4182fbf4ae4b34a7bdc92b.tar.gz
Merge from trunk.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog46
-rw-r--r--src/fileio.c4
-rw-r--r--src/gnutls.c32
-rw-r--r--src/lread.c8
-rw-r--r--src/makefile.w32-in3
-rw-r--r--src/process.c2
-rw-r--r--src/xdisp.c16
7 files changed, 91 insertions, 20 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 493b3277f52..b3d9eca469e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
-2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
+2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
Integer signedness and overflow and related fixes. (Bug#9079)
@@ -197,6 +197,47 @@
Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
well either way, and we prefer signed to unsigned.
+2011-07-16 Juanma Barranquero <lekktu@gmail.com>
+
+ * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
+
+2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
+
+2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
+ it's used from the C level.
+
+ * process.c: Use the same condition for POLL_FOR_INPUT in both
+ keyboard.c and process.c (bug#1858).
+
+2011-07-09 Lawrence Mitchell <wence@gmx.li>
+
+ * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
+ (Fgnutls_boot): Use it.
+
+2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
+
+ * doc.c (Fsubstitute_command_keys): Revert last change.
+
+2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * doc.c (Fsubstitute_command_keys): Clarify that \= really only
+ quotes the next character, and doesn't affect other longer
+ sequences (bug#8935).
+
+ * lread.c (syms_of_lread): Clarify that is isn't only
+ `eval-buffer' and `eval-defun' that's affected by
+ `lexical-binding' (bug#8460).
+
+2011-07-15 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
+ bidi redisplay when a line includes both an image and is
+ truncated.
+
2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
Fix minor problems found by static checking.
@@ -211,9 +252,6 @@
2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
- * data.c (Fcdr, Fcar): Revert the last change, since it didn't
- really clarify much.
-
* search.c (Fre_search_backward): Mention `case-fold-search' in
all the re_search_* functions (bug#8138).
diff --git a/src/fileio.c b/src/fileio.c
index d4fb0383119..c67bea79bd3 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1959,8 +1959,8 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */)
owner and group. */
if (input_file_statable_p)
{
- if (!NILP (preserve_uid_gid) && fchown (ofd, st.st_uid, st.st_gid) != 0)
- report_file_error ("Doing chown", Fcons (newname, Qnil));
+ if (!NILP (preserve_uid_gid))
+ fchown (ofd, st.st_uid, st.st_gid);
if (fchmod (ofd, st.st_mode & 07777) != 0)
report_file_error ("Doing chmod", Fcons (newname, Qnil));
}
diff --git a/src/gnutls.c b/src/gnutls.c
index 3761951b866..52e80a69ae5 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -35,7 +35,6 @@ static int
emacs_gnutls_handle_error (gnutls_session_t, int err);
static Lisp_Object Qgnutls_dll;
-static Lisp_Object Qgnutls_log_level;
static Lisp_Object Qgnutls_code;
static Lisp_Object Qgnutls_anon, Qgnutls_x509pki;
static Lisp_Object Qgnutls_e_interrupted, Qgnutls_e_again,
@@ -50,6 +49,7 @@ static Lisp_Object Qgnutls_bootprop_crlfiles;
static Lisp_Object Qgnutls_bootprop_callbacks;
static Lisp_Object Qgnutls_bootprop_loglevel;
static Lisp_Object Qgnutls_bootprop_hostname;
+static Lisp_Object Qgnutls_bootprop_min_prime_bits;
static Lisp_Object Qgnutls_bootprop_verify_flags;
static Lisp_Object Qgnutls_bootprop_verify_hostname_error;
@@ -105,6 +105,8 @@ DEF_GNUTLS_FN (int, gnutls_certificate_verify_peers2,
DEF_GNUTLS_FN (int, gnutls_credentials_set,
(gnutls_session_t, gnutls_credentials_type_t, void *));
DEF_GNUTLS_FN (void, gnutls_deinit, (gnutls_session_t));
+DEF_GNUTLS_FN (void, gnutls_dh_set_prime_bits,
+ (gnutls_session_t, unsigned int));
DEF_GNUTLS_FN (int, gnutls_error_is_fatal, (int));
DEF_GNUTLS_FN (int, gnutls_global_init, (void));
DEF_GNUTLS_FN (void, gnutls_global_set_log_function, (gnutls_log_func));
@@ -143,7 +145,6 @@ static int
init_gnutls_functions (Lisp_Object libraries)
{
HMODULE library;
- Lisp_Object gnutls_log_level = Fsymbol_value (Qgnutls_log_level);
int max_log_level = 1;
if (!(library = w32_delayed_load (libraries, Qgnutls_dll)))
@@ -169,6 +170,7 @@ init_gnutls_functions (Lisp_Object libraries)
LOAD_GNUTLS_FN (library, gnutls_certificate_verify_peers2);
LOAD_GNUTLS_FN (library, gnutls_credentials_set);
LOAD_GNUTLS_FN (library, gnutls_deinit);
+ LOAD_GNUTLS_FN (library, gnutls_dh_set_prime_bits);
LOAD_GNUTLS_FN (library, gnutls_error_is_fatal);
LOAD_GNUTLS_FN (library, gnutls_global_init);
LOAD_GNUTLS_FN (library, gnutls_global_set_log_function);
@@ -191,8 +193,8 @@ init_gnutls_functions (Lisp_Object libraries)
LOAD_GNUTLS_FN (library, gnutls_x509_crt_import);
LOAD_GNUTLS_FN (library, gnutls_x509_crt_init);
- if (NUMBERP (gnutls_log_level))
- max_log_level = XINT (gnutls_log_level);
+ if (NUMBERP (Vgnutls_log_level))
+ max_log_level = XINT (Vgnutls_log_level);
GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:",
SDATA (Fget (Qgnutls_dll, QCloaded_from)));
@@ -218,6 +220,7 @@ init_gnutls_functions (Lisp_Object libraries)
#define fn_gnutls_certificate_verify_peers2 gnutls_certificate_verify_peers2
#define fn_gnutls_credentials_set gnutls_credentials_set
#define fn_gnutls_deinit gnutls_deinit
+#define fn_gnutls_dh_set_prime_bits gnutls_dh_set_prime_bits
#define fn_gnutls_error_is_fatal gnutls_error_is_fatal
#define fn_gnutls_global_init gnutls_global_init
#define fn_gnutls_global_set_log_function gnutls_global_set_log_function
@@ -394,7 +397,6 @@ emacs_gnutls_read (struct Lisp_Process *proc, char *buf, EMACS_INT nbyte)
static int
emacs_gnutls_handle_error (gnutls_session_t session, int err)
{
- Lisp_Object gnutls_log_level = Fsymbol_value (Qgnutls_log_level);
int max_log_level = 0;
int ret;
@@ -404,8 +406,8 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err)
if (err >= 0)
return 0;
- if (NUMBERP (gnutls_log_level))
- max_log_level = XINT (gnutls_log_level);
+ if (NUMBERP (Vgnutls_log_level))
+ max_log_level = XINT (Vgnutls_log_level);
/* TODO: use gnutls-error-fatalp and gnutls-error-string. */
@@ -646,6 +648,9 @@ gnutls_certificate_set_verify_flags.
:verify-hostname-error, if non-nil, makes a hostname mismatch an
error. Otherwise it will be just a warning.
+:min-prime-bits is the minimum accepted number of bits the client will
+accept in Diffie-Hellman key exchange.
+
The debug level will be set for this process AND globally for GnuTLS.
So if you set it higher or lower at any point, it affects global
debugging.
@@ -698,6 +703,7 @@ one trustfile (usually a CA bundle). */)
Lisp_Object verify_flags;
/* Lisp_Object verify_error; */
Lisp_Object verify_hostname_error;
+ Lisp_Object prime_bits;
CHECK_PROCESS (proc);
CHECK_SYMBOL (type);
@@ -719,6 +725,7 @@ one trustfile (usually a CA bundle). */)
verify_flags = Fplist_get (proplist, Qgnutls_bootprop_verify_flags);
/* verify_error = Fplist_get (proplist, Qgnutls_bootprop_verify_error); */
verify_hostname_error = Fplist_get (proplist, Qgnutls_bootprop_verify_hostname_error);
+ prime_bits = Fplist_get (proplist, Qgnutls_bootprop_min_prime_bits);
if (!STRINGP (hostname))
error ("gnutls-boot: invalid :hostname parameter");
@@ -936,6 +943,11 @@ one trustfile (usually a CA bundle). */)
GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_PRIORITY;
+ if (!EQ (prime_bits, Qnil))
+ {
+ fn_gnutls_dh_set_prime_bits (state, XUINT (prime_bits));
+ }
+
if (EQ (type, Qgnutls_x509pki))
{
ret = fn_gnutls_credentials_set (state, GNUTLS_CRD_CERTIFICATE, x509_cred);
@@ -1103,7 +1115,6 @@ syms_of_gnutls (void)
gnutls_global_initialized = 0;
DEFSYM (Qgnutls_dll, "gnutls");
- DEFSYM (Qgnutls_log_level, "gnutls-log-level");
DEFSYM (Qgnutls_code, "gnutls-code");
DEFSYM (Qgnutls_anon, "gnutls-anon");
DEFSYM (Qgnutls_x509pki, "gnutls-x509pki");
@@ -1114,6 +1125,7 @@ syms_of_gnutls (void)
DEFSYM (Qgnutls_bootprop_crlfiles, ":crlfiles");
DEFSYM (Qgnutls_bootprop_callbacks, ":callbacks");
DEFSYM (Qgnutls_bootprop_callbacks_verify, "verify");
+ DEFSYM (Qgnutls_bootprop_min_prime_bits, ":min-prime-bits");
DEFSYM (Qgnutls_bootprop_loglevel, ":loglevel");
DEFSYM (Qgnutls_bootprop_verify_flags, ":verify-flags");
DEFSYM (Qgnutls_bootprop_verify_hostname_error, ":verify-hostname-error");
@@ -1142,6 +1154,10 @@ syms_of_gnutls (void)
defsubr (&Sgnutls_deinit);
defsubr (&Sgnutls_bye);
defsubr (&Sgnutls_available_p);
+
+ DEFVAR_INT ("gnutls-log-level", Vgnutls_log_level,
+ doc: /* Logging level used by the GnuTLS functions. */);
+ Vgnutls_log_level = make_number (0);
}
#endif /* HAVE_GNUTLS */
diff --git a/src/lread.c b/src/lread.c
index bef1cc8e591..c80ac430671 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4491,9 +4491,11 @@ to load. See also `load-dangerous-libraries'. */);
staticpro (&Qlexical_binding);
DEFVAR_LISP ("lexical-binding", Vlexical_binding,
doc: /* If non-nil, use lexical binding when evaluating code.
-This only applies to code evaluated by `eval-buffer' and `eval-region'.
-This variable is automatically set from the file variables of an interpreted
- Lisp file read using `load'. */);
+This applies to code evaluated by `eval-buffer' and `eval-region' and
+other commands that call these functions, like `eval-defun' and
+the like.
+This variable is automatically set from the file variables of an
+interpreted Lisp file read using `load'. */);
Fmake_variable_buffer_local (Qlexical_binding);
DEFVAR_LISP ("eval-buffer-list", Veval_buffer_list,
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index 88b53554925..fd29dec9096 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -221,7 +221,8 @@ GLOBAL_SOURCES = dosfns.c msdos.c \
syntax.c bytecode.c \
process.c callproc.c unexw32.c \
region-cache.c sound.c atimer.c \
- doprnt.c intervals.c textprop.c composite.c
+ doprnt.c intervals.c textprop.c composite.c \
+ gnutls.c
SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o dbusbind.o
obj = $(GLOBAL_SOURCES:.c=.o)
diff --git a/src/process.c b/src/process.c
index 1a884357b86..236c27e5c3a 100644
--- a/src/process.c
+++ b/src/process.c
@@ -245,7 +245,7 @@ static void create_pty (Lisp_Object);
/* If we support a window system, turn on the code to poll periodically
to detect C-g. It isn't actually used when doing interrupt input. */
-#ifdef HAVE_WINDOW_SYSTEM
+#if defined(HAVE_WINDOW_SYSTEM) && !defined(USE_ASYNC_EVENTS)
#define POLL_FOR_INPUT
#endif
diff --git a/src/xdisp.c b/src/xdisp.c
index 5285d945975..0352867941e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -7928,7 +7928,14 @@ move_it_in_display_line_to (struct it *it,
|| IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
{
if (!get_next_display_element (it)
- || BUFFER_POS_REACHED_P ())
+ || BUFFER_POS_REACHED_P ()
+ /* If we are past TO_CHARPOS, but never saw any
+ character positions smaller than TO_CHARPOS,
+ return MOVE_POS_MATCH_OR_ZV, like the
+ unidirectional display did. */
+ || ((op & MOVE_TO_POS) != 0
+ && !saw_smaller_pos
+ && IT_CHARPOS (*it) > to_charpos))
{
result = MOVE_POS_MATCH_OR_ZV;
break;
@@ -7939,6 +7946,13 @@ move_it_in_display_line_to (struct it *it,
break;
}
}
+ else if ((op & MOVE_TO_POS) != 0
+ && !saw_smaller_pos
+ && IT_CHARPOS (*it) > to_charpos)
+ {
+ result = MOVE_POS_MATCH_OR_ZV;
+ break;
+ }
result = MOVE_LINE_TRUNCATED;
break;
}