aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2012-11-16 09:20:23 -0800
committerGlenn Morris2012-11-16 09:20:23 -0800
commit96e055075d7c73cf189038db1b15f9369888ea41 (patch)
tree000f5ac37801ff324fa5a79c1af23bd762d826dc /src
parent3d082a269ece18058ed82957f8a056822b39789e (diff)
parentcdc5d88cf68f232a71560937b557af8fa36d50c5 (diff)
downloademacs-96e055075d7c73cf189038db1b15f9369888ea41.tar.gz
emacs-96e055075d7c73cf189038db1b15f9369888ea41.zip
Merge from emacs-24; up to 2012-11-13T18:57:26Z!dgutov@yandex.ru
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog25
-rw-r--r--src/editfns.c4
-rw-r--r--src/eval.c2
-rw-r--r--src/nsterm.m2
-rw-r--r--src/w32proc.c38
-rw-r--r--src/xfaces.c8
6 files changed, 64 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c9c754f8677..695fbab5813 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,28 @@
12012-11-16 Glenn Morris <rgm@gnu.org>
2
3 * editfns.c (Fmessage): Mention message-log-max. (Bug#12849)
4
52012-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
6
7 * eval.c (Finteractive_p): Revert lexbind-merge mishap.
8
92012-11-16 Eli Zaretskii <eliz@gnu.org>
10
11 * w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread
12 use the same value of thread handle.
13 (start_timer_thread): If the timer thread exited (due to error),
14 clean up by closing the two handles it used. Duplicate the caller
15 thread's handle here, so it gets duplicated only once, when
16 launching the timer thread. Set priority of the timer thread, not
17 the caller thread.
18 (getitimer): Don't duplicate the caller thread's handle here.
19 (Bug#12832)
20
212012-11-16 Jan Djärv <jan.h.d@swipnet.se>
22
23 * nsterm.m (hold_event): Send SIGIO to make sure ns_read_socket is
24 called (Bug#12834).
25
12012-11-16 Paul Eggert <eggert@cs.ucla.edu> 262012-11-16 Paul Eggert <eggert@cs.ucla.edu>
2 27
3 Remove no-longer-used pty_max_bytes variable. 28 Remove no-longer-used pty_max_bytes variable.
diff --git a/src/editfns.c b/src/editfns.c
index c5d4ed295ab..8122ffdd0d4 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3434,8 +3434,8 @@ static ptrdiff_t message_length;
3434 3434
3435DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, 3435DEFUN ("message", Fmessage, Smessage, 1, MANY, 0,
3436 doc: /* Display a message at the bottom of the screen. 3436 doc: /* Display a message at the bottom of the screen.
3437The message also goes into the `*Messages*' buffer. 3437The message also goes into the `*Messages*' buffer, if `message-log-max'
3438\(In keyboard macros, that's all it does.) 3438is non-nil. (In keyboard macros, that's all it does.)
3439Return the message. 3439Return the message.
3440 3440
3441The first argument is a format control string, and the rest are data 3441The first argument is a format control string, and the rest are data
diff --git a/src/eval.c b/src/eval.c
index c9f27ea8d77..f8a76646352 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -508,7 +508,7 @@ spec that specifies non-nil unconditionally (such as \"p\"); or (ii)
508use `called-interactively-p'. */) 508use `called-interactively-p'. */)
509 (void) 509 (void)
510{ 510{
511 return interactive_p () ? Qt : Qnil; 511 return (INTERACTIVE && interactive_p ()) ? Qt : Qnil;
512} 512}
513 513
514 514
diff --git a/src/nsterm.m b/src/nsterm.m
index 804ab825dee..7c66708e7cb 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -330,6 +330,8 @@ hold_event (struct input_event *event)
330 } 330 }
331 331
332 hold_event_q.q[hold_event_q.nr++] = *event; 332 hold_event_q.q[hold_event_q.nr++] = *event;
333 /* Make sure ns_read_socket is called, i.e. we have input. */
334 kill (0, SIGIO);
333} 335}
334 336
335static Lisp_Object 337static Lisp_Object
diff --git a/src/w32proc.c b/src/w32proc.c
index f35a2da537c..10dd23003b8 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -431,13 +431,14 @@ timer_loop (LPVOID arg)
431 /* Simulate a signal delivered to the thread which installed 431 /* Simulate a signal delivered to the thread which installed
432 the timer, by suspending that thread while the handler 432 the timer, by suspending that thread while the handler
433 runs. */ 433 runs. */
434 DWORD result = SuspendThread (itimer->caller_thread); 434 HANDLE th = itimer->caller_thread;
435 DWORD result = SuspendThread (th);
435 436
436 if (result == (DWORD)-1) 437 if (result == (DWORD)-1)
437 return 2; 438 return 2;
438 439
439 handler (sig); 440 handler (sig);
440 ResumeThread (itimer->caller_thread); 441 ResumeThread (th);
441 } 442 }
442 443
443 /* Update expiration time and loop. */ 444 /* Update expiration time and loop. */
@@ -562,6 +563,7 @@ static int
562start_timer_thread (int which) 563start_timer_thread (int which)
563{ 564{
564 DWORD exit_code; 565 DWORD exit_code;
566 HANDLE th;
565 struct itimer_data *itimer = 567 struct itimer_data *itimer =
566 (which == ITIMER_REAL) ? &real_itimer : &prof_itimer; 568 (which == ITIMER_REAL) ? &real_itimer : &prof_itimer;
567 569
@@ -570,9 +572,29 @@ start_timer_thread (int which)
570 && exit_code == STILL_ACTIVE) 572 && exit_code == STILL_ACTIVE)
571 return 0; 573 return 0;
572 574
575 /* Clean up after possibly exited thread. */
576 if (itimer->timer_thread)
577 {
578 CloseHandle (itimer->timer_thread);
579 itimer->timer_thread = NULL;
580 }
581 if (itimer->caller_thread)
582 {
583 CloseHandle (itimer->caller_thread);
584 itimer->caller_thread = NULL;
585 }
586
573 /* Start a new thread. */ 587 /* Start a new thread. */
588 if (!DuplicateHandle (GetCurrentProcess (), GetCurrentThread (),
589 GetCurrentProcess (), &th, 0, FALSE,
590 DUPLICATE_SAME_ACCESS))
591 {
592 errno = ESRCH;
593 return -1;
594 }
574 itimer->terminate = 0; 595 itimer->terminate = 0;
575 itimer->type = which; 596 itimer->type = which;
597 itimer->caller_thread = th;
576 /* Request that no more than 64KB of stack be reserved for this 598 /* Request that no more than 64KB of stack be reserved for this
577 thread, to avoid reserving too much memory, which would get in 599 thread, to avoid reserving too much memory, which would get in
578 the way of threads we start to wait for subprocesses. See also 600 the way of threads we start to wait for subprocesses. See also
@@ -591,7 +613,7 @@ start_timer_thread (int which)
591 /* This is needed to make sure that the timer thread running for 613 /* This is needed to make sure that the timer thread running for
592 profiling gets CPU as soon as the Sleep call terminates. */ 614 profiling gets CPU as soon as the Sleep call terminates. */
593 if (which == ITIMER_PROF) 615 if (which == ITIMER_PROF)
594 SetThreadPriority (itimer->caller_thread, THREAD_PRIORITY_TIME_CRITICAL); 616 SetThreadPriority (itimer->timer_thread, THREAD_PRIORITY_TIME_CRITICAL);
595 617
596 return 0; 618 return 0;
597} 619}
@@ -626,17 +648,9 @@ getitimer (int which, struct itimerval *value)
626 648
627 itimer = (which == ITIMER_REAL) ? &real_itimer : &prof_itimer; 649 itimer = (which == ITIMER_REAL) ? &real_itimer : &prof_itimer;
628 650
629 if (!DuplicateHandle (GetCurrentProcess (), GetCurrentThread (),
630 GetCurrentProcess (), &itimer->caller_thread, 0,
631 FALSE, DUPLICATE_SAME_ACCESS))
632 {
633 errno = ESRCH;
634 return -1;
635 }
636
637 ticks_now = w32_get_timer_time ((which == ITIMER_REAL) 651 ticks_now = w32_get_timer_time ((which == ITIMER_REAL)
638 ? NULL 652 ? NULL
639 : itimer->caller_thread); 653 : GetCurrentThread ());
640 654
641 t_expire = &itimer->expire; 655 t_expire = &itimer->expire;
642 t_reload = &itimer->reload; 656 t_reload = &itimer->reload;
diff --git a/src/xfaces.c b/src/xfaces.c
index daf329791c1..1e27d5cc043 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -2870,6 +2870,12 @@ FRAME 0 means change the face on all frames, and change the default
2870 Lisp_Object key, val, list; 2870 Lisp_Object key, val, list;
2871 2871
2872 list = value; 2872 list = value;
2873 /* FIXME? This errs on the side of acceptance. Eg it accepts:
2874 (defface foo '((t :underline 'foo) "doc")
2875 Maybe this is intentional, maybe it isn't.
2876 Non-nil symbols other than t are not documented as being valid.
2877 Eg compare with inverse-video, which explicitly rejects them.
2878 */
2873 valid_p = 1; 2879 valid_p = 1;
2874 2880
2875 while (!NILP (CAR_SAFE(list))) 2881 while (!NILP (CAR_SAFE(list)))
@@ -5660,6 +5666,8 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE])
5660 face->underline_defaulted_p = 1; 5666 face->underline_defaulted_p = 1;
5661 face->underline_type = FACE_UNDER_LINE; 5667 face->underline_type = FACE_UNDER_LINE;
5662 5668
5669 /* FIXME? This is also not robust about checking the precise form.
5670 See comments in Finternal_set_lisp_face_attribute. */
5663 while (CONSP (underline)) 5671 while (CONSP (underline))
5664 { 5672 {
5665 Lisp_Object keyword, value; 5673 Lisp_Object keyword, value;