comparison src/energize.c @ 185:3d6bfa290dbd r20-3b19

Import from CVS: tag r20-3b19
author cvs
date Mon, 13 Aug 2007 09:55:28 +0200
parents 8eaf7971accc
children
comparison
equal deleted inserted replaced
184:bcd2674570bf 185:3d6bfa290dbd
164 extern int current_debuggerpanel_exposed_p; 164 extern int current_debuggerpanel_exposed_p;
165 extern int desired_debuggerpanel_exposed_p; 165 extern int desired_debuggerpanel_exposed_p;
166 extern int debuggerpanel_sheet; 166 extern int debuggerpanel_sheet;
167 167
168 /**************************** Macros *****************************/ 168 /**************************** Macros *****************************/
169
170 #define xnew(type) ((type*)xmalloc (sizeof (type)))
171 169
172 #define BUFFER_NOTIFY_BACKGROUND_BIT_SET_P(buffer) 1 170 #define BUFFER_NOTIFY_BACKGROUND_BIT_SET_P(buffer) 1
173 171
174 #define get_extent_data(id,binfo) (Energize_Extent_Data*)get_object(id, binfo) 172 #define get_extent_data(id,binfo) (Energize_Extent_Data*)get_object(id, binfo)
175 #define get_class(id,binfo) (GDataClass*)get_object(id, binfo) 173 #define get_class(id,binfo) (GDataClass*)get_object(id, binfo)
341 } 339 }
342 340
343 static GDataClass * 341 static GDataClass *
344 alloc_GDataclass (EId id, BufferInfo *binfo) 342 alloc_GDataclass (EId id, BufferInfo *binfo)
345 { 343 {
346 GDataClass *cl = xnew (GDataClass); 344 GDataClass *cl = xnew_and_zero (GDataClass);
347 memset (cl, 0, sizeof (GDataClass));
348 cl->seal = GDATA_CLASS_SEAL; 345 cl->seal = GDATA_CLASS_SEAL;
349 cl->id = id; 346 cl->id = id;
350 put_class (cl->id, binfo, cl); 347 put_class (cl->id, binfo, cl);
351 return cl; 348 return cl;
352 } 349 }
441 { 438 {
442 char win_as_string [16]; 439 char win_as_string [16];
443 nw = XtWindowToWidget (get_x_display (Qnil), win); 440 nw = XtWindowToWidget (get_x_display (Qnil), win);
444 if (nw) 441 if (nw)
445 nw = XtParent (nw); 442 nw = XtParent (nw);
446 443
447 if (nw) 444 if (nw)
448 sprintf (win_as_string, "w%x", nw); 445 sprintf (win_as_string, "w%x", nw);
449 else 446 else
450 sprintf (win_as_string, "0x%x", win); 447 sprintf (win_as_string, "0x%x", win);
451 binfo->frame = 448 binfo->frame =
489 binfo->n_notes = 0; 486 binfo->n_notes = 0;
490 #ifdef I18N4 487 #ifdef I18N4
491 binfo->wcmap.valid = 0; 488 binfo->wcmap.valid = 0;
492 binfo->wcmap.modiff_stamp = -1; 489 binfo->wcmap.modiff_stamp = -1;
493 binfo->wcmap.map = NULL; 490 binfo->wcmap.map = NULL;
494 #endif 491 #endif
495 put_buffer_info (id, binfo->emacs_buffer, binfo, editor); 492 put_buffer_info (id, binfo->emacs_buffer, binfo, editor);
496 493
497 Venergize_buffers_list = Fcons (buffer, Venergize_buffers_list); 494 Venergize_buffers_list = Fcons (buffer, Venergize_buffers_list);
498 495
499 #if 0 496 #if 0
529 #ifdef I18N4 526 #ifdef I18N4
530 if (binfo->wcmap.valid) { 527 if (binfo->wcmap.valid) {
531 binfo->wcmap.valid= 0; 528 binfo->wcmap.valid= 0;
532 xfree(binfo->wcmap.map); 529 xfree(binfo->wcmap.map);
533 } 530 }
534 #endif 531 #endif
535 SET_OBJECT_FREE (binfo); 532 SET_OBJECT_FREE (binfo);
536 } 533 }
537 534
538 /* hash for BufferInfo structures */ 535 /* hash for BufferInfo structures */
539 static BufferInfo* 536 static BufferInfo*
558 555
559 /* Called by mark_buffer. It is possible for the last remaining pointer to 556 /* Called by mark_buffer. It is possible for the last remaining pointer to
560 an extent object to be in an Energize_Extent_Data structure that is pointed 557 an extent object to be in an Energize_Extent_Data structure that is pointed
561 at by the binfo->id_to_object table. Since Energize may still reference 558 at by the binfo->id_to_object table. Since Energize may still reference
562 this object by its id (in fact, I think it may even "ressurect" a detached 559 this object by its id (in fact, I think it may even "ressurect" a detached
563 extent) we must prevent the extent from being garbage collected. Aside 560 extent) we must prevent the extent from being garbage collected. Aside
564 from the obvious lossage (that the extent itself would be trashed) this 561 from the obvious lossage (that the extent itself would be trashed) this
565 would also cause us to free the Energize_Extent_Data which the server still 562 would also cause us to free the Energize_Extent_Data which the server still
566 believes we have. The buffers all get marked because they're on the 563 believes we have. The buffers all get marked because they're on the
567 `Venergize_buffers_list'. 564 `Venergize_buffers_list'.
568 565
573 hash tables, we again build in the assumption that GC never relocates. 570 hash tables, we again build in the assumption that GC never relocates.
574 */ 571 */
575 572
576 /* FUCK!! It's not standard-conforming to cast pointers to functions 573 /* FUCK!! It's not standard-conforming to cast pointers to functions
577 to or from void*. Give me a fucking break! */ 574 to or from void*. Give me a fucking break! */
578 struct markobj_kludge_fmh 575 struct markobj_kludge_fmh
579 { 576 {
580 void (*markobj) (Lisp_Object); 577 void (*markobj) (Lisp_Object);
581 }; 578 };
582 579
583 static void 580 static void
777 } 774 }
778 #define WCMAP_ENLARGE(wcmap) WCMAP_SETSIZE(wcmap, 2*(wcmap.mapsize)) 775 #define WCMAP_ENLARGE(wcmap) WCMAP_SETSIZE(wcmap, 2*(wcmap.mapsize))
779 776
780 #ifndef MB_LEN_MAX 777 #ifndef MB_LEN_MAX
781 #define MB_LEN_MAX 10 /* arbitrarily large enough */ 778 #define MB_LEN_MAX 10 /* arbitrarily large enough */
782 #endif 779 #endif
783 780
784 static char wcsize_buf[MB_LEN_MAX]; 781 static char wcsize_buf[MB_LEN_MAX];
785 #define WCSIZE(wc) (isascii(wc) ? 1 : wctomb(wcsize_buf,wc)) 782 #define WCSIZE(wc) (isascii(wc) ? 1 : wctomb(wcsize_buf,wc))
786 783
787 #define SANITY_CHECK_NOT 784 #define SANITY_CHECK_NOT
788 #ifdef SANITY_CHECK 785 #ifdef SANITY_CHECK
789 static int sanity=0; 786 static int sanity=0;
790 #endif 787 #endif
791 788
792 static void 789 static void
793 sync_buffer_widechar_map (BufferInfo *binfo) 790 sync_buffer_widechar_map (BufferInfo *binfo)
794 { 791 {
795 /* #### - check this: */ 792 /* #### - check this: */
816 wchar_t *buf, t; 813 wchar_t *buf, t;
817 814
818 #ifdef SANITY_CHECK 815 #ifdef SANITY_CHECK
819 stderr_out ("rebuilding widechar map for %s\n", XSTRING_DATA (current_buffer->name)); 816 stderr_out ("rebuilding widechar map for %s\n", XSTRING_DATA (current_buffer->name));
820 #endif 817 #endif
821 818
822 /* #### this is not gonna compile. move_gap() is now a private function 819 /* #### this is not gonna compile. move_gap() is now a private function
823 inside of insdel.c and it should stay that way. */ 820 inside of insdel.c and it should stay that way. */
824 if (BUF_BEGV (current_buffer) < GPT && BUF_ZV (current_buffer) > GPT) 821 if (BUF_BEGV (current_buffer) < GPT && BUF_ZV (current_buffer) > GPT)
825 move_gap (current_buffer, BUF_BEGV (current_buffer)); 822 move_gap (current_buffer, BUF_BEGV (current_buffer));
826 binfo->wcmap.modiff_stamp = BUF_MODIFF (current_buffer); 823 binfo->wcmap.modiff_stamp = BUF_MODIFF (current_buffer);
827 824
828 buf = BUF_BEG_ADDR (current_buffer); 825 buf = BUF_BEG_ADDR (current_buffer);
829 maxpos= (BUF_Z (current_buffer) - 1); 826 maxpos= (BUF_Z (current_buffer) - 1);
830 wctomb (NULL, 0); /* reset shift state of wctomb() */ 827 wctomb (NULL, 0); /* reset shift state of wctomb() */
831 binfo->wcmap.map[mapindex].pos= pos; 828 binfo->wcmap.map[mapindex].pos= pos;
832 binfo->wcmap.map[mapindex].eucsize= 829 binfo->wcmap.map[mapindex].eucsize=
878 if (check_pos != char_pos) { 875 if (check_pos != char_pos) {
879 stderr_out ("ezpos(%d) = %d, Bufpos(%d) = %d\n", 876 stderr_out ("ezpos(%d) = %d, Bufpos(%d) = %d\n",
880 char_pos, byte_pos, byte_pos, check_pos); 877 char_pos, byte_pos, byte_pos, check_pos);
881 } 878 }
882 } 879 }
883 #endif 880 #endif
884 return byte_pos; 881 return byte_pos;
885 } 882 }
886 883
887 static Bufpos 884 static Bufpos
888 BufposForEnergizePos (EnergizePos ez_pos, BufferInfo *binfo) 885 BufposForEnergizePos (EnergizePos ez_pos, BufferInfo *binfo)
913 if (!sanity) { 910 if (!sanity) {
914 EnergizePos check_pos; 911 EnergizePos check_pos;
915 sanity=1; 912 sanity=1;
916 check_pos= EnergizePosForBufpos(char_pos); 913 check_pos= EnergizePosForBufpos(char_pos);
917 sanity=0; 914 sanity=0;
918 915
919 if (check_pos != ez_pos) { 916 if (check_pos != ez_pos) {
920 stderr_out ("Bufpos(%d) = %d, EnergizePosForBufpos(%d) = %d\n", 917 stderr_out ("Bufpos(%d) = %d, EnergizePosForBufpos(%d) = %d\n",
921 ez_pos, char_pos, char_pos, check_pos); 918 ez_pos, char_pos, char_pos, check_pos);
922 } 919 }
923 } 920 }
924 #endif 921 #endif
925 return char_pos; 922 return char_pos;
926 } 923 }
927 924
928 #else /* !I18N4 */ 925 #else /* !I18N4 */
929 926
930 static Bufpos 927 static Bufpos
931 BufposForEnergizePos (EnergizePos energizePos, BufferInfo *binfo) 928 BufposForEnergizePos (EnergizePos energizePos, BufferInfo *binfo)
932 { 929 {
933 return ((energizePos >= (1 << VALBITS)) ? BUF_Z (current_buffer) : 930 return ((energizePos >= (1 << VALBITS)) ? BUF_Z (current_buffer) :
934 (energizePos + 1)); 931 (energizePos + 1));
935 } 932 }
936 933
937 static EnergizePos 934 static EnergizePos
938 EnergizePosForBufpos (Bufpos emacs_pos, BufferInfo *binfo) 935 EnergizePosForBufpos (Bufpos emacs_pos, BufferInfo *binfo)
979 { 976 {
980 if (energize_connection 977 if (energize_connection
981 && !NILP (energize_connection->proc) 978 && !NILP (energize_connection->proc)
982 && energize_connection->conn 979 && energize_connection->conn
983 && CRequestDelayedP (energize_connection->conn)) 980 && CRequestDelayedP (energize_connection->conn))
984 this function no longer exists. 981 this function no longer exists.
985 (Replaced by mark_what_as_being_ready, with different arguments.) 982 (Replaced by mark_what_as_being_ready, with different arguments.)
986 Rewrite this. 983 Rewrite this.
987 mark_process_as_being_ready (XPROCESS (energize_connection->proc)); 984 mark_process_as_being_ready (XPROCESS (energize_connection->proc));
988 } 985 }
989 986
1401 1398
1402 { 1399 {
1403 char *first_section_chars = (char *) BUF_BYTE_ADDRESS (buf, bufpos); 1400 char *first_section_chars = (char *) BUF_BYTE_ADDRESS (buf, bufpos);
1404 int comp = strncmp (string, first_section_chars, 1401 int comp = strncmp (string, first_section_chars,
1405 first_section_end - bufpos); 1402 first_section_end - bufpos);
1406 1403
1407 if (comp) return comp; 1404 if (comp) return comp;
1408 } 1405 }
1409 1406
1410 if (first_section_end < BUF_ZV (buf)) 1407 if (first_section_end < BUF_ZV (buf))
1411 /* there is a second section */ 1408 /* there is a second section */
1569 int no_text_deleted = 0; 1566 int no_text_deleted = 0;
1570 1567
1571 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; 1568 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
1572 1569
1573 /* For some reason calling the GC before parsing the buffer data 1570 /* For some reason calling the GC before parsing the buffer data
1574 makes a better usage of memory and emacs leaks less when 1571 makes a better usage of memory and emacs leaks less when
1575 creating/deleting LE browser buffers. 1572 creating/deleting LE browser buffers.
1576 However you don't want to call GC all the tiem so we only do it if the request 1573 However you don't want to call GC all the tiem so we only do it if the request
1577 will create more than a given number of extents. */ 1574 will create more than a given number of extents. */
1578 if (cbu->nExtent > energize_extent_gc_threshold) 1575 if (cbu->nExtent > energize_extent_gc_threshold)
1579 garbage_collect_1 (); 1576 garbage_collect_1 ();
1580 1577
1716 if (cbu->flags != 0xff) 1713 if (cbu->flags != 0xff)
1717 get_chars_from_file = cbu->flags & CBFileYourself; 1714 get_chars_from_file = cbu->flags & CBFileYourself;
1718 else 1715 else
1719 get_chars_from_file = binfo->flags & CBFileYourself; 1716 get_chars_from_file = binfo->flags & CBFileYourself;
1720 #endif 1717 #endif
1721 1718
1722 /* Even when we get the chars from a file there is an empty text string */ 1719 /* Even when we get the chars from a file there is an empty text string */
1723 if (get_chars_from_file) 1720 if (get_chars_from_file)
1724 { 1721 {
1725 text = CGetVstring (conn, &text_len); 1722 text = CGetVstring (conn, &text_len);
1726 text = NULL; 1723 text = NULL;
1728 } 1725 }
1729 else 1726 else
1730 { 1727 {
1731 text = CGetVstring (conn, &text_len); 1728 text = CGetVstring (conn, &text_len);
1732 } 1729 }
1733 1730
1734 /* updates the visited file modtime */ 1731 /* updates the visited file modtime */
1735 if (modifying_p && (from != to || text_len) 1732 if (modifying_p && (from != to || text_len)
1736 /* but only when we do not read the file ourselves */ 1733 /* but only when we do not read the file ourselves */
1737 && !get_chars_from_file) 1734 && !get_chars_from_file)
1738 Fset_buffer_modtime (binfo->emacs_buffer, Qnil); 1735 Fset_buffer_modtime (binfo->emacs_buffer, Qnil);
1876 (binfo->output_mark)), 1873 (binfo->output_mark)),
1877 binfo); 1874 binfo);
1878 else 1875 else
1879 extent_offset = EnergizePosForBufpos (BUF_Z(XBUFFER(binfo->emacs_buffer)), 1876 extent_offset = EnergizePosForBufpos (BUF_Z(XBUFFER(binfo->emacs_buffer)),
1880 binfo); 1877 binfo);
1881 1878
1882 #if 1 1879 #if 1
1883 if (text_len || !text) 1880 if (text_len || !text)
1884 hack_window_point (display_window, 1881 hack_window_point (display_window,
1885 make_int (previous_point), 1882 make_int (previous_point),
1886 make_int (display_start), 1883 make_int (display_start),
2147 #endif 2144 #endif
2148 { 2145 {
2149 map_extents (BUF_BEG (current_buffer), BUF_Z (current_buffer), 2146 map_extents (BUF_BEG (current_buffer), BUF_Z (current_buffer),
2150 write_energize_extent_data_mapper, &bane, 2147 write_energize_extent_data_mapper, &bane,
2151 binfo->emacs_buffer, 0, ME_END_CLOSED); 2148 binfo->emacs_buffer, 0, ME_END_CLOSED);
2152 2149
2153 } 2150 }
2154 2151
2155 /* update nextent in request's header */ 2152 /* update nextent in request's header */
2156 req = (CEditorRequest *)conn->header; 2153 req = (CEditorRequest *)conn->header;
2157 req->buffersaved.buffer.nExtent = bane.n_extents; 2154 req->buffersaved.buffer.nExtent = bane.n_extents;
2348 XSTRING_LENGTH (value)); 2345 XSTRING_LENGTH (value));
2349 } 2346 }
2350 } 2347 }
2351 else if (!NILP (selection)) 2348 else if (!NILP (selection))
2352 error ("unrecognized energize selection"); 2349 error ("unrecognized energize selection");
2353 2350
2354 if (!NILP (no_confirm)) 2351 if (!NILP (no_confirm))
2355 conn->header->data |= CECnoConfirm; 2352 conn->header->data |= CECnoConfirm;
2356 CWriteLength (conn); 2353 CWriteLength (conn);
2357 CWriteRequestBuffer (conn); 2354 CWriteRequestBuffer (conn);
2358 2355
2476 2473
2477 DEFUN ("energize-list-menu", Fenergize_list_menu, 3, 4, 0, /* 2474 DEFUN ("energize-list-menu", Fenergize_list_menu, 3, 4, 0, /*
2478 Request the set of menu options from the Energize server that are 2475 Request the set of menu options from the Energize server that are
2479 appropriate to the buffer and the extent. Extent can be (), in which case 2476 appropriate to the buffer and the extent. Extent can be (), in which case
2480 the options are requested for the whole buffer. Selection-p tells 2477 the options are requested for the whole buffer. Selection-p tells
2481 if the selection is available on the dislpay emacs is using. 2478 if the selection is available on the dislpay emacs is using.
2482 Returns the options as 2479 Returns the options as
2483 a list that can be passed to energize-activate-menu. Items 2480 a list that can be passed to energize-activate-menu. Items
2484 in the list can also be passed to energize-execute-menu-item. 2481 in the list can also be passed to energize-execute-menu-item.
2485 The list is (buffer extent or () <item1> ... <itemN>). 2482 The list is (buffer extent or () <item1> ... <itemN>).
2486 where <itemI> is (name id1 id2 flags); idI is (high . low). 2483 where <itemI> is (name id1 id2 flags); idI is (high . low).
2506 DEFUN ("energize-execute-menu-item", Fenergize_execute_menu_item, 3, 5, 0, /* 2503 DEFUN ("energize-execute-menu-item", Fenergize_execute_menu_item, 3, 5, 0, /*
2507 Item is a vector received by energize-list-menu. Sends a request to 2504 Item is a vector received by energize-list-menu. Sends a request to
2508 execute the code associated to this menu inside the Energize server. 2505 execute the code associated to this menu inside the Energize server.
2509 Optional fourth argument is a string or a vector to be used as the selection 2506 Optional fourth argument is a string or a vector to be used as the selection
2510 for entry disabled because they need the selection. 2507 for entry disabled because they need the selection.
2511 Optional fifth argument, if non NIL, tells Energize to not request 2508 Optional fifth argument, if non NIL, tells Energize to not request
2512 confirmation before executing the command. 2509 confirmation before executing the command.
2513 */ 2510 */
2514 (buffer, extent_obj, item, selection, no_confirm)) 2511 (buffer, extent_obj, item, selection, no_confirm))
2515 { 2512 {
2516 struct Lisp_Vector *v; 2513 struct Lisp_Vector *v;
2538 DEFUN ("energize-execute-command-internal", 2535 DEFUN ("energize-execute-command-internal",
2539 Fenergize_execute_command_internal, 3, 5, 0, /* 2536 Fenergize_execute_command_internal, 3, 5, 0, /*
2540 Command is a string naming an energize command. Sends a request to 2537 Command is a string naming an energize command. Sends a request to
2541 execute this command inside the Energize server. 2538 execute this command inside the Energize server.
2542 Optional fourth argument is a string or a vector to be used as the selection. 2539 Optional fourth argument is a string or a vector to be used as the selection.
2543 Optional fifth argument, if non NIL, tells Energize to not request 2540 Optional fifth argument, if non NIL, tells Energize to not request
2544 confirmation before executing the command. 2541 confirmation before executing the command.
2545 2542
2546 See also 'energize-list-menu'. 2543 See also 'energize-list-menu'.
2547 */ 2544 */
2548 (buffer, extent_obj, command, selection, no_confirm)) 2545 (buffer, extent_obj, command, selection, no_confirm))
4662 else 4659 else
4663 { 4660 {
4664 /* Do not show the debugger panel in this function. The 4661 /* Do not show the debugger panel in this function. The
4665 * debugger panel should never be listed in the visible psheets. */ 4662 * debugger panel should never be listed in the visible psheets. */
4666 extern int debuggerpanel_sheet; 4663 extern int debuggerpanel_sheet;
4667 4664
4668 if (count == 1 && psheets [0] == debuggerpanel_sheet) 4665 if (count == 1 && psheets [0] == debuggerpanel_sheet)
4669 return; 4666 return;
4670 4667
4671 FRAME_X_DESIRED_PSHEETS (f) = psheets; 4668 FRAME_X_DESIRED_PSHEETS (f) = psheets;
4672 FRAME_X_DESIRED_PSHEET_COUNT (f) = count; 4669 FRAME_X_DESIRED_PSHEET_COUNT (f) = count;
4760 } 4757 }
4761 } 4758 }
4762 4759
4763 /* returns 1 if the buffer is only visible in window on frame f */ 4760 /* returns 1 if the buffer is only visible in window on frame f */
4764 static int 4761 static int
4765 buffer_only_visible_in_this_window_p (Lisp_Object buffer, 4762 buffer_only_visible_in_this_window_p (Lisp_Object buffer,
4766 struct frame* f, 4763 struct frame* f,
4767 struct window* window) 4764 struct window* window)
4768 { 4765 {
4769 return !find_buffer_in_different_window (XWINDOW (f->root_window), buffer, 4766 return !find_buffer_in_different_window (XWINDOW (f->root_window), buffer,
4770 window); 4767 window);
4771 } 4768 }
5158 if (! lw_get_some_values (id, data)) abort (); 5155 if (! lw_get_some_values (id, data)) abort ();
5159 case_sensitive_p = (data->selected ? Qt : Qnil); 5156 case_sensitive_p = (data->selected ? Qt : Qnil);
5160 data->name = "matchWord"; 5157 data->name = "matchWord";
5161 if (! lw_get_some_values (id, data)) abort (); 5158 if (! lw_get_some_values (id, data)) abort ();
5162 match_word_p = (data->selected ? Qt : Qnil); 5159 match_word_p = (data->selected ? Qt : Qnil);
5163 5160
5164 data->name = "directionForward"; 5161 data->name = "directionForward";
5165 if (! lw_get_some_values (id, data)) abort (); 5162 if (! lw_get_some_values (id, data)) abort ();
5166 direction = data->selected ? Qt : Qnil; 5163 direction = data->selected ? Qt : Qnil;
5167 5164
5168 if (!strcmp (name, "search")) 5165 if (!strcmp (name, "search"))
5169 replace = Qnil; 5166 replace = Qnil;
5170 else if (!strcmp (name, "replace")) 5167 else if (!strcmp (name, "replace"))
5171 ; 5168 ;
5172 else if (!strcmp (name, "replace_all")) 5169 else if (!strcmp (name, "replace_all"))
5174 replace = list1 (replace); 5171 replace = list1 (replace);
5175 /* hide_search_dialog (parent, id); */ 5172 /* hide_search_dialog (parent, id); */
5176 } 5173 }
5177 else 5174 else
5178 abort (); 5175 abort ();
5179 5176
5180 free_widget_value (data); 5177 free_widget_value (data);
5181 5178
5182 signal_special_Xt_user_event (device, 5179 signal_special_Xt_user_event (device,
5183 intern ("energize-search-internal"), 5180 intern ("energize-search-internal"),
5184 (NILP (replace) 5181 (NILP (replace)
5185 ? list5 (case_sensitive_p, match_word_p, 5182 ? list5 (case_sensitive_p, match_word_p,
5186 regexp_p, direction, search) 5183 regexp_p, direction, search)
5333 The Lisp object representing the Energize connection, or nil 5330 The Lisp object representing the Energize connection, or nil
5334 */ ); 5331 */ );
5335 Venergize_process = Qnil; 5332 Venergize_process = Qnil;
5336 5333
5337 DEFVAR_LISP ("energize-create-buffer-hook", &Venergize_create_buffer_hook /* 5334 DEFVAR_LISP ("energize-create-buffer-hook", &Venergize_create_buffer_hook /*
5338 Hook called when buffer is created by energize; takes 5335 Hook called when buffer is created by energize; takes
5339 BUFFER as its only argument. 5336 BUFFER as its only argument.
5340 */ ); 5337 */ );
5341 Venergize_create_buffer_hook = Qnil; 5338 Venergize_create_buffer_hook = Qnil;
5342 5339
5343 5340
5375 5372
5376 DEFVAR_INT ("energize-extent-gc-threshold", &energize_extent_gc_threshold /* 5373 DEFVAR_INT ("energize-extent-gc-threshold", &energize_extent_gc_threshold /*
5377 Number of extents in a ModifyBuffer request above which to do a GC 5374 Number of extents in a ModifyBuffer request above which to do a GC
5378 */ ); 5375 */ );
5379 energize_extent_gc_threshold = 20; 5376 energize_extent_gc_threshold = 20;
5380 5377
5381 pure_put (Qbuffer_locked_by_energize, Qerror_conditions, 5378 pure_put (Qbuffer_locked_by_energize, Qerror_conditions,
5382 list2 (Qbuffer_locked_by_energize, Qerror)); 5379 list2 (Qbuffer_locked_by_energize, Qerror));
5383 pure_put (Qbuffer_locked_by_energize, Qerror_message, 5380 pure_put (Qbuffer_locked_by_energize, Qerror_message,
5384 build_string ("Buffer is currently locked by kernel")); 5381 build_string ("Buffer is currently locked by kernel"));
5385 } 5382 }