aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fm.h5
-rw-r--r--main.c12
-rw-r--r--rc.c11
3 files changed, 25 insertions, 3 deletions
diff --git a/fm.h b/fm.h
index c2b43ea..0db0262 100644
--- a/fm.h
+++ b/fm.h
@@ -1,4 +1,4 @@
-/* $Id: fm.h,v 1.18 2001/11/23 21:40:19 ukai Exp $ */
+/* $Id: fm.h,v 1.19 2001/11/23 22:07:45 ukai Exp $ */
/*
* w3m: WWW wo Miru utility
*
@@ -703,6 +703,9 @@ global int useVisitedColor init(FALSE);
global int visited_color init(5); /* magenta */
#endif /* USE_COLOR */
global int confirm_on_quit init(TRUE);
+#ifdef USE_MARK
+global int use_mark init(TRUE);
+#endif
#ifdef EMACS_LIKE_LINEEDIT
global int emacs_like_lineedit init(TRUE);
#endif
diff --git a/main.c b/main.c
index 556484d..b7386ef 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.21 2001/11/23 21:40:19 ukai Exp $ */
+/* $Id: main.c,v 1.22 2001/11/23 22:07:45 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -2142,6 +2142,8 @@ void
_mark(void)
{
Line *l;
+ if (! use_mark)
+ return;
if (Currentbuf->firstLine == NULL)
return;
l = Currentbuf->currentLine;
@@ -2152,6 +2154,8 @@ _mark(void)
static void
cmd_mark(Lineprop * p)
{
+ if (! use_mark)
+ return;
if ((*p & PM_MARK) && (*p & PE_STAND))
*p &= ~PE_STAND;
else if (!(*p & PM_MARK) && !(*p & PE_STAND))
@@ -2166,6 +2170,8 @@ nextMk(void)
Line *l;
int i;
+ if (! use_mark)
+ return;
if (Currentbuf->firstLine == NULL)
return;
i = Currentbuf->pos + 1;
@@ -2197,6 +2203,8 @@ prevMk(void)
Line *l;
int i;
+ if (! use_mark)
+ return;
if (Currentbuf->firstLine == NULL)
return;
i = Currentbuf->pos - 1;
@@ -2231,6 +2239,8 @@ reMark(void)
char *str;
char *p, *p1, *p2;
+ if (! use_mark)
+ return;
str = inputStrHist("(Mark)Regexp: ", MarkString, TextHist);
if (str == NULL || *str == '\0') {
displayBuffer(Currentbuf, B_NORMAL);
diff --git a/rc.c b/rc.c
index 387f37f..45e3588 100644
--- a/rc.c
+++ b/rc.c
@@ -1,4 +1,4 @@
-/* $Id: rc.c,v 1.12 2001/11/23 21:40:19 ukai Exp $ */
+/* $Id: rc.c,v 1.13 2001/11/23 22:07:45 ukai Exp $ */
/*
* Initialization file etc.
*/
@@ -89,6 +89,9 @@ static int rc_initialized = 0;
#define CMT_PDROOT "/~user で表されるディレクトリ"
#define CMT_CGIBIN "/cgi-bin で表されるディレクトリ"
#define CMT_CONFIRM_QQ "q での終了時に確認する"
+#ifdef USE_MARK
+#define CMT_USE_MARK "マーク機能を有効にする"
+#endif
#ifdef EMACS_LIKE_LINEEDIT
#define CMT_EMACS_LIKE_LINEEDIT "Emacs風の行編集にする"
#endif
@@ -199,6 +202,9 @@ static int rc_initialized = 0;
#define CMT_PDROOT "Directory corresponds to /~user"
#define CMT_CGIBIN "Directory corresponds to /cgi-bin"
#define CMT_CONFIRM_QQ "Confirm when quitting with q"
+#ifdef USE_MARK
+#define CMT_USE_MARK "Enable mark operations"
+#endif
#ifdef EMACS_LIKE_LINEEDIT
#define CMT_EMACS_LIKE_LINEEDIT "Emacs-style line editing"
#endif
@@ -411,6 +417,9 @@ struct param_ptr params3[] =
{"save_hist", P_INT, PI_ONOFF, (void *) &SaveURLHist, CMT_SAVEHIST, NULL},
#endif /* USE_HISTORY */
{"confirm_qq", P_INT, PI_ONOFF, (void *) &confirm_on_quit, CMT_CONFIRM_QQ, NULL},
+#ifdef USE_MARK
+ {"mark", P_INT, PI_ONOFF, (void *) &use_mark, CMT_USE_MARK, NULL },
+#endif
#ifdef EMACS_LIKE_LINEEDIT
{"emacs_like_lineedit", P_INT, PI_ONOFF, (void *) &emacs_like_lineedit, CMT_EMACS_LIKE_LINEEDIT, NULL },
#endif