aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/gtkutil.c2
-rw-r--r--src/syntax.c11
3 files changed, 18 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 39f7d3ab393..60a25316cb1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12010-09-23 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * syntax.c (back_comment): Detect the case where a 1-char comment
4 starter is also the 2nd char of a 2-char comment ender.
5
62010-09-23 Jan Djärv <jan.h.d@swipnet.se>
7
8 * gtkutil.c (xg_tool_bar_menu_proxy): Set gtk-menu-items to TRUE.
9
12010-09-23 Eli Zaretskii <eliz@gnu.org> 102010-09-23 Eli Zaretskii <eliz@gnu.org>
2 11
3 * editfns.c (transpose_markers, update_buffer_properties) 12 * editfns.c (transpose_markers, update_buffer_properties)
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 9356250eb71..f82be62965d 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3716,6 +3716,8 @@ xg_tool_bar_menu_proxy (GtkToolItem *toolitem, gpointer user_data)
3716 GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (wbutton)); 3716 GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (wbutton));
3717 GtkImageType store_type = gtk_image_get_storage_type (wimage); 3717 GtkImageType store_type = gtk_image_get_storage_type (wimage);
3718 3718
3719 g_object_set (G_OBJECT (settings), "gtk-menu-images", TRUE, NULL);
3720
3719 if (store_type == GTK_IMAGE_STOCK) 3721 if (store_type == GTK_IMAGE_STOCK)
3720 { 3722 {
3721 gchar *stock_id; 3723 gchar *stock_id;
diff --git a/src/syntax.c b/src/syntax.c
index f0a7dca42dc..5f836b0e8cf 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -559,6 +559,7 @@ back_comment (EMACS_INT from, EMACS_INT from_byte, EMACS_INT stop, int comnested
559 { 559 {
560 int temp_byte, prev_syntax; 560 int temp_byte, prev_syntax;
561 int com2start, com2end; 561 int com2start, com2end;
562 int comstart;
562 563
563 /* Move back and examine a character. */ 564 /* Move back and examine a character. */
564 DEC_BOTH (from, from_byte); 565 DEC_BOTH (from, from_byte);
@@ -578,7 +579,8 @@ back_comment (EMACS_INT from, EMACS_INT from_byte, EMACS_INT stop, int comnested
578 || SYNTAX_FLAGS_COMMENT_NESTED (syntax)) == comnested); 579 || SYNTAX_FLAGS_COMMENT_NESTED (syntax)) == comnested);
579 com2end = (SYNTAX_FLAGS_COMEND_FIRST (syntax) 580 com2end = (SYNTAX_FLAGS_COMEND_FIRST (syntax)
580 && SYNTAX_FLAGS_COMEND_SECOND (prev_syntax)); 581 && SYNTAX_FLAGS_COMEND_SECOND (prev_syntax));
581 582 comstart = (com2start || code == Scomment);
583
582 /* Nasty cases with overlapping 2-char comment markers: 584 /* Nasty cases with overlapping 2-char comment markers:
583 - snmp-mode: -- c -- foo -- c -- 585 - snmp-mode: -- c -- foo -- c --
584 --- c -- 586 --- c --
@@ -589,15 +591,16 @@ back_comment (EMACS_INT from, EMACS_INT from_byte, EMACS_INT stop, int comnested
589 /// */ 591 /// */
590 592
591 /* If a 2-char comment sequence partly overlaps with another, 593 /* If a 2-char comment sequence partly overlaps with another,
592 we don't try to be clever. */ 594 we don't try to be clever. E.g. |*| in C, or }% in modes that
593 if (from > stop && (com2end || com2start)) 595 have %..\n and %{..}%. */
596 if (from > stop && (com2end || comstart))
594 { 597 {
595 int next = from, next_byte = from_byte, next_c, next_syntax; 598 int next = from, next_byte = from_byte, next_c, next_syntax;
596 DEC_BOTH (next, next_byte); 599 DEC_BOTH (next, next_byte);
597 UPDATE_SYNTAX_TABLE_BACKWARD (next); 600 UPDATE_SYNTAX_TABLE_BACKWARD (next);
598 next_c = FETCH_CHAR_AS_MULTIBYTE (next_byte); 601 next_c = FETCH_CHAR_AS_MULTIBYTE (next_byte);
599 next_syntax = SYNTAX_WITH_FLAGS (next_c); 602 next_syntax = SYNTAX_WITH_FLAGS (next_c);
600 if (((com2start || comnested) 603 if (((comstart || comnested)
601 && SYNTAX_FLAGS_COMEND_SECOND (syntax) 604 && SYNTAX_FLAGS_COMEND_SECOND (syntax)
602 && SYNTAX_FLAGS_COMEND_FIRST (next_syntax)) 605 && SYNTAX_FLAGS_COMEND_FIRST (next_syntax))
603 || ((com2end || comnested) 606 || ((com2end || comnested)