Re: VI* on VMS

Liste des GroupesRevenir à co vms 
Sujet : Re: VI* on VMS
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vms
Date : 17. Oct 2024, 13:57:30
Autres entêtes
Organisation : SunSITE.dk - Supporting Open source
Message-ID : <671109ba$0$709$14726298@news.sunsite.dk>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Mozilla Thunderbird
On 10/17/2024 8:53 AM, Arne Vajhøj wrote:
On 10/17/2024 8:37 AM, Simon Clubley wrote:
What is wrong with eve/tpu? or even LSE?
>
However, when it comes to emacs, it does a _lot_ that EVE does not do.
For one simple but very important example, you have brace matching in
emacs so you can easily check the closing brace matches the correct
opening brace.
 EVE does not have that out of the box.
 But then EVE has relative little out of the box.
 You can add it.
 Either DIY or grab a copy of Kenneth Faitfield's
EVE_MATCH_DELIMITORS.
 I am afraid there are no online archive of INFO-TPU, but
the most valuable pieces will have survived somewhere
(I got the above).
Here it is.
Arne
!++
!   This procedure highlights (in BOLD, REVERSE video) matching pairs
!   of delimitors, the first of which is taken to be the character at
!   the current cursor position.  Highlighting is turned off by invoking
!   this procedure with the cursor positioned on a non-delimitor character.
!   Subsequent invocations turn off the highlighting on previously matched
!   pairs, as well.
!
!   This procedure uses the global marker variables khf$x_match1_position,
!   khf$x_match2_position, khf$x_match3_position, and khf$x_match4_position.
!
! Author/Date:          K.H. Fairfield,         16-Jan-1988
!
!--
Procedure Eve_Match_Delimitors
!         --------------------
Local saved_mark,       ! mark current position
       first_char,       ! first character of matching pair
       last_char,        ! second character of matching pair
       direction,        ! search direction
       n;                ! character position in khf$kt_left_delims or
                         ! khf$kt_right_delims string.
     On_Error
         [TPU$_CONTROLC]:
             Eve$Learn_Abort;
             Eve$$Restore_Position (saved_mark);
         [OTHERWISE]:
             Eve$$Restore_Position (saved_mark);
     Endon_Error;
     saved_mark := Mark (NONE);
!+
!  Make an early return here if the current position is the same
!  position as the last previously marked delimitor.
!-
     If khf$x_match1_position <> 0 Then
         If saved_mark = khf$x_match1_position Then
             khf$x_match1_position:= 0;
             khf$x_match2_position:= 0;
             khf$x_match3_position:= 0;
             khf$x_match4_position:= 0;
             Return (TRUE);
         Endif;
     Endif;
     first_char := CURRENT_CHARACTER;
     n := Index (khf$kt_left_delims, first_char);
     If n > 0 Then
         last_char := Substr (khf$kt_right_delims, n, 1);
         direction := FORWARD;
     Else
         n := Index (khf$kt_right_delims, first_char);
         If n > 0 Then
             last_char := Substr (khf$kt_left_delims, n, 1);
             direction := REVERSE;
         Else
!+
!  Current_Character was not a delimitor.  If highlighting is on, turn it
!  off, else issue an error message.
!-
             If khf$x_match1_position = 0 Then
                 Eve$message ("The current character, " + first_char +
                          ", is not a valid delimitor to match.");
             Endif;
             khf$x_match1_position:= 0;
             khf$x_match2_position:= 0;
             khf$x_match3_position:= 0;
             khf$x_match4_position:= 0;
             Return (FALSE);
         Endif;
     Endif;
     khf$x_match1_position:= Mark (BOLD);
     khf$x_match2_position:= Mark (REVERSE);
     If Khf_Find_Match (first_char, last_char, direction) = 1 Then
         khf$x_match3_position:= Mark (BOLD);
         khf$x_match4_position:= Mark (REVERSE);
         Update (CURRENT_WINDOW);
         Position (khf$x_match1_position);
         Return (TRUE);
     Else
         Position (khf$x_match1_position);
         khf$x_match1_position:= 0;
         khf$x_match2_position:= 0;
         khf$x_match3_position:= 0;
         khf$x_match4_position:= 0;
         Eve$message (" Could not find the matching " + last_char +
                  " character for the current character, " + first_char);
         Return (FALSE);
     Endif;
EndProcedure;           ! Eve_Match_Delimitors
!++
!   The following procedure does the actually search for the matching
!   delimitor character.  A recursive algorithm is used so that intervening
!   pairs of matched delimitors are not mistakenly selected as the match.
!
! Input Parameters:
!
!       first       the delimitor character whose mate is being sought
!
!       last        the matching delimitor character
!
!       direction   the direction to search.  If first_char is a right-
!                   delimitor, the search direction is FORWARD,
!                   otherwise it is REVERSE.
!
! Author/Date:          K.H. Fairfield,         16-Jan-1988
!-
Procedure Khf_Find_Match (first, last, direction)
!         --------------
Local this_patt, this_range;
     this_patt := first + last;
     Loop
         If direction = FORWARD Then
             Move_Horizontal (1);
         Else
             Move_Horizontal (-1);
         Endif;
         this_range := Search_Quietly (Any (this_patt), direction);
         If this_range <> 0
         Then
             Position (this_range);
         Else
             Return (0);
         Endif;
         If CURRENT_CHARACTER = last Then
             Return (1);
         Else
             If Khf_Find_Match (first, last, direction) = 0 Then
                 Return (0);
             Endif;
         Endif;
     Endloop;
Endprocedure;           ! Khf_Find_Match

Date Sujet#  Auteur
16 Oct 24 * VI* on VMS67David Meyer
16 Oct 24 `* Re: VI* on VMS66Arne Vajhøj
16 Oct 24  `* Re: VI* on VMS65Dan Cross
16 Oct 24   `* Re: VI* on VMS64Arne Vajhøj
16 Oct 24    `* Re: VI* on VMS63Dan Cross
16 Oct 24     `* Re: VI* on VMS62Arne Vajhøj
16 Oct 24      `* Re: VI* on VMS61Chris Townley
16 Oct 24       +* Re: VI* on VMS2Arne Vajhøj
17 Oct 24       i`- Re: VI* on VMS1Lawrence D'Oliveiro
17 Oct 24       +- Re: VI* on VMS1David Meyer
17 Oct 24       +* Re: VI* on VMS17Dave Froble
17 Oct 24       i`* Re: VI* on VMS16John H. Reinhardt
17 Oct 24       i `* Re: VI* on VMS15Lawrence D'Oliveiro
18 Oct 24       i  `* Re: VI* on VMS14Arne Vajhøj
18 Oct 24       i   `* Re: VI* on VMS13Lawrence D'Oliveiro
18 Oct 24       i    `* Re: VI* on VMS12Arne Vajhøj
18 Oct 24       i     `* Re: VI* on VMS11Lawrence D'Oliveiro
19 Oct 24       i      `* Re: VI* on VMS10Dave Froble
21 Oct 24       i       `* Re: VI* on VMS9Simon Clubley
21 Oct 24       i        +* Re: VI* on VMS2Rich Alderson
22 Oct 24       i        i`- Re: VI* on VMS1Simon Clubley
22 Oct 24       i        `* Re: VI* on VMS6Dennis Boone
22 Oct 24       i         `* Re: VI* on VMS5Hunter Goatley
22 Oct 24       i          `* Re: VI* on VMS4Simon Clubley
23 Oct 24       i           `* Re: VI* on VMS3Simon Clubley
23 Oct 24       i            `* Re: VI* on VMS2Simon Clubley
24 Oct 24       i             `- Re: VI* on VMS1Hunter Goatley
17 Oct 24       +* Re: VI* on VMS39Simon Clubley
17 Oct 24       i+- Re: VI* on VMS1Chris Townley
17 Oct 24       i+* Re: VI* on VMS33Arne Vajhøj
17 Oct 24       ii+* Re: VI* on VMS31Arne Vajhøj
18 Oct 24       iii`* Re: VI* on VMS30Simon Clubley
18 Oct 24       iii `* Re: VI* on VMS29Arne Vajhøj
18 Oct 24       iii  `* Re: VI* on VMS28Arne Vajhøj
18 Oct 24       iii   `* Re: VI* on VMS27Arne Vajhøj
19 Oct 24       iii    `* Re: VI* on VMS26Arne Vajhøj
21 Oct 24       iii     `* Re: VI* on VMS25Simon Clubley
21 Oct 24       iii      `* Re: VI* on VMS24Arne Vajhøj
22 Oct 24       iii       `* Re: VI* on VMS23Simon Clubley
22 Oct 24       iii        `* Re: VI* on VMS22Arne Vajhøj
22 Oct 24       iii         +* Re: VI* on VMS16Chris Townley
22 Oct 24       iii         i`* Re: VI* on VMS15Arne Vajhøj
22 Oct 24       iii         i +* Re: VI* on VMS9Chris Townley
22 Oct 24       iii         i i+* Re: VI* on VMS7Arne Vajhøj
22 Oct 24       iii         i ii`* Re: VI* on VMS6Hunter Goatley
22 Oct 24       iii         i ii +* Re: VI* on VMS4Arne Vajhøj
22 Oct 24       iii         i ii i`* Re: VI* on VMS3Lawrence D'Oliveiro
22 Oct 24       iii         i ii i `* Re: VI* on VMS2Arne Vajhøj
23 Oct 24       iii         i ii i  `- Re: VI* on VMS1Simon Clubley
23 Oct 24       iii         i ii `- Re: VI* on VMS1Mark Berryman
22 Oct 24       iii         i i`- Re: VI* on VMS1Robert A. Brooks
22 Oct 24       iii         i `* Re: VI* on VMS5Lawrence D'Oliveiro
22 Oct 24       iii         i  `* Re: VI* on VMS4John H. Reinhardt
23 Oct 24       iii         i   +- Re: VI* on VMS1Arne Vajhøj
23 Oct 24       iii         i   `* Re: VI* on VMS2Lawrence D'Oliveiro
23 Oct 24       iii         i    `- Re: VI* on VMS1Simon Clubley
22 Oct 24       iii         `* Re: VI* on VMS5Lawrence D'Oliveiro
22 Oct 24       iii          `* Re: VI* on VMS4Arne Vajhøj
22 Oct 24       iii           `* Re: VI* on VMS3Lawrence D'Oliveiro
23 Oct 24       iii            `* Re: VI* on VMS2Arne Vajhøj
23 Oct 24       iii             `- Re: VI* on VMS1Lawrence D'Oliveiro
17 Oct 24       ii`- Re: VI* on VMS1Lawrence D'Oliveiro
21 Oct 24       i`* Re: VI* on VMS4bill
21 Oct 24       i +- Re: VI* on VMS1Lawrence D'Oliveiro
21 Oct 24       i +- Re: VI* on VMS1Dan Cross
21 Oct 24       i `- Re: VI* on VMS1Arne Vajhøj
21 Oct 24       `- Re: VI* on VMS1bill

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal