diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 23 | ||||
| -rw-r--r-- | src/dispnew.c | 1 | ||||
| -rw-r--r-- | src/editfns.c | 7 | ||||
| -rw-r--r-- | src/frame.c | 8 | ||||
| -rw-r--r-- | src/xml.c | 27 | ||||
| -rw-r--r-- | src/xwidget.c | 24 |
6 files changed, 75 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e098e536efb..65cd07df0ae 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | 2011-07-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * frame.c (Fmodify_frame_parameters): In tty case, update the | ||
| 4 | default face if necessary (Bug#4238). | ||
| 5 | |||
| 6 | 2011-07-21 Chong Yidong <cyd@stupidchicken.com> | ||
| 7 | |||
| 8 | * editfns.c (Fstring_to_char): No need to explain what a character | ||
| 9 | is in the docstring (Bug#6576). | ||
| 10 | |||
| 11 | 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 12 | |||
| 13 | * xml.c (parse_region): Make sure we always return a tree. | ||
| 14 | |||
| 15 | 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com> | ||
| 16 | |||
| 17 | * xml.c (parse_region): If a document contains only comments, | ||
| 18 | return that, too. | ||
| 19 | |||
| 20 | 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 21 | |||
| 22 | * xml.c (make_dom): Return comments, too. | ||
| 23 | |||
| 1 | 2011-07-19 Paul Eggert <eggert@cs.ucla.edu> | 24 | 2011-07-19 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 25 | ||
| 3 | Port to OpenBSD. | 26 | Port to OpenBSD. |
diff --git a/src/dispnew.c b/src/dispnew.c index e1311634e2c..804ca14d936 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -15,7 +15,6 @@ GNU General Public License for more details. | |||
| 15 | 15 | ||
| 16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
| 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | |||
| 19 | #include <config.h> | 18 | #include <config.h> |
| 20 | #include <signal.h> | 19 | #include <signal.h> |
| 21 | #include <stdio.h> | 20 | #include <stdio.h> |
diff --git a/src/editfns.c b/src/editfns.c index b20c38faacd..56ad99d199f 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -194,12 +194,7 @@ DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0, | |||
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | DEFUN ("string-to-char", Fstring_to_char, Sstring_to_char, 1, 1, 0, | 196 | DEFUN ("string-to-char", Fstring_to_char, Sstring_to_char, 1, 1, 0, |
| 197 | doc: /* Return the first character in STRING. | 197 | doc: /* Return the first character in STRING. */) |
| 198 | A multibyte character is handled correctly. | ||
| 199 | The value returned is a Unicode codepoint if it is below #x110000 (in | ||
| 200 | hex). Codepoints beyond that are Emacs extensions of Unicode. In | ||
| 201 | particular, eight-bit characters are returned as codepoints in the | ||
| 202 | range #x3FFF80 through #x3FFFFF, inclusive. */) | ||
| 203 | (register Lisp_Object string) | 198 | (register Lisp_Object string) |
| 204 | { | 199 | { |
| 205 | register Lisp_Object val; | 200 | register Lisp_Object val; |
diff --git a/src/frame.c b/src/frame.c index 635996ca424..19ce78dfd9c 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -2437,11 +2437,9 @@ use is not recommended. Explicitly check for a frame-parameter instead. */) | |||
| 2437 | val = values[i]; | 2437 | val = values[i]; |
| 2438 | store_frame_param (f, prop, val); | 2438 | store_frame_param (f, prop, val); |
| 2439 | 2439 | ||
| 2440 | /* Changing the background color might change the background | 2440 | if (EQ (prop, Qforeground_color) |
| 2441 | mode, so that we have to load new defface specs. | 2441 | || EQ (prop, Qbackground_color)) |
| 2442 | Call frame-set-background-mode to do that. */ | 2442 | update_face_from_frame_parameter (f, prop, val); |
| 2443 | if (EQ (prop, Qbackground_color)) | ||
| 2444 | call1 (Qframe_set_background_mode, frame); | ||
| 2445 | } | 2443 | } |
| 2446 | } | 2444 | } |
| 2447 | return Qnil; | 2445 | return Qnil; |
| @@ -71,6 +71,14 @@ make_dom (xmlNode *node) | |||
| 71 | else | 71 | else |
| 72 | return Qnil; | 72 | return Qnil; |
| 73 | } | 73 | } |
| 74 | else if (node->type == XML_COMMENT_NODE) | ||
| 75 | { | ||
| 76 | if (node->content) | ||
| 77 | return list3 (intern ("comment"), Qnil, | ||
| 78 | build_string ((char *) node->content)); | ||
| 79 | else | ||
| 80 | return Qnil; | ||
| 81 | } | ||
| 74 | else | 82 | else |
| 75 | return Qnil; | 83 | return Qnil; |
| 76 | } | 84 | } |
| @@ -117,9 +125,22 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html | |||
| 117 | 125 | ||
| 118 | if (doc != NULL) | 126 | if (doc != NULL) |
| 119 | { | 127 | { |
| 120 | node = xmlDocGetRootElement (doc); | 128 | xmlNode *n = doc->children->next; |
| 121 | if (node != NULL) | 129 | Lisp_Object r = Qnil; |
| 122 | result = make_dom (node); | 130 | |
| 131 | while (n) { | ||
| 132 | if (r != Qnil) | ||
| 133 | result = Fcons (r, result); | ||
| 134 | r = make_dom (n); | ||
| 135 | n = n->next; | ||
| 136 | } | ||
| 137 | |||
| 138 | if (result == Qnil) | ||
| 139 | result = r; | ||
| 140 | else | ||
| 141 | result = Fcons (intern ("top"), | ||
| 142 | Fcons (Qnil, Fnreverse (Fcons (r, result)))); | ||
| 143 | |||
| 123 | xmlFreeDoc (doc); | 144 | xmlFreeDoc (doc); |
| 124 | xmlCleanupParser (); | 145 | xmlCleanupParser (); |
| 125 | } | 146 | } |
diff --git a/src/xwidget.c b/src/xwidget.c index bd007aad005..b362ca55a1f 100644 --- a/src/xwidget.c +++ b/src/xwidget.c | |||
| @@ -786,6 +786,28 @@ DEFUN("xwidget-view-info", Fxwidget_view_info , Sxwidget_view_info, 2,2,0, doc: | |||
| 786 | return info; | 786 | return info; |
| 787 | } | 787 | } |
| 788 | 788 | ||
| 789 | DEFUN ("xwidget-send-keyboard-event", Fxwidget_send_keyboard_event, Sxwidget_send_keyboard_event, 2, 2, 0, doc:/* synthesize a kbd event for a xwidget. */ | ||
| 790 | ) | ||
| 791 | (Lisp_Object xwidget, Lisp_Object keydescriptor) | ||
| 792 | { | ||
| 793 | int keyval = 0x058; //X | ||
| 794 | char *keystring = ""; | ||
| 795 | |||
| 796 | struct xwidget *xw = XXWIDGET(xwidget); | ||
| 797 | |||
| 798 | GdkEventKey* ev = (GdkEventKey*)gdk_event_new(GDK_KEY_PRESS); | ||
| 799 | ev->window = gtk_widget_get_window(xw->widget_osr); | ||
| 800 | ev->keyval = keyval; | ||
| 801 | gdk_event_put((GdkEvent*)ev); | ||
| 802 | ev->type = GDK_KEY_RELEASE; | ||
| 803 | gdk_event_put((GdkEvent*)ev); | ||
| 804 | gtk_main_do_event(ev); | ||
| 805 | gdk_event_free((GdkEvent*)ev); | ||
| 806 | |||
| 807 | return Qnil; | ||
| 808 | } | ||
| 809 | |||
| 810 | |||
| 789 | 811 | ||
| 790 | DEFUN("xwidget-delete-zombies", Fxwidget_delete_zombies , Sxwidget_delete_zombies, 0,0,0, doc: /* */) | 812 | DEFUN("xwidget-delete-zombies", Fxwidget_delete_zombies , Sxwidget_delete_zombies, 0,0,0, doc: /* */) |
| 791 | (void) | 813 | (void) |
| @@ -842,6 +864,8 @@ syms_of_xwidget (void) | |||
| 842 | defsubr (&Sxwidget_size_request ); | 864 | defsubr (&Sxwidget_size_request ); |
| 843 | defsubr (&Sxwidget_delete_zombies); | 865 | defsubr (&Sxwidget_delete_zombies); |
| 844 | defsubr (&Sxwidget_disable_plugin_for_mime); | 866 | defsubr (&Sxwidget_disable_plugin_for_mime); |
| 867 | |||
| 868 | defsubr (&Sxwidget_send_keyboard_event); | ||
| 845 | DEFSYM (Qxwidget ,"xwidget"); | 869 | DEFSYM (Qxwidget ,"xwidget"); |
| 846 | 870 | ||
| 847 | DEFSYM (Qcxwidget ,":xwidget"); | 871 | DEFSYM (Qcxwidget ,":xwidget"); |