lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev [-dev.12] Alternate line_edit cleanup patch (again)


From: Kim DeVaughn
Subject: lynx-dev [-dev.12] Alternate line_edit cleanup patch (again)
Date: Wed, 30 Dec 1998 07:38:13 -0800

Hmmm ... maybe the third time posting this will be the charm (or is there
some problem in including it in the distribution ...?).

As may be, the attached fixes some discrepancies between the code and the
documentation (help files), for the alternate line edit keybindings, that
were first included in the distribution somewhere around -dev.3, or so.

Also, a delete-to-beginning-of-line has been added (for the alt bindings
only), and a help page has been added that describes the alternate bind-
ings.

/kim


diff -uNr lynx-2.8.2-dev.12.orig/lynx_help/keystrokes/alt_edit_help.html 
lynx-2.8.2-dev.12+kd/lynx_help/keystrokes/alt_edit_help.html
--- lynx-2.8.2-dev.12.orig/lynx_help/keystrokes/alt_edit_help.html      Wed Dec 
31 16:00:00 1969
+++ lynx-2.8.2-dev.12+kd/lynx_help/keystrokes/alt_edit_help.html        Wed Dec 
30 01:06:40 1998
@@ -0,0 +1,51 @@
+<!DOCTYPE html public "-//IETF//DTD HTML 3.0//EN">
+<html>
+<head>
+<title>Lynx Line Editor Alternate Key Binding</title>
+<link rev="made" href="mailto:address@hidden";>
+</head>
+<body>
+<h1>+++ALTERNATE BINDINGS+++</h1>
+
+Lynx invokes a built-in <em>Line Editor</em> for entering strings in
+response to prompts, in forms, and for email messages if an external editor
+has not been defined.  Administrators can offer additional alternate key
+bindings by adding them in LYEditmap.c before compiling Lynx.  If available,
+they may be selected via the 'o'ptions menu, or by editing lineedit_mode in
+the .lynxrc file.
+
+<p>Note: setting emacs/vi keys ON has no effect on line-editor bindings.
+
+<p>This is the <em>Alternate Bindings</em> keymap:
+
+<p><pre>
+     ENTER  Input complete        -  RETURN
+     TAB    Input complete        -  TAB, Do
+     ABORT  Input cancelled       -  Ctrl-G, Ctrl-O, (Ctrl-C on some systems)
+     ERASE  Erase the line        -  Ctrl-U
+
+     BACK   Cursor back     char  -  Left-Arrow,  Ctrl-B
+     FORW   Cursor forward  char  -  Right-Arrow, Ctrl-F
+     BACKW  Cursor back     word  -  Ctrl-P
+     FORWW  Cursor forward  word  -  Ctrl-N
+     BOL    Go to begin of  line  -  Ctrl-A, Home, Find
+     EOL    Go to end   of  line  -  Ctrl-E, End,  Select
+
+     DELP   Delete prev     char  -  Ctrl-H, DELETE, Remove
+     DELN   Delete next [*] char  -  Ctrl-D
+     DELPW  Delete prev     word  -  Ctrl-R
+     DELNW  Delete next     word  -  Ctrl-T
+     DELBL  Delete to beg of line -  Ctrl-X
+     DELEL  Delete to end of line -  Ctrl-K
+
+     UPPER  Upper case the line   -  Ctrl-^
+     LOWER  Lower case the line   -  Ctrl-_
+
+     LKCMD  Invoke cmd prompt     -  Ctrl-V (in form text fields, only)
+
+[*] "next" means the character "under" a box or underline style cursor; it
+     means "to the immediate right of" an I-beam (between characters) type
+     cursor.
+</pre>
+</body>
+</html>
diff -uNr lynx-2.8.2-dev.12.orig/lynx_help/keystrokes/edit_help.html 
lynx-2.8.2-dev.12+kd/lynx_help/keystrokes/edit_help.html
--- lynx-2.8.2-dev.12.orig/lynx_help/keystrokes/edit_help.html  Sat Nov 21 
08:32:10 1998
+++ lynx-2.8.2-dev.12+kd/lynx_help/keystrokes/edit_help.html    Wed Dec 30 
01:06:40 1998
@@ -10,18 +10,21 @@
 Lynx invokes a built-in <em>Line Editor</em> for entering strings in
 response to prompts, in forms, and for email messages if an external editor
 has not been defined.  Administrators can offer alternate key bindings
-by adding them in LYEditmap.c before compiling Lynx.  If available, they may 
-be selected via the old-style 'o'ptions menu (see -forms_options command 
-line option), or by editing lineedit_mode in the .lynxrc file. 
- 
+by adding them in LYEditmap.c before compiling Lynx.  If available, they may
+be selected via the 'o'ptions menu, or by editing lineedit_mode in the
+.lynxrc file. 
+ 
+<p>One such alternate key binding, which may be available on your system,
+is the <A HREF="alt_edit_help.html">Alternate Bindings</A> keymap.
+
 <p>Note: setting emacs/vi keys ON has no effect on line-editor bindings. 
  
-<p>This is the <em>Default Binding</em>: 
+<p>This is the <em>Default Binding</em> keymap:
  
 <p><pre> 
      ENTER  Input complete        -  RETURN 
      TAB    Input complete        -  TAB, Do 
-     ABORT  Input cancelled       -  Ctrl-G, Ctrl-O, Ctrl-C 
+     ABORT  Input cancelled       -  Ctrl-G, Ctrl-O, (Ctrl-C on some systems)
      ERASE  Erase the line        -  Ctrl-U, Ctrl-X 
  
      BACK   Cursor back     char  -  Left-Arrow 
@@ -35,16 +38,16 @@
      DELN   Delete next [*] char  -  Ctrl-D, Ctrl-R 
      DELPW  Delete prev     word  -  Ctrl-B 
      DELNW  Delete next     word  -  Ctrl-F 
-     DELEL  Delete to end of line -  Ctrl-\ 
+     DELEL  Delete to end of line -  Ctrl-_
  
-     LOWER  Lower case the line   -  Ctrl-K 
      UPPER  Upper case the line   -  Ctrl-T 
+     LOWER  Lower case the line   -  Ctrl-K 
  
      LKCMD  Invoke cmd prompt     -  Ctrl-V (in form text fields, only) 
      SWMAP  Switch input keymap   -  Ctrl-^
  
-[*] "next" means the character "under" a box or underline type cursor; it 
-     means "to the immediate right of" an I-beam type (between characters) 
+[*] "next" means the character "under" a box or underline style cursor; it
+     means "to the immediate right of" an I-beam (between characters) type
      cursor. 
 </pre>
 </body>
diff -uNr lynx-2.8.2-dev.12.orig/lynx_help/keystrokes/option_help.html 
lynx-2.8.2-dev.12+kd/lynx_help/keystrokes/option_help.html
--- lynx-2.8.2-dev.12.orig/lynx_help/keystrokes/option_help.html        Sat Dec 
12 20:10:36 1998
+++ lynx-2.8.2-dev.12+kd/lynx_help/keystrokes/option_help.html  Wed Dec 30 
01:06:41 1998
@@ -19,6 +19,7 @@
 <LI><A HREF="#EM">Emacs keys</A>
 <LI><A HREF="#LL">Execution links</A>
 <LI><A HREF="#KM">Keypad mode</A>
+<LI><A HREF="#LE">Line edit style</A>
 <LI><A HREF="#PM">Personal Mail Address</A>
 <LI><A HREF="#PU">Pop-ups for select fields</A>
 <LI><A HREF="#ST">Searching type</A>
@@ -47,9 +48,6 @@
 <LI><A HREF="#PC">Preferred Document Charset</A>
 <LI><A HREF="#PL">Preferred Document Language</A>
 <LI><A HREF="#UA">User Agent</A></UL>
-<LI> -- not in Options Form --
-<UL>
-<LI><A HREF="#LE">Line edit style</A></UL>
 </UL>
 
 <H1><A NAME="CK">Cookies</A></H1>
@@ -68,6 +66,7 @@
 to up-arrow, down-arrow, right-arrow and left-arrow respectively.  Otherwise,
 they remain mapped to their configured bindings (normally UP_TWO lines,
 DOWN_TWO lines, NEXT_PAGE and PREV_PAGE respectively).
+<p>Note: setting emacs keys does not affect the line-editor bindings.
 
 <H1><A NAME="LL">Execution links</A></H1>
 
@@ -82,6 +81,13 @@
 so that the links may be selected by numbers instead of moving to them
 with the arrow keys.  You can also number form fields.
 
+<H1><A NAME="LE">Line edit style</A></H1>
+
+This allows you to set alternate key bindings for the built-in line editor,
+if your system administrator has installed 
+<A HREF="alt_edit_help.html">Alternate Bindings</A>.
+Otherwise, Lynx uses the <A HREF="edit_help.html">Default Binding</A>.
+
 <H1><A NAME="PM">Personal Mail Address</A></H1>
 
 You may set your mail address here so that when mailing messages
@@ -170,6 +176,7 @@
 to left-arrow, down-arrow, up-arrow and right-arrow respectively.
 <p>The uppercase H, J, K, and L keys remain mapped to their configured bindings
 (normally HELP, JUMP, KEYMAP and LIST, respectively).
+<p>Note: setting vi keys does not affect the line-editor bindings.
 
 <H1><A NAME="DV">X DISPLAY variable</A></H1>
 
@@ -307,12 +314,6 @@
 be prosecuted.  DO NOT misrepresent Lynx as Mozilla.  The Options Menu issues
 a warning about possible copyright infringement whenever the header is changed
 to one which does not include `Lynx' or `lynx'.
-
-<H1><A NAME="LE">Line edit style</A></H1>
-
-This allows you to set alternate key bindings for the built-in line editor,
-if your system administrator has installed alternates.
-Otherwise, Lynx uses the <A HREF="edit_help.html">Default Binding</A>.
 
 </BODY>
 </HTML>
diff -uNr lynx-2.8.2-dev.12.orig/src/LYEditmap.c 
lynx-2.8.2-dev.12+kd/src/LYEditmap.c
--- lynx-2.8.2-dev.12.orig/src/LYEditmap.c      Sat Dec 26 12:50:01 1998
+++ lynx-2.8.2-dev.12+kd/src/LYEditmap.c        Wed Dec 30 01:06:41 1998
@@ -33,7 +33,7 @@
 LYE_ERASE,      LYE_NOP,        LYE_NOP,        LYE_NOP,
 /* ^X           ^Y              ^Z              ESC     */
 
-LYE_NOP,        LYE_NOP,        LYE_SWMAP,      LYE_NOP,
+LYE_NOP,        LYE_NOP,        LYE_SWMAP,      LYE_DELEL,
 /* ^\           ^]              ^^              ^_      */
 
 /* sp .. RUBOUT                                         */
@@ -110,15 +110,17 @@
 /* F1           Do key          Find key        Select key  */
 
 LYE_NOP,        LYE_DELP,       LYE_NOP,        LYE_NOP,
-/* Insert key   Remove key      MOUSE_KEY       DO_NOTHING         */
+/* Insert key   Remove key      MOUSE_KEY       DO_NOTHING  */
 };
 
 /*
  * Add your favorite key bindings HERE
  */
 
-/* 01 */ /* Default except that  ^F=cursor-forward  and  ^B=cursor-backward */
-/*    */
+/* KED-01 */ /* Default except: ^B=cursor-backward,  ^F=cursor-forward,   */
+             /*                 ^K=delete-to-EOL,    ^X=delete-to-BOL,    */
+             /*                 ^R=delete-prev-word, ^T=delete-next-word, */
+             /*                 ^^=upper-case-line,  ^_=lower-case-line   */
 
 #ifdef EXP_ALT_BINDINGS
 PRIVATE char BetterEditBinding[]={
@@ -141,7 +143,7 @@
 LYE_DELNW,      LYE_ERASE,      LYE_LKCMD,      LYE_NOP,
 /* ^T           ^U              ^V              ^W      */
 
-LYE_ERASE,      LYE_NOP,        LYE_NOP,        LYE_NOP,
+LYE_DELBL,      LYE_NOP,        LYE_NOP,        LYE_NOP,
 /* ^X           ^Y              ^Z              ESC     */
 
 LYE_NOP,        LYE_NOP,        LYE_UPPER,      LYE_LOWER,
@@ -221,7 +223,7 @@
 /* F1           Do key          Find key        Select key  */
 
 LYE_NOP,        LYE_DELP,       LYE_NOP,        LYE_NOP,
-/* Insert key   Remove key      DO_NOTHING      ...         */
+/* Insert key   Remove key      MOUSE_KEY       DO_NOTHING  */
 };
 #endif
 
diff -uNr lynx-2.8.2-dev.12.orig/src/LYStrings.c 
lynx-2.8.2-dev.12+kd/src/LYStrings.c
--- lynx-2.8.2-dev.12.orig/src/LYStrings.c      Sat Dec 26 12:50:01 1998
+++ lynx-2.8.2-dev.12+kd/src/LYStrings.c        Wed Dec 30 01:06:41 1998
@@ -1836,6 +1836,17 @@
        }
        break;
 
+    case LYE_DELBL:
+       /*
+        *  Delete from current cursor position back to BOL.
+        */
+       {
+           int pos0 = Pos;
+           while (pos0--)
+               LYEdit1(edit, 0, LYE_DELP, FALSE);
+       }
+       break;
+
     case LYE_DELEL:
        /*
         *  Delete from current cursor position thru EOL.
diff -uNr lynx-2.8.2-dev.12.orig/src/LYStrings.h 
lynx-2.8.2-dev.12+kd/src/LYStrings.h
--- lynx-2.8.2-dev.12.orig/src/LYStrings.h      Sat Dec 26 12:50:01 1998
+++ lynx-2.8.2-dev.12+kd/src/LYStrings.h        Wed Dec 30 01:12:43 1998
@@ -155,7 +155,8 @@
 
 #define LYE_AIX   (LYE_LKCMD +1)  /* Hex 97                */
 
-#define LYE_DELEL (LYE_AIX   +1)  /* Delete thru EOL       */
+#define LYE_DELBL (LYE_AIX   +1)  /* Delete back to BOL    */
+#define LYE_DELEL (LYE_DELBL +1)  /* Delete thru EOL       */
 
 #define LYE_SWMAP (LYE_DELEL +1)  /* Switch input keymap   */
 
##--eof--##

reply via email to

[Prev in Thread] Current Thread [Next in Thread]