| 6 |
#define SCM_CGEN_CONST const |
#define SCM_CGEN_CONST const |
| 7 |
#endif |
#endif |
| 8 |
#include "shiki.h" |
#include "shiki.h" |
| 9 |
|
static SCM_DEFINE_STRING_CONST(xyzzylisp__2aindent_width_2a__VAR__NAME, "*indent-width*", 14, 14); |
| 10 |
|
static ScmObj xyzzylisp__2aindent_width_2a__VAR = SCM_UNBOUND; |
| 11 |
|
static SCM_DEFINE_STRING_CONST(xyzzylisp__2amode_line_format_2a__VAR__NAME, "*mode-line-format*", 18, 18); |
| 12 |
|
static ScmObj xyzzylisp__2amode_line_format_2a__VAR = SCM_UNBOUND; |
| 13 |
static ScmObj xyzzylisp_bufferp(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) |
static ScmObj xyzzylisp_bufferp(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) |
| 14 |
{ |
{ |
| 15 |
ScmObj buffer_scm; |
ScmObj buffer_scm; |
| 742 |
static SCM_DEFINE_STRING_CONST(xyzzylisp_msgbox__NAME, "msgbox", 6, 6); |
static SCM_DEFINE_STRING_CONST(xyzzylisp_msgbox__NAME, "msgbox", 6, 6); |
| 743 |
static SCM_DEFINE_SUBR(xyzzylisp_msgbox__STUB, 1, 1, SCM_OBJ(&xyzzylisp_msgbox__NAME), xyzzylisp_msgbox, NULL, NULL); |
static SCM_DEFINE_SUBR(xyzzylisp_msgbox__STUB, 1, 1, SCM_OBJ(&xyzzylisp_msgbox__NAME), xyzzylisp_msgbox, NULL, NULL); |
| 744 |
|
|
| 745 |
|
static ScmObj xyzzylisp_current_line_number(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) |
| 746 |
|
{ |
| 747 |
|
SCM_ENTER_SUBR("current-line-number"); |
| 748 |
|
{ |
| 749 |
|
{ |
| 750 |
|
int SCM_RESULT; |
| 751 |
|
GtkTextIter p; |
| 752 |
|
gtk_text_buffer_get_iter_at_mark(Shiki_CURRENT_TEXT_BUFFER,&p, gtk_text_buffer_get_insert(Shiki_CURRENT_TEXT_BUFFER)); |
| 753 |
|
SCM_RESULT = gtk_text_iter_get_line(&p) + 1; |
| 754 |
|
SCM_RETURN(Scm_MakeInteger(SCM_RESULT)); |
| 755 |
|
} |
| 756 |
|
} |
| 757 |
|
} |
| 758 |
|
|
| 759 |
|
static SCM_DEFINE_STRING_CONST(xyzzylisp_current_line_number__NAME, "current-line-number", 19, 19); |
| 760 |
|
static SCM_DEFINE_SUBR(xyzzylisp_current_line_number__STUB, 0, 0, SCM_OBJ(&xyzzylisp_current_line_number__NAME), xyzzylisp_current_line_number, NULL, NULL); |
| 761 |
|
|
| 762 |
|
static ScmObj xyzzylisp_current_column(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) |
| 763 |
|
{ |
| 764 |
|
SCM_ENTER_SUBR("current-column"); |
| 765 |
|
{ |
| 766 |
|
{ |
| 767 |
|
int SCM_RESULT; |
| 768 |
|
GtkTextIter p; |
| 769 |
|
gtk_text_buffer_get_iter_at_mark(Shiki_CURRENT_TEXT_BUFFER,&p, gtk_text_buffer_get_insert(Shiki_CURRENT_TEXT_BUFFER)); |
| 770 |
|
SCM_RESULT = gtk_text_iter_get_line_offset(&p) + 1; |
| 771 |
|
SCM_RETURN(Scm_MakeInteger(SCM_RESULT)); |
| 772 |
|
} |
| 773 |
|
} |
| 774 |
|
} |
| 775 |
|
|
| 776 |
|
static SCM_DEFINE_STRING_CONST(xyzzylisp_current_column__NAME, "current-column", 14, 14); |
| 777 |
|
static SCM_DEFINE_SUBR(xyzzylisp_current_column__STUB, 0, 0, SCM_OBJ(&xyzzylisp_current_column__NAME), xyzzylisp_current_column, NULL, NULL); |
| 778 |
|
|
| 779 |
void Scm_Init_xyzzylisp(ScmModule *module) |
void Scm_Init_xyzzylisp(ScmModule *module) |
| 780 |
{ |
{ |
| 781 |
|
|
| 782 |
|
xyzzylisp__2aindent_width_2a__VAR = Scm_Intern(&xyzzylisp__2aindent_width_2a__VAR__NAME); |
| 783 |
|
Scm_Define(module, SCM_SYMBOL(SCM_OBJ(xyzzylisp__2aindent_width_2a__VAR)), SCM_MAKE_INT(2)); |
| 784 |
|
xyzzylisp__2amode_line_format_2a__VAR = Scm_Intern(&xyzzylisp__2amode_line_format_2a__VAR__NAME); |
| 785 |
|
Scm_Define(module, SCM_SYMBOL(SCM_OBJ(xyzzylisp__2amode_line_format_2a__VAR)), SCM_FALSE); |
| 786 |
SCM_DEFINE(module, "bufferp", SCM_OBJ(&xyzzylisp_bufferp__STUB)); |
SCM_DEFINE(module, "bufferp", SCM_OBJ(&xyzzylisp_bufferp__STUB)); |
| 787 |
SCM_DEFINE(module, "selected-buffer", SCM_OBJ(&xyzzylisp_selected_buffer__STUB)); |
SCM_DEFINE(module, "selected-buffer", SCM_OBJ(&xyzzylisp_selected_buffer__STUB)); |
| 788 |
SCM_DEFINE(module, "get-next-buffer", SCM_OBJ(&xyzzylisp_get_next_buffer__STUB)); |
SCM_DEFINE(module, "get-next-buffer", SCM_OBJ(&xyzzylisp_get_next_buffer__STUB)); |
| 819 |
SCM_DEFINE(module, "no-or-yes-p", SCM_OBJ(&xyzzylisp_no_or_yes_p__STUB)); |
SCM_DEFINE(module, "no-or-yes-p", SCM_OBJ(&xyzzylisp_no_or_yes_p__STUB)); |
| 820 |
SCM_DEFINE(module, "need-buffer-save-p", SCM_OBJ(&xyzzylisp_need_buffer_save_p__STUB)); |
SCM_DEFINE(module, "need-buffer-save-p", SCM_OBJ(&xyzzylisp_need_buffer_save_p__STUB)); |
| 821 |
SCM_DEFINE(module, "msgbox", SCM_OBJ(&xyzzylisp_msgbox__STUB)); |
SCM_DEFINE(module, "msgbox", SCM_OBJ(&xyzzylisp_msgbox__STUB)); |
| 822 |
|
SCM_DEFINE(module, "current-line-number", SCM_OBJ(&xyzzylisp_current_line_number__STUB)); |
| 823 |
|
SCM_DEFINE(module, "current-column", SCM_OBJ(&xyzzylisp_current_column__STUB)); |
| 824 |
} |
} |