aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoakim Verona2011-07-17 23:57:23 +0200
committerJoakim Verona2011-07-17 23:57:23 +0200
commitb0ec5b0839c3f2687b4dddc385ae22b72f96db99 (patch)
treed35d3789847cbdd287e9ffec4ea53a0ac63fc988 /src
parent32b1b66b26662eb2dd46657cbd292063691bfc79 (diff)
parent6265325e6bc5ed7da0e049f1b6e148932ea69e34 (diff)
downloademacs-b0ec5b0839c3f2687b4dddc385ae22b72f96db99.tar.gz
emacs-b0ec5b0839c3f2687b4dddc385ae22b72f96db99.zip
merge upstream
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog57
-rw-r--r--src/fileio.c6
-rw-r--r--src/gnutls.c32
-rw-r--r--src/lread.c57
-rw-r--r--src/makefile.w32-in3
-rw-r--r--src/process.c2
-rw-r--r--src/xdisp.c16
7 files changed, 133 insertions, 40 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 21563806ece..c06c98c5418 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,60 @@
12011-07-17 Andreas Schwab <schwab@linux-m68k.org>
2
3 * lread.c (read_integer): Unread even EOF character.
4 (read1): Likewise. Properly record start position of symbol.
5
6 * lread.c (read1): Read `#:' as empty uninterned symbol if no
7 symbol character follows.
8
92011-07-17 Paul Eggert <eggert@cs.ucla.edu>
10
11 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
12 This works around a problem with the previous change to Fcopy_file.
13 Recent glibc declares fchown with __attribute__((warn_unused_result)),
14 and without this change, GCC might complain about discarding
15 fchown's return value.
16
172011-07-16 Juanma Barranquero <lekktu@gmail.com>
18
19 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
20
212011-07-16 Paul Eggert <eggert@cs.ucla.edu>
22
23 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
24
252011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
26
27 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
28 it's used from the C level.
29
30 * process.c: Use the same condition for POLL_FOR_INPUT in both
31 keyboard.c and process.c (bug#1858).
32
332011-07-09 Lawrence Mitchell <wence@gmx.li>
34
35 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
36 (Fgnutls_boot): Use it.
37
382011-07-15 Andreas Schwab <schwab@linux-m68k.org>
39
40 * doc.c (Fsubstitute_command_keys): Revert last change.
41
422011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
43
44 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
45 quotes the next character, and doesn't affect other longer
46 sequences (bug#8935).
47
48 * lread.c (syms_of_lread): Clarify that is isn't only
49 `eval-buffer' and `eval-defun' that's affected by
50 `lexical-binding' (bug#8460).
51
522011-07-15 Eli Zaretskii <eliz@gnu.org>
53
54 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
55 bidi redisplay when a line includes both an image and is
56 truncated.
57
12011-07-14 Paul Eggert <eggert@cs.ucla.edu> 582011-07-14 Paul Eggert <eggert@cs.ucla.edu>
2 59
3 Fix minor problems found by static checking. 60 Fix minor problems found by static checking.
diff --git a/src/fileio.c b/src/fileio.c
index c6f8dfe4683..a52e834c2b2 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -38,6 +38,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
38#include <selinux/context.h> 38#include <selinux/context.h>
39#endif 39#endif
40 40
41#include <ignore-value.h>
42
41#include "lisp.h" 43#include "lisp.h"
42#include "intervals.h" 44#include "intervals.h"
43#include "buffer.h" 45#include "buffer.h"
@@ -1959,8 +1961,8 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */)
1959 owner and group. */ 1961 owner and group. */
1960 if (input_file_statable_p) 1962 if (input_file_statable_p)
1961 { 1963 {
1962 if (!NILP (preserve_uid_gid) && fchown (ofd, st.st_uid, st.st_gid) != 0) 1964 if (!NILP (preserve_uid_gid))
1963 report_file_error ("Doing chown", Fcons (newname, Qnil)); 1965 ignore_value (fchown (ofd, st.st_uid, st.st_gid));
1964 if (fchmod (ofd, st.st_mode & 07777) != 0) 1966 if (fchmod (ofd, st.st_mode & 07777) != 0)
1965 report_file_error ("Doing chmod", Fcons (newname, Qnil)); 1967 report_file_error ("Doing chmod", Fcons (newname, Qnil));
1966 } 1968 }
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
35emacs_gnutls_handle_error (gnutls_session_t, int err); 35emacs_gnutls_handle_error (gnutls_session_t, int err);
36 36
37static Lisp_Object Qgnutls_dll; 37static Lisp_Object Qgnutls_dll;
38static Lisp_Object Qgnutls_log_level;
39static Lisp_Object Qgnutls_code; 38static Lisp_Object Qgnutls_code;
40static Lisp_Object Qgnutls_anon, Qgnutls_x509pki; 39static Lisp_Object Qgnutls_anon, Qgnutls_x509pki;
41static Lisp_Object Qgnutls_e_interrupted, Qgnutls_e_again, 40static Lisp_Object Qgnutls_e_interrupted, Qgnutls_e_again,
@@ -50,6 +49,7 @@ static Lisp_Object Qgnutls_bootprop_crlfiles;
50static Lisp_Object Qgnutls_bootprop_callbacks; 49static Lisp_Object Qgnutls_bootprop_callbacks;
51static Lisp_Object Qgnutls_bootprop_loglevel; 50static Lisp_Object Qgnutls_bootprop_loglevel;
52static Lisp_Object Qgnutls_bootprop_hostname; 51static Lisp_Object Qgnutls_bootprop_hostname;
52static Lisp_Object Qgnutls_bootprop_min_prime_bits;
53static Lisp_Object Qgnutls_bootprop_verify_flags; 53static Lisp_Object Qgnutls_bootprop_verify_flags;
54static Lisp_Object Qgnutls_bootprop_verify_hostname_error; 54static Lisp_Object Qgnutls_bootprop_verify_hostname_error;
55 55
@@ -105,6 +105,8 @@ DEF_GNUTLS_FN (int, gnutls_certificate_verify_peers2,
105DEF_GNUTLS_FN (int, gnutls_credentials_set, 105DEF_GNUTLS_FN (int, gnutls_credentials_set,
106 (gnutls_session_t, gnutls_credentials_type_t, void *)); 106 (gnutls_session_t, gnutls_credentials_type_t, void *));
107DEF_GNUTLS_FN (void, gnutls_deinit, (gnutls_session_t)); 107DEF_GNUTLS_FN (void, gnutls_deinit, (gnutls_session_t));
108DEF_GNUTLS_FN (void, gnutls_dh_set_prime_bits,
109 (gnutls_session_t, unsigned int));
108DEF_GNUTLS_FN (int, gnutls_error_is_fatal, (int)); 110DEF_GNUTLS_FN (int, gnutls_error_is_fatal, (int));
109DEF_GNUTLS_FN (int, gnutls_global_init, (void)); 111DEF_GNUTLS_FN (int, gnutls_global_init, (void));
110DEF_GNUTLS_FN (void, gnutls_global_set_log_function, (gnutls_log_func)); 112DEF_GNUTLS_FN (void, gnutls_global_set_log_function, (gnutls_log_func));
@@ -143,7 +145,6 @@ static int
143init_gnutls_functions (Lisp_Object libraries) 145init_gnutls_functions (Lisp_Object libraries)
144{ 146{
145 HMODULE library; 147 HMODULE library;
146 Lisp_Object gnutls_log_level = Fsymbol_value (Qgnutls_log_level);
147 int max_log_level = 1; 148 int max_log_level = 1;
148 149
149 if (!(library = w32_delayed_load (libraries, Qgnutls_dll))) 150 if (!(library = w32_delayed_load (libraries, Qgnutls_dll)))
@@ -169,6 +170,7 @@ init_gnutls_functions (Lisp_Object libraries)
169 LOAD_GNUTLS_FN (library, gnutls_certificate_verify_peers2); 170 LOAD_GNUTLS_FN (library, gnutls_certificate_verify_peers2);
170 LOAD_GNUTLS_FN (library, gnutls_credentials_set); 171 LOAD_GNUTLS_FN (library, gnutls_credentials_set);
171 LOAD_GNUTLS_FN (library, gnutls_deinit); 172 LOAD_GNUTLS_FN (library, gnutls_deinit);
173 LOAD_GNUTLS_FN (library, gnutls_dh_set_prime_bits);
172 LOAD_GNUTLS_FN (library, gnutls_error_is_fatal); 174 LOAD_GNUTLS_FN (library, gnutls_error_is_fatal);
173 LOAD_GNUTLS_FN (library, gnutls_global_init); 175 LOAD_GNUTLS_FN (library, gnutls_global_init);
174 LOAD_GNUTLS_FN (library, gnutls_global_set_log_function); 176 LOAD_GNUTLS_FN (library, gnutls_global_set_log_function);
@@ -191,8 +193,8 @@ init_gnutls_functions (Lisp_Object libraries)
191 LOAD_GNUTLS_FN (library, gnutls_x509_crt_import); 193 LOAD_GNUTLS_FN (library, gnutls_x509_crt_import);
192 LOAD_GNUTLS_FN (library, gnutls_x509_crt_init); 194 LOAD_GNUTLS_FN (library, gnutls_x509_crt_init);
193 195
194 if (NUMBERP (gnutls_log_level)) 196 if (NUMBERP (Vgnutls_log_level))
195 max_log_level = XINT (gnutls_log_level); 197 max_log_level = XINT (Vgnutls_log_level);
196 198
197 GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:", 199 GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:",
198 SDATA (Fget (Qgnutls_dll, QCloaded_from))); 200 SDATA (Fget (Qgnutls_dll, QCloaded_from)));
@@ -218,6 +220,7 @@ init_gnutls_functions (Lisp_Object libraries)
218#define fn_gnutls_certificate_verify_peers2 gnutls_certificate_verify_peers2 220#define fn_gnutls_certificate_verify_peers2 gnutls_certificate_verify_peers2
219#define fn_gnutls_credentials_set gnutls_credentials_set 221#define fn_gnutls_credentials_set gnutls_credentials_set
220#define fn_gnutls_deinit gnutls_deinit 222#define fn_gnutls_deinit gnutls_deinit
223#define fn_gnutls_dh_set_prime_bits gnutls_dh_set_prime_bits
221#define fn_gnutls_error_is_fatal gnutls_error_is_fatal 224#define fn_gnutls_error_is_fatal gnutls_error_is_fatal
222#define fn_gnutls_global_init gnutls_global_init 225#define fn_gnutls_global_init gnutls_global_init
223#define fn_gnutls_global_set_log_function gnutls_global_set_log_function 226#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)
394static int 397static int
395emacs_gnutls_handle_error (gnutls_session_t session, int err) 398emacs_gnutls_handle_error (gnutls_session_t session, int err)
396{ 399{
397 Lisp_Object gnutls_log_level = Fsymbol_value (Qgnutls_log_level);
398 int max_log_level = 0; 400 int max_log_level = 0;
399 401
400 int ret; 402 int ret;
@@ -404,8 +406,8 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err)
404 if (err >= 0) 406 if (err >= 0)
405 return 0; 407 return 0;
406 408
407 if (NUMBERP (gnutls_log_level)) 409 if (NUMBERP (Vgnutls_log_level))
408 max_log_level = XINT (gnutls_log_level); 410 max_log_level = XINT (Vgnutls_log_level);
409 411
410 /* TODO: use gnutls-error-fatalp and gnutls-error-string. */ 412 /* TODO: use gnutls-error-fatalp and gnutls-error-string. */
411 413
@@ -646,6 +648,9 @@ gnutls_certificate_set_verify_flags.
646:verify-hostname-error, if non-nil, makes a hostname mismatch an 648:verify-hostname-error, if non-nil, makes a hostname mismatch an
647error. Otherwise it will be just a warning. 649error. Otherwise it will be just a warning.
648 650
651:min-prime-bits is the minimum accepted number of bits the client will
652accept in Diffie-Hellman key exchange.
653
649The debug level will be set for this process AND globally for GnuTLS. 654The debug level will be set for this process AND globally for GnuTLS.
650So if you set it higher or lower at any point, it affects global 655So if you set it higher or lower at any point, it affects global
651debugging. 656debugging.
@@ -698,6 +703,7 @@ one trustfile (usually a CA bundle). */)
698 Lisp_Object verify_flags; 703 Lisp_Object verify_flags;
699 /* Lisp_Object verify_error; */ 704 /* Lisp_Object verify_error; */
700 Lisp_Object verify_hostname_error; 705 Lisp_Object verify_hostname_error;
706 Lisp_Object prime_bits;
701 707
702 CHECK_PROCESS (proc); 708 CHECK_PROCESS (proc);
703 CHECK_SYMBOL (type); 709 CHECK_SYMBOL (type);
@@ -719,6 +725,7 @@ one trustfile (usually a CA bundle). */)
719 verify_flags = Fplist_get (proplist, Qgnutls_bootprop_verify_flags); 725 verify_flags = Fplist_get (proplist, Qgnutls_bootprop_verify_flags);
720 /* verify_error = Fplist_get (proplist, Qgnutls_bootprop_verify_error); */ 726 /* verify_error = Fplist_get (proplist, Qgnutls_bootprop_verify_error); */
721 verify_hostname_error = Fplist_get (proplist, Qgnutls_bootprop_verify_hostname_error); 727 verify_hostname_error = Fplist_get (proplist, Qgnutls_bootprop_verify_hostname_error);
728 prime_bits = Fplist_get (proplist, Qgnutls_bootprop_min_prime_bits);
722 729
723 if (!STRINGP (hostname)) 730 if (!STRINGP (hostname))
724 error ("gnutls-boot: invalid :hostname parameter"); 731 error ("gnutls-boot: invalid :hostname parameter");
@@ -936,6 +943,11 @@ one trustfile (usually a CA bundle). */)
936 943
937 GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_PRIORITY; 944 GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_PRIORITY;
938 945
946 if (!EQ (prime_bits, Qnil))
947 {
948 fn_gnutls_dh_set_prime_bits (state, XUINT (prime_bits));
949 }
950
939 if (EQ (type, Qgnutls_x509pki)) 951 if (EQ (type, Qgnutls_x509pki))
940 { 952 {
941 ret = fn_gnutls_credentials_set (state, GNUTLS_CRD_CERTIFICATE, x509_cred); 953 ret = fn_gnutls_credentials_set (state, GNUTLS_CRD_CERTIFICATE, x509_cred);
@@ -1103,7 +1115,6 @@ syms_of_gnutls (void)
1103 gnutls_global_initialized = 0; 1115 gnutls_global_initialized = 0;
1104 1116
1105 DEFSYM (Qgnutls_dll, "gnutls"); 1117 DEFSYM (Qgnutls_dll, "gnutls");
1106 DEFSYM (Qgnutls_log_level, "gnutls-log-level");
1107 DEFSYM (Qgnutls_code, "gnutls-code"); 1118 DEFSYM (Qgnutls_code, "gnutls-code");
1108 DEFSYM (Qgnutls_anon, "gnutls-anon"); 1119 DEFSYM (Qgnutls_anon, "gnutls-anon");
1109 DEFSYM (Qgnutls_x509pki, "gnutls-x509pki"); 1120 DEFSYM (Qgnutls_x509pki, "gnutls-x509pki");
@@ -1114,6 +1125,7 @@ syms_of_gnutls (void)
1114 DEFSYM (Qgnutls_bootprop_crlfiles, ":crlfiles"); 1125 DEFSYM (Qgnutls_bootprop_crlfiles, ":crlfiles");
1115 DEFSYM (Qgnutls_bootprop_callbacks, ":callbacks"); 1126 DEFSYM (Qgnutls_bootprop_callbacks, ":callbacks");
1116 DEFSYM (Qgnutls_bootprop_callbacks_verify, "verify"); 1127 DEFSYM (Qgnutls_bootprop_callbacks_verify, "verify");
1128 DEFSYM (Qgnutls_bootprop_min_prime_bits, ":min-prime-bits");
1117 DEFSYM (Qgnutls_bootprop_loglevel, ":loglevel"); 1129 DEFSYM (Qgnutls_bootprop_loglevel, ":loglevel");
1118 DEFSYM (Qgnutls_bootprop_verify_flags, ":verify-flags"); 1130 DEFSYM (Qgnutls_bootprop_verify_flags, ":verify-flags");
1119 DEFSYM (Qgnutls_bootprop_verify_hostname_error, ":verify-hostname-error"); 1131 DEFSYM (Qgnutls_bootprop_verify_hostname_error, ":verify-hostname-error");
@@ -1142,6 +1154,10 @@ syms_of_gnutls (void)
1142 defsubr (&Sgnutls_deinit); 1154 defsubr (&Sgnutls_deinit);
1143 defsubr (&Sgnutls_bye); 1155 defsubr (&Sgnutls_bye);
1144 defsubr (&Sgnutls_available_p); 1156 defsubr (&Sgnutls_available_p);
1157
1158 DEFVAR_INT ("gnutls-log-level", Vgnutls_log_level,
1159 doc: /* Logging level used by the GnuTLS functions. */);
1160 Vgnutls_log_level = make_number (0);
1145} 1161}
1146 1162
1147#endif /* HAVE_GNUTLS */ 1163#endif /* HAVE_GNUTLS */
diff --git a/src/lread.c b/src/lread.c
index 6cb217a21c6..8b46f382694 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2327,8 +2327,7 @@ read_integer (Lisp_Object readcharfun, EMACS_INT radix)
2327 c = READCHAR; 2327 c = READCHAR;
2328 } 2328 }
2329 2329
2330 if (c >= 0) 2330 UNREAD (c);
2331 UNREAD (c);
2332 *p = '\0'; 2331 *p = '\0';
2333 } 2332 }
2334 2333
@@ -2583,8 +2582,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2583 nskip *= 10; 2582 nskip *= 10;
2584 nskip += c - '0'; 2583 nskip += c - '0';
2585 } 2584 }
2586 if (c >= 0) 2585 UNREAD (c);
2587 UNREAD (c);
2588 2586
2589 if (load_force_doc_strings 2587 if (load_force_doc_strings
2590 && (EQ (readcharfun, Qget_file_char) 2588 && (EQ (readcharfun, Qget_file_char)
@@ -2660,7 +2658,17 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2660 { 2658 {
2661 uninterned_symbol = 1; 2659 uninterned_symbol = 1;
2662 c = READCHAR; 2660 c = READCHAR;
2663 goto default_label; 2661 if (!(c > 040
2662 && c != 0x8a0
2663 && (c >= 0200
2664 || strchr ("\"';()[]#`,", c) == NULL)))
2665 {
2666 /* No symbol character follows, this is the empty
2667 symbol. */
2668 UNREAD (c);
2669 return Fmake_symbol (build_string (""));
2670 }
2671 goto read_symbol;
2664 } 2672 }
2665 /* Reader forms that can reuse previously read objects. */ 2673 /* Reader forms that can reuse previously read objects. */
2666 if (c >= '0' && c <= '9') 2674 if (c >= '0' && c <= '9')
@@ -2841,7 +2849,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2841 next_char = READCHAR; 2849 next_char = READCHAR;
2842 ok = (next_char <= 040 2850 ok = (next_char <= 040
2843 || (next_char < 0200 2851 || (next_char < 0200
2844 && (strchr ("\"';()[]#?`,.", next_char)))); 2852 && strchr ("\"';()[]#?`,.", next_char) != NULL));
2845 UNREAD (next_char); 2853 UNREAD (next_char);
2846 if (ok) 2854 if (ok)
2847 return make_number (c); 2855 return make_number (c);
@@ -2966,11 +2974,6 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2966 /* Otherwise, READ_BUFFER contains only ASCII. */ 2974 /* Otherwise, READ_BUFFER contains only ASCII. */
2967 } 2975 }
2968 2976
2969 /* We want readchar_count to be the number of characters, not
2970 bytes. Hence we adjust for multibyte characters in the
2971 string. ... But it doesn't seem to be necessary, because
2972 READCHAR *does* read multibyte characters from buffers. */
2973 /* readchar_count -= (p - read_buffer) - nchars; */
2974 if (read_pure) 2977 if (read_pure)
2975 return make_pure_string (read_buffer, nchars, p - read_buffer, 2978 return make_pure_string (read_buffer, nchars, p - read_buffer,
2976 (force_multibyte 2979 (force_multibyte
@@ -2987,7 +2990,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2987 2990
2988 if (next_char <= 040 2991 if (next_char <= 040
2989 || (next_char < 0200 2992 || (next_char < 0200
2990 && (strchr ("\"';([#?`,", next_char)))) 2993 && strchr ("\"';([#?`,", next_char) != NULL))
2991 { 2994 {
2992 *pch = c; 2995 *pch = c;
2993 return Qnil; 2996 return Qnil;
@@ -3002,9 +3005,12 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
3002 if (c <= 040) goto retry; 3005 if (c <= 040) goto retry;
3003 if (c == 0x8a0) /* NBSP */ 3006 if (c == 0x8a0) /* NBSP */
3004 goto retry; 3007 goto retry;
3008
3009 read_symbol:
3005 { 3010 {
3006 char *p = read_buffer; 3011 char *p = read_buffer;
3007 int quoted = 0; 3012 int quoted = 0;
3013 EMACS_INT start_position = readchar_count - 1;
3008 3014
3009 { 3015 {
3010 char *end = read_buffer + read_buffer_size; 3016 char *end = read_buffer + read_buffer_size;
@@ -3035,10 +3041,11 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
3035 else 3041 else
3036 *p++ = c; 3042 *p++ = c;
3037 c = READCHAR; 3043 c = READCHAR;
3038 } while (c > 040 3044 }
3039 && c != 0x8a0 /* NBSP */ 3045 while (c > 040
3040 && (c >= 0200 3046 && c != 0x8a0 /* NBSP */
3041 || !(strchr ("\"';()[]#`,", c)))); 3047 && (c >= 0200
3048 || strchr ("\"';()[]#`,", c) == NULL));
3042 3049
3043 if (p == end) 3050 if (p == end)
3044 { 3051 {
@@ -3051,8 +3058,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
3051 end = read_buffer + read_buffer_size; 3058 end = read_buffer + read_buffer_size;
3052 } 3059 }
3053 *p = 0; 3060 *p = 0;
3054 if (c >= 0) 3061 UNREAD (c);
3055 UNREAD (c);
3056 } 3062 }
3057 3063
3058 if (!quoted && !uninterned_symbol) 3064 if (!quoted && !uninterned_symbol)
@@ -3080,12 +3086,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
3080 if (EQ (Vread_with_symbol_positions, Qt) 3086 if (EQ (Vread_with_symbol_positions, Qt)
3081 || EQ (Vread_with_symbol_positions, readcharfun)) 3087 || EQ (Vread_with_symbol_positions, readcharfun))
3082 Vread_symbol_positions_list = 3088 Vread_symbol_positions_list =
3083 /* Kind of a hack; this will probably fail if characters 3089 Fcons (Fcons (result, make_number (start_position)),
3084 in the symbol name were escaped. Not really a big
3085 deal, though. */
3086 Fcons (Fcons (result,
3087 make_number (readchar_count
3088 - XFASTINT (Flength (Fsymbol_name (result))))),
3089 Vread_symbol_positions_list); 3090 Vread_symbol_positions_list);
3090 return result; 3091 return result;
3091 } 3092 }
@@ -4510,9 +4511,11 @@ to load. See also `load-dangerous-libraries'. */);
4510 staticpro (&Qlexical_binding); 4511 staticpro (&Qlexical_binding);
4511 DEFVAR_LISP ("lexical-binding", Vlexical_binding, 4512 DEFVAR_LISP ("lexical-binding", Vlexical_binding,
4512 doc: /* If non-nil, use lexical binding when evaluating code. 4513 doc: /* If non-nil, use lexical binding when evaluating code.
4513This only applies to code evaluated by `eval-buffer' and `eval-region'. 4514This applies to code evaluated by `eval-buffer' and `eval-region' and
4514This variable is automatically set from the file variables of an interpreted 4515other commands that call these functions, like `eval-defun' and
4515 Lisp file read using `load'. */); 4516the like.
4517This variable is automatically set from the file variables of an
4518interpreted Lisp file read using `load'. */);
4516 Fmake_variable_buffer_local (Qlexical_binding); 4519 Fmake_variable_buffer_local (Qlexical_binding);
4517 4520
4518 DEFVAR_LISP ("eval-buffer-list", Veval_buffer_list, 4521 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 \
221 syntax.c bytecode.c \ 221 syntax.c bytecode.c \
222 process.c callproc.c unexw32.c \ 222 process.c callproc.c unexw32.c \
223 region-cache.c sound.c atimer.c \ 223 region-cache.c sound.c atimer.c \
224 doprnt.c intervals.c textprop.c composite.c 224 doprnt.c intervals.c textprop.c composite.c \
225 gnutls.c
225SOME_MACHINE_OBJECTS = dosfns.o msdos.o \ 226SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
226 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o dbusbind.o 227 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o dbusbind.o
227obj = $(GLOBAL_SOURCES:.c=.o) 228obj = $(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);
245 245
246/* If we support a window system, turn on the code to poll periodically 246/* If we support a window system, turn on the code to poll periodically
247 to detect C-g. It isn't actually used when doing interrupt input. */ 247 to detect C-g. It isn't actually used when doing interrupt input. */
248#ifdef HAVE_WINDOW_SYSTEM 248#if defined(HAVE_WINDOW_SYSTEM) && !defined(USE_ASYNC_EVENTS)
249#define POLL_FOR_INPUT 249#define POLL_FOR_INPUT
250#endif 250#endif
251 251
diff --git a/src/xdisp.c b/src/xdisp.c
index 67cbfaa76f6..8003eb3e9d5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -7976,7 +7976,14 @@ move_it_in_display_line_to (struct it *it,
7976 || IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) 7976 || IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
7977 { 7977 {
7978 if (!get_next_display_element (it) 7978 if (!get_next_display_element (it)
7979 || BUFFER_POS_REACHED_P ()) 7979 || BUFFER_POS_REACHED_P ()
7980 /* If we are past TO_CHARPOS, but never saw any
7981 character positions smaller than TO_CHARPOS,
7982 return MOVE_POS_MATCH_OR_ZV, like the
7983 unidirectional display did. */
7984 || ((op & MOVE_TO_POS) != 0
7985 && !saw_smaller_pos
7986 && IT_CHARPOS (*it) > to_charpos))
7980 { 7987 {
7981 result = MOVE_POS_MATCH_OR_ZV; 7988 result = MOVE_POS_MATCH_OR_ZV;
7982 break; 7989 break;
@@ -7987,6 +7994,13 @@ move_it_in_display_line_to (struct it *it,
7987 break; 7994 break;
7988 } 7995 }
7989 } 7996 }
7997 else if ((op & MOVE_TO_POS) != 0
7998 && !saw_smaller_pos
7999 && IT_CHARPOS (*it) > to_charpos)
8000 {
8001 result = MOVE_POS_MATCH_OR_ZV;
8002 break;
8003 }
7990 result = MOVE_LINE_TRUNCATED; 8004 result = MOVE_LINE_TRUNCATED;
7991 break; 8005 break;
7992 } 8006 }