Search                        Top                                  Index
REF VEDVARS                               Dan Perri & Aaron Sloman, 1989
                                           Updated John Gibson, Feb 1995
                                           Updated Aaron Sloman Aug 2009

     COPYRIGHT University of Sussex 2009. All Rights Reserved.

<<<<<<<<<<<<<<<<<<<<<                             >>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<     VED GLOBAL VARIABLES    >>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<                             >>>>>>>>>>>>>>>>>>>>>>

This REF  file lists  most of  the  global variables  used by  Ved.  See
REF * VEDPROCS for a description of Ved procedures.

         CONTENTS - (Use <ENTER> g to access required sections)

  1   Introduction

  2   Ved General Global Variables

  3   Variables Associated With Each Ved File

  4   Variables Associated With Ved Search and Substitution

  5   Special Character Variables
      5.1   General
      5.2   Status Line
      5.3   Cursors

1  Introduction

This file deals  with the global  variables which are  used by Ved.  For
information on other aspects of Ved see:

    REF * DOCUMENTATION   (Online documentation)
    REF * VEDCOMMS        (Ved <ENTER> commands)
    REF * VEDPROCS        (Procedures used to implement Ved)
    REF * VEDTERMINALS    (Screen control and key mappings)
    REF * VEDSEARCH       (Search and replace in Ved)

See also REF * WVED  for variables and  procedures controlling  windowed
versions of Ved, i.e. XVed.

2  Ved General Global Variables

The following variables represent  the state of  the editor, or  control
its behaviour.  Variables concerned  with  search and  substitution,  or
graphic characters on the screen, are  listed in a different section  of
this file. See also the next section on variables representing the state
of each file.

ved_char_in_stream -> list                                    [variable]
list -> ved_char_in_stream
        List of buffered characters,  strings or action procedures  used
        by  * vedinascii  and  * vedgetinput.  If  this  is   non-empty,
        vedgetinput     and     vedinascii     will     take      action
        procedures/characters   from    it    first    before    calling
        vedscr_read_input. See Ved Input and Output in REF * VEDPROCS.

        * vedinput  provides   a  convenient   way  to   add  items   to

ved_last_char -> char                                         [variable]
char -> ved_last_char
        The   last   character   read   in   by   * vedprocesschar    or
        * vedgetproctable   (and,   where   appropriate,   inserted   by
        * vedinsertvedchar).

ved_nextsame_dot -> bool                                      [variable]
bool -> ved_nextsame_dot
        The boolean value controls whether ved_nextsame considers  lines
        that start with  a dot  as candidates  for being  the same.  The
        default is false. See HELP * ved_nextsame.

ved_nextsame_limit -> int                                     [variable]
int -> ved_nextsame_limit
        The value of this  variable controls searching by  ved_nextsame.
        See HELP * ved_nextsame.

ved_pop_back_file -> bool_or_string                           [variable]
bool_or_string -> ved_pop_back_file
        Controls the behaviour of Ved after successful completion of one
        of the  compilation  commands  ved_c, ved_c1,  ved_x  or  ved_x1
        (described in REF * VEDCOMMS). If the value of ved_pop_back_file
        is a  string, then  after compilation  Ved will  return to  that
        named file, creating a new buffer if necessary; if the value  is
        <true>  then  Ved  will  return  to  the  file  from  which  the
        compilation command was invoked;  if <false> (the default)  then
        Ved will  go  wherever  the  output  of  the  compilation  went:
        normally, output bypasses  Ved and goes  direct to the  terminal
        (the base window in XVed) in which case Ved will exit and return
        you to  the top-level  prompt,  but you  can change  the  output
        destination by assigning to the variable ved_chario_file.

ved_runtime_actions                                           [variable]
        List of actions (procedures)  to be executed  when Ved is  first
        run. See  the  entries  for vedsetup  and  ved_runtime_apply  in
        REF * VEDPROCS for more details.

vedalwaysask -> bool                                          [variable]
bool -> vedalwaysask
        Holds a boolean which  is used to determine  whether or not  Ved
        files are to be automatically written on exit from Ved. If  true
        then Ved  files are  not automatically  written when  you  leave
        Poplog. Default is false, i.e. files are written if changed

vedargument -> string                                         [variable]
string -> vedargument
        When an <ENTER>  command is obeyed,  anything after the  command
        name is placed in vedargument as a string

vedautosave_min_preserve -> int                               [variable]
int -> vedautosave_min_preserve
        The * ved_autosave  utility, described  in  HELP * VED_AUTOSAVE,
        uses this variable to control whether  a file is big enough  for
        an extra initial backup copy to be created under the control  of
        * vedautosave_preserve.

vedautosave_min_write -> int                                  [variable]
int -> vedautosave_min_write
        The * ved_autosave utility will write files only if they have at
        least this number of changes. Default 0. See HELP * VED_AUTOSAVE

vedautosave_minutes -> num                             [active variable]
num -> vedautosave_minutes
        This active variable controls the  frequency of saving of  files
        that can be turned by * ved_autosave. num defaults to 5 minutes.
        Updating it changes the timer interval. See HELP * ved_autosave.

vedautosave_preserve -> item                                  [variable]
item -> vedautosave_preserve
        This variable, whose  value should  be a boolean,  a string,  an
        integer or a  procedure, controls whether  the automatic  saving
        mechanism described  in HELP * ved_autosave  creates an  initial
        EXTRA backup  file  for  each file  edited  during  the  current
        session. It  also controls  how  the saving  is done.  For  full
        details see the HELP file.

vedautowrite -> N_or_false                                    [variable]
N_or_false -> vedautowrite
        If given an  integer N, will  cause Ved to  write changed  files
        after every N characters read from keyboard. If false don't.

vedbackers -> list                                            [variable]
list -> vedbackers
        Contains  a  list  of  pop11  reserved  words  which  should  be
        'outdented' when justifying  a program text.  Used by  ved_tidy.
        (See also vedopeners, vedclosures, vedforwarders).

vedbufferlist -> list                                         [variable]
list -> vedbufferlist
        A list  holding  the ved  file  structure for  each  file  being
        edited. (See also vedupperfile, vedlowerfile, ved_current_file.)

vedcharinsert_attr                                            [variable]
        This integer variable (default 0)  is used by the Ved  character
        inserting   procedures   vedcharinsert,   vedinsertstring    and
        vedinsertvedchar. Any character attributes  (bits 16-23) set  in
        this variable are or'ed into each character inserted.

vedclosers -> list                                            [variable]
list -> vedclosers
        Holds a list of pop11 reserved words and symbols, which indicate
        the end of a region of indenting for automatic justification  of
        program files by VED_TIDY. (See also vedbackers,  vedforwarders,

vedcommand -> string                                          [variable]
string -> vedcommand
        A string containing  the full  command typed in  on the  <ENTER>
        command line. (See also * vedargument, HELP * VEDCOMMANDS.)

vedcrinteractive -> bool                                      [variable]
bool -> vedcrinteractive
        This boolean determines whether typing <RETURN> in an "immediate
        mode" buffer  will input  the  line on  which  it is  typed.  If
        <false>, only ved_lmr can be used to input text (i.e. input  the
        marked range).

        More specifically,  it controls  the behaviour  of veddocr  when
        vedprocswaiting is  true  for  the current  buffer.  veddocr  is
        called  by  vedcharinsert  when   a  newline  is  inserted;   if
        vedprocswaiting  is  true  (that   is,  there  is  a   suspended
        Ved-device process waiting for input on the current buffer), and
        vedcrinteractive is true, then  instead of inserting a  newline,
        veddocr passes  the  current  line  as  input  for  the  waiting

        See HELP * IM and 'Ved-Buffer  Devices and "Immediate Mode"'  in
        REF * VEDPROCS for more details.

ved_current_file -> vedfile_struct                     [active variable]
vedfile_struct -> ved_current_file
        An active variable which  holds the ved  file structure for  the
        file for which the Ved global variables are currently set.  (See
        'Variables Associated With Each Ved File' below.)

        Accessing the  variable  returns  the  current  file  structure.
        Updating  it   will  cause   all   the  Ved   global   variables
        corresponding to a file (such as vedname, vedbuffer, etc) to  be
        set for the new file, after saving their values for the existing

        (See also vedbufferlist, vedupperfile, vedlowerfile.)

vedcreatemode -> int_or_false                                 [variable]
int_or_false -> vedcreatemode
        (Unix only)  An  integer  or  (default)  false.  In  Unix,  this
        variable controls the  protection for files  created by Ved.  If
        vedcreatemode  is   an  integer,   Ved  will   temporarily   set
        pop_file_mode to that value whenever it creates a new version of
        a file.

        Note that this effective  only when creating  a new file,  since
        new  versions  of   old  files  use   the  existing  mode.   See
        * pop_file_mode for more details.

vedcurrentfile -> vedfile_struct                              [variable]
vedfile_struct -> vedcurrentfile
        An ordinary  variable holding  the Ved  file structure  for  the
        current   file.   Don't   use   this   variable;   always    use
        ved_current_file instead. (In fact,  accessing its value is  OK,
        but you should NOT  assign to it --  this will mean the  current
        file is  changed  without  changing  the  Ved  global  variables
        associated with each file.)

veddelspaces -> bool                                          [variable]
bool -> veddelspaces
        A boolean used  to control the  joining of lines.  If true  (the
        default) then Ved will delete leading spaces before joining  the
        current line to the preceding one.  Also on breaking a line  Ved
        deletes spaces immediately to right of cursor.

vedediting -> bool                                            [variable]
bool -> vedediting
        Indicates whether Ved is in charge of the terminal.

vedescape -> char                                             [variable]
char -> vedescape
        A character indicating a function-key type sequence. Default 27,
        which is ASCII  <ESC>. This variable  will demise shortly.  (See
        also  vedquery  vedescapetable,  vednormaltable,   REF * VEDVARS
        /Variables associated with screen control)

vedescapetable -> vec                                         [variable]
vec -> vedescapetable
        When a key is pressed, the  appropriate ASCII code is passed  to
        vednormaltable (See  vednormaltable) to  select the  appropriate
        action. If the code is the  same as that held in vedescape  (See
        vedescape) then another character is read in, and vedescapetable
        searched.  This  vector  maps   the  second  character  to   the
        appropriate procedure. Used by vedprocesschar.

vedexpandchar -> char_or_false                                [variable]
char_or_false -> vedexpandchar
        Holds either false (default) or  a character which is used  as a
        trigger for the abbreviations mechanism. Whenever this character
        is entered,  the ASCII  code of  the next  character entered  is
        passed as  a key  to the  property table  vedexpandchars,  which
        returns a procedure which, when  invoked should return a  string
        to be spliced into the command line. Eg if vedexpandchar is  set
        to hold the character `^`  and vedexpandchars contains an  entry
        mapping `a` to a  procedure which leaves a  string on the  stack
        which holds a ved command, eg  '%ls' then <ENTER> ^a will  cause
        the command <ENTER> %ls to  be executed. For fuller details  see

vedfiletypes -> list                                          [variable]
list -> vedfiletypes
        List of the possible suffixes for  a filename, eg '.p', and  the
        associated effects on  variables set at  initialisation of  Ved.
        E.g. set vedcompileable  to true  if filename  has suffix  '.p'.
        (See also HELP * VEDFILETYPES, HELP * VEDPROCS/vedsetfiletypes )

vedforwarders -> list                                         [variable]
list -> vedforwarders
        List of  Pop-11  syntax  words which  should  be  indented  when
        automatically justifying program files using ved_tidy etc.  (See
        also vedbackers, vedclosers, vedopeners)

vedhardtabs -> bool                                           [variable]
bool -> vedhardtabs
        This variable (default true) controls whether tab characters  in
        a file buffer  are treated  as 'hard', i.e.  whether Ved  should
        refuse to  allow insertion  or deletion  of characters  inside a

        If vedhardtabs is false, then  attempting to insert or  delete a
        character in the middle of tab  will turn the whole tab into  an
        equivalent number of spaces first.

        (Note that vedhardtabs applies only to tab characters already in
        the buffer. It does not  affect whether a tab character  (rather
        than spaces) is inserted when the tab key is pressed, or whether
        tabs from  a file  are set  up as  tab characters  (rather  than
        spaces) when  a  file is  read  in. Both  these  behaviours  are
        controlled by * vednotabs.)

vedinputfocus -> vedfile_struct                               [variable]
vedfile_struct -> vedinputfocus
        This  variable  controls  the   file  to  which  the   top-level
        input-reading loop of  vedprocess will return,  i.e. if this  is
        different from ved_current_file then vedinputfocus will be  made
        the current file. (This variable  may also be <false>, in  which
        case the top-level loop will just set it to ved_current_file.)

vedinteractive -> bool                                        [variable]
bool -> vedinteractive
        A boolean set to  true while inside  a running "immediate  mode"
        process. (See also HELP * IM )

vedinvedprocess -> bool                             [protected variable]
bool -> vedinvedprocess
        A boolean set true inside  vedprocess, and always false  outside
        it. It is therefore equivalent to iscaller(vedprocess).

vedlastcommand -> comm_p                                      [variable]
comm_p -> vedlastcommand
        Variable used by system procedures -- contains the procedure for
        the last Ved command executed.

vederrs_on_status -> bool                                     [variable]
bool -> vederrs_on_status
        When vedlmr_print_in_file is non false, and program output while
        Ved is running is  directed to a  file, syntactic errors  during
        compilation can either go to the  status line or into the  file.
        If vederrs_on_status is true,  the syntactic error messages  are
        displayed on Ved's status line. If it is false (the default) all
        error messages  go into  the same  Ved buffer  as other  program

vedlmr_errs_in_file -> bool_or_string                         [variable]
bool_or_string -> vedlmr_errs_in_file
        Holds either a filename or a boolean and is used to control  the
        destination of error  mishap messages. If  false (default)  then
        the message goes to the base window only. If true, it is  placed
        in the current  file, and if  a filename, the  mishap should  be
        directed  to  that  file.  (See  also  vedlmr_print_in_file  for
        destination of program output.)

vedlmr_print_in_file -> bool_or_string                        [variable]
bool_or_string -> vedlmr_print_in_file
        Either a string (default  is 'output.p') or  a boolean, used  to
        direct output from a users program. If a string then output from
        ved_lmr goes to file of that name. If true, then output goes  to
        current file. If false  output merely goes  on the base  window.
        (See  also   vedlmr_errs_in_file  for   destination  of   mishap

vedlowerfile -> vedfile_struct_or_false                       [variable]
vedfile_struct_or_false -> vedlowerfile
        Holds the Ved data structure for  the file in the lower  window,
        or false if  the screen  is not split.  (See also  vedupperfile,
        ved_current_file, vedbufferlist.)

vedmaxscrollhor -> int_or_p_or_false                          [variable]
int_or_p_or_false -> vedmaxscrollhor
vedmaxscrollvert -> int_or_p_or_false                         [variable]
int_or_p_or_false -> vedmaxscrollvert
        These   two   variables   determine   whether   vedcheck    (see
        HELP * VEDPROCS) scrolls  or refreshes  the screen  to make  the
        cursor location  visible. Each  may  have value  <false>  (which
        causes a default  to operate)  or a procedure  which returns  an
        integer, or  an  integer,  determining  the  maximum  amount  of
        horizontal  (vedmaxscrollhor)  or  vertical   (vedmaxscrollvert)
        scrolling,    respectively.     (See     also     vedlineoffset,

vedmarkclasses -> assoc_list                                  [variable]
assoc_list -> vedmarkclasses
        Association  list  of  marked-range  names  (words)  to  marking
        procedures      used      by      ved_mark_named_range.      See
        REF * ved_mark_named_range.

vedmessage -> string                                          [variable]
string -> vedmessage
        The string holding  the message  to be displayed  on the  status
        line. Once displayed, this  string is reset  to ''. When  empty,
        the name of the file is displayed instead.

vednonbreakfiles -> list                                      [variable]
list -> vednonbreakfiles
        List of  file  extensions (each  a  string) for  which  vedbreak
        should be false. See HELP * VEDNONBREAKFILES

vednormaltable -> vec                                         [variable]
vec -> vednormaltable
        A  table  mapping   characters  received   to  their   functions
        (procedure, string, undef etc). If  the entry for the  character
        is itself a table,  eg if the control  or escape characters  are
        received, then more  keys are needed  to determine the  function
        required. (See also vedescapetable)

vedopeners -> list                                            [variable]
list -> vedopeners
        A list of  Pop-11 syntax  words, which indicate  the start  of a
        region  of  program  text  that  should  be  indented.  Used  in
        automatic justification by procedures such as ved_tidy etc. (See
        also vedclosers, vedbackers, vedforwarders.)

vedprintingdone -> bool                                       [variable]
bool -> vedprintingdone
        A boolean that  is set  to true if  printing occurs,  indicating
        that the screen has  been corrupted and  needs to be  refreshed.
        Used by vedrestorescreen. Never true in XVed.

vedquery -> char                                              [variable]
char -> vedquery
        Holds the  character  that  is  expected  after  vedescape  (See
        vedescape) to further specify  the function required. (See  also
        vedquerytable.) Eg all  the keypad  functions on  the V200s  are
        mapped onto the sequence <ESC>  ? <CHARACTER>. By storing  these
        values in variables,  it is  possible to map  them to  different
        characters for non ASCII terminals.

vedquerytable -> vec                                          [variable]
vec -> vedquerytable
        A vector holding the mapping table for characters received after
        the key  sequence  vedescape  and  vedquery.  Used  to  map  the
        characters to their  functions (procedure,  string, undef  etc.)
        (See also vednormaltable, vedescapetable, vedquery, vedescape )

vedreadintabs -> bool                                         [variable]
bool -> vedreadintabs
        If set true, causes tabs to be preserved in files read in to Ved
        even if vednotabs is true. If vedreadintabs is true and any tabs
        are found,  then  vednotabs  is  set false  for  that  file,  to
        preserve the tabs. The default  for vedreadintabs is true.  (See
        also * vednotabs, HELP * VEDREADINTABS.)

vedreadintrailspaces -> bool                                  [variable]
bool -> vedreadintrailspaces
        If this variable is false (the default), trailing spaces on  the
        ends of lines  are stripped off  when a file  is read into  Ved.
        Trailing blank lines in a file are also discarded.

        If vedreadintrailspaces is  true, however,  trailing spaces  are
        preserved by turning the last one on each line into a  'trailing
        space' character. Trailing blank lines in a file are  similarily
        preserved, by replacing the last line with one containing just a
        'trailing  newline'  character.  (See  Ved  Special  Characters:
        Special Spaces Etc in REF * VEDPROCS.)

vedreadinplain -> bool_or_char                                [variable]
bool_or_char -> vedreadinplain
        This  variable  (default  false)   controls  whether  Ved   will
        interpret certain sequences of control characters in files being
        read in as character attributes/Ved graphics characters.

        See REF * vedfile_line_repeater for more details.

vedstatusheaderlen -> int                                     [constant]
        This constant is the length of the header part of vedstatusline.

vedwriteoutplain -> bool                                      [variable]
bool -> vedwriteoutplain
        This  variable  (default  false)   controls  whether  Ved   will
        translate  character  attributes/Ved   graphics  characters   to
        sequences of control characters when writing out a file.

        See REF * vedfile_line_consumer for more details.

vedrefreshneeded -> int_or_false                              [variable]
int_or_false -> vedrefreshneeded
        An integer or (default) false, indicating the window line number
        below which  the screen  should  be refreshed  when it  is  next
        updated (usually when Ved is waiting for input). This is used to
        prevent excessive refreshing of  the screen on "dumb"  terminals
        for which * vednolinedelete is true.

vedscreencolumn -> int                                        [variable]
int -> vedscreencolumn
        Integer cursor position on the screen. (See also vedscreenline.)

vedscreenline -> int                                          [variable]
int -> vedscreenline
        Integer position (number  of lines  from the top)  of cursor  on
        screen. (See also vedscreencolumn.)

vedscrollscreen -> bool                                       [variable]
bool -> vedscrollscreen
        A boolean used  to control  the screen up/down  action. If  true
        (the default),  then moving  up or  down the  current file  by a
        whole page causes  the screen  to scroll. If  false, the  screen
        does not scroll, but refreshes to the new page, which is  faster
        but less aesthetically pleasing.

vedsearchlist -> list                                         [variable]
list -> vedsearchlist
        Holds a  list of  directories  (default is  []). Should  Ved  be
        called on a file which does not exist in the current  directory,
        then each of the directories named in vedsearchlist is  examined
        to see if the file  exists there. Entries in vedsearchlist  need
        not be <directory> strings, they can be sublists, in which  case
        the first  element is  taken to  be the  <directory>. (See  also

vedsetupdone -> bool                                          [variable]
bool -> vedsetupdone
        A boolean that is set true  when Ved has been correctly set  up.
        (See also REF * VEDPROCS/vedsetup )

vedspacestring -> string                                      [constant]
string -> vedspacestring
        A string of one character - a space (i.e. ' ')

vedstartwindow -> int                                  [active variable]
int -> vedstartwindow
        For non-windowed Ved, the length in lines of the lower of  Ved's
        two windows. The  default value  is half the  screen length,  to
        make both windows  of equal  size. Assigning  a different  value
        will change the division between the two windows: most usefully,

            vedscreenlength -> vedstartwindow;

        reduces the  upper  window to  nothing,  forcing a  full  screen
        display for each file. If you try assigning a value greater than
        vedscreenlength, it will be quietly truncated.

        The ratio of vedstartwindow to  the screen length is  maintained
        automatically if ever the screen  length should change: this  is
        achieved by having vedstartwindow as an active variable.

        Not used in XVed.

vedstatusbufferlimit -> int                                   [variable]
int -> vedstatusbufferlimit
        An integer  which controls  the  number of  lines saved  in  Ved
        status buffer  Ved  saves old  <ENTER>  commands in  the  status
        buffer.   If   the    number   of    saved   commands    exceeds
        vedstatusbufferlimit (default  60 -  user assignable)  then  the
        oldest command is deleted.

vedstatusshowcols -> bool                                     [variable]
bool -> vedstatusshowcols
        When true, vedsetstatus displays the current value of  vedcolumn
        in vedstatusline,  instead  of  vedline.  The  command  ved_cols
        toggles the value of this variable.

vedupperfile -> vedfile_struct                                [variable]
vedfile_struct -> vedupperfile
        In windowed Ved, holds  the Ved file  structure for the  current
        file (if it has a window);  in non-windowed Ved, holds the  file
        structure for the file in the upper (or only) window. (See  also
        vedlowerfile, ved_current_file, vedbufferlist.)

vedv200escapetable -> vec                                     [variable]
vec -> vedv200escapetable
vedv200normaltable -> vec                                     [variable]
vec -> vedv200normaltable
vedv200querytable -> vec                                      [variable]
vec -> vedv200querytable
        The key binding tables for Visual 200s.

vedvarskeywords -> list                                       [variable]
list -> vedvarskeywords
        List of  the  pop11  keywords  used  to  declare  variables  and
        constants (eg vars,  lconstant etc) which  can be reassigned  by
        the user, and is used by automatic justification procedures such
        as * ved_tidy. (See also HELP * JUSTIFY, * vedbackers)

vedvedname -> string                                          [variable]
string -> vedvedname
        A string  holding  the name  of  the last  file  accessed  using

vedversions -> int_or_false                                   [variable]
int_or_false -> vedversions
        An integer or (default) false. This variable controls the number
        of backup versions of a file to be kept on disk. If  vedversions
        is an  integer, Ved  will temporarily  set pop_file_versions  to
        that value whenever it creates a new version of a file.

        See * pop_file_versions for more details on backup files.

vedwiggletimes -> int                                         [variable]
int -> vedwiggletimes
        Controls how long  the procedure vedwiggle  wiggles the  cursor.
        Default is  5,  set to  a  larger integer  for  fast  terminals,
        smaller for slow ones. See REF * vedwiggle.

vedwriteallfiles -> bool                                      [variable]
bool -> vedwriteallfiles
        For system use.

vvedcut_dump -> list                                          [variable]
list -> vvedcut_dump
        The list of strings that formed  the text deleted by ved_cut  or
        ved_ds. This  list  of  strings  can be  restored  to  the  file
        immediately after the current cursor, by using ved_splice.  (See
        also HELP * YANK.)

vveddump -> list                                              [variable]
list -> vveddump
        List of all  the lines of  text deleted by  (eg) ved_d, so  that
        they may be recovered. (See also HELP * YANK.)

vvedgotoplace -> int_or_string_or_false                       [variable]
int_or_string_or_false -> vvedgotoplace
        Used to locate the cursor when a  file is set on screen. It  can
        be an integer,  in which  case that line  number is  selected, a
        string which is searched for, or the default false, to which  it
        is reset after use.

vvedlinedump -> string                                        [variable]
string -> vvedlinedump
        Contains the line  most recently deleted  by vedlinedelete  as a
        string. It is  used to  restore the line  using ved_yankl.  (See
        also HELP * YANK.)

vvedworddump -> string                                        [variable]
string -> vvedworddump
        Contains the portion of line most recently deleted by one of the
        delete       procedures       (vedclearhead,       vedcleartail,
        vedwordrightdelete,  vedwordleftdelete)  so   that  it  may   be
        recovered using, for example, ved_yankw. (See also HELP * YANK.)

3  Variables Associated With Each Ved File

In Ved, a  file is stored  in a Ved  file structure, which  has a  large
number of fields storing the  values of Ved global variables  associated
with the file.

Variables associated with a file, i.e, that change whenever the  current
file changes,  are described  below.  Note that  not  all of  these  are
actually stored in the  file structure, since some  can be derived  from

On the other hand, some variables that are stored in the file  structure
do not appear  below: one such  is the internal  stack of marked  ranges
maintained by vedmarkpush and vedmarkpop.

Another is the variable subsystem,  which determines for each file  what
documentation lists will be searched by help commands, and what compiler
will be  called  by  when loading  a  marked  range in  the  file,  etc.
subsystem is described in REF * SUBSYSTEM.

(Two variables  also not  described  below which  are dependent  on  the
current  file   in   windowed   Ved  (XVed)   are   vedscreenwidth   and
vedscreenlength. In windowed Ved,  making a file  the current file  will
set these appropriately for the window dimensions.)

The file structure for the current  file is held in the active  variable
ved_current_file; when you  assign to this,  it automatically saves  the
globals in the current file structure, and then assigns all the  globals
from the new file structure. To do  the first part of this only (i.e  to
save the globals in the current  file without assigning a new one),  use

The values of  the file  globals can  be set when  a Ved  file is  first
initialised by the procedure vedveddefaults. They can also be controlled
by the user-definable list of information vedfiletypes, which tells  Ved
what to assign to  the variables when  a file is  created, read in  from
disc,  or   when  its   name   is  changed   (see   HELP * VEDFILETYPES,
HELP * INITIAL).  The   procedure   that   interprets   this   list   is
vedsetfiletypes described in REF * VEDPROCS.

(Note also that the procedure  * is_vedfile_local allows you to  specify
that the value of any variable is  to be localised to a given Ved  file.
The variable can thus maintain different values in different files.)

A Ved  file structure  is  actually a  standard  full vector;  the  file
INCLUDE * VEDFILE_STRUCT defines macros for the subscripts of each field
in the vector (and indicates  which global variables correspond to  each
field). As Poplog develops, the actually number of variables/fields  may
increase, but using  only the  macros in will  ensure
upward compatibility.

ved_on_status -> bool                                  [active variable]
bool -> ved_on_status
        The value  of ved_on_status  is true  if the  cursor is  on  the
        status line, false otherwise. Updating this variable will  cause
        the cursor to move to/from the status line.

        When on the status line, the following variables are set for the
        status line `file'.

            # vedbreak
            # vedbuffer
            # vedcolumn
            # vedcolumnoffset
            # vedleftmargin
            # vedline
            # vedlineoffset
            # vedpositionstack
            # vedwindowlength
            # vvedbuffersize
            # vvedlinesize
            # vvedmarkhi
            # vvedmarklo
            # vvedmarkprops
            # vedwlineoffset
            # vedwcolumnoffset
            # vedwlinewidth

        (The status line file also has its own stack of marked of ranges
        manipulated by  vedmarkpush and  vedmarkpop.)  The size  of  the
        status   line   file   is   truncated   whenever   it    exceeds

        Note  that  when  switching  files  with  ved_current_file,  you
        save/restore the state of files with respect to the status line,
        i.e. a file saved `on status' will restore `on status'. However,
        when  saving   a   file's   variables,   ved_current_file   (and
        ved_save_file_globals) always save the file values of the  above
        variables, not the status ones.

        When the cursor is on the status line, previous commands can  be
        examined,  edited,  and  if  necessary  redone,  by  using   the
        vedcharup and  vedchardown commands  to move  up and  down.  The
        "mark  range"  commands  (described  in  HELP * MARK)  are  also
        available though only one line at a time is visible.

        ved_on_status is most often changed by calling  vedstatusswitch,
        which also  marks the  left edge  of the  current Ved  line,  or
        vedenter which  also goes  to a  blank line  at the  end of  the
        status buffer.

vedonstatus -> bool                                           [variable]
bool -> vedonstatus
        An ordinary variable holding the `on status line' boolean. Don't
        use this variable; always  use ved_on_status instead. (In  fact,
        accessing its value is  OK, but you should  NOT assign to it  --
        this will  mean  the  state  is  changed  without  changing  the
        associated Ved global variables correctly.)

vedbreak -> bool                                              [variable]
bool -> vedbreak
        Contains a boolean  which controls automatic  line breaking.  If
        true, then Ved will break lines  (by moving whole words) to  fit
        into the  current  line  width  (held  in  vedlinemax).  Default
        controlled by value of * vednonbreakfiles.

vedbuffer -> vec                                              [variable]
vec -> vedbuffer
        A vector of (d)strings, each representing a line in the  current
        file. Note that the length of vedbuffer may be greater than  the
        number of lines in the file as extra blank lines (null  strings)
        are sometimes present at the end of the vector.

vedchanged -> int_or_false                                    [variable]
int_or_false -> vedchanged
        Contains either an integer count  of the number of changes  made
        to the current file. If none  have been made since the file  was
        last written, then it contains  false. If false, ved_w etc  will
        not write the file.

vedcolumn -> int                                              [variable]
int -> vedcolumn
        The position of cursor on the current line.

vedcolumnoffset -> int                                        [variable]
int -> vedcolumnoffset
        An integer count  of the  number of  columns a  window has  been
        scrolled to the  right. This  value is  also the  number of  the
        column of the current file, displayed  on the left hand side  of
        the window. (See also vedlineoffset, vedmaxscrollhor.)

vedcompileable -> bool                                        [variable]
bool -> vedcompileable
        Contains a boolean value which  indicates whether or not a  file
        is a  program  file.  Set  to true  if  the  current  file  name
        satisfies  * sysisprogfile,  in  which  case  the  file  may  be
        compiled. Otherwise false. Controls ved_x, ved_c, ved_l, etc.

vedcurrent -> string                                          [variable]
string -> vedcurrent
        A string  giving the  name under  which the  current buffer  was

        As  described  in  REF * VEDPROCS,  Real-File  and   Pseudo-File
        Buffers, a  buffer  whose name  contains  a space  character  is
        interpreted as a 'pseudo  file'. In this  case, the actual  name
        under which the buffer was  created is assigned to  vedpathname,
        and vedcurrent  is  set to  be  this string  with  the  trailing
        component (that is, the part following the last space  character
        in the name),  replaced by  sys_fname_namev applied  to it.  (In
        other  words,  vedcurrent  consists  of  vedpathname  with   any
        directory pathname on the trailing component removed.)

veddirectory -> string_or_false                               [variable]
string_or_false -> veddirectory
        For a  Ved  buffer  corresponding  to a  real  disk  file,  this
        variable contains the directory  path string that was  prepended
        to vedcurrent  to get  the file's  full pathname  (vedpathname).
        That is, if vedcurrent is an absolute pathname then veddirectory
        is  nullstring,   otherwise  veddirectory   is  the   value   of
        current_directory when the buffer was created.

        If veddirectory is  false, the  buffer is a  'pseudo file'  (see
        Real-File and Pseudo-File Buffers in REF * VEDPROCS).

vedfileprops -> word_or_false                                 [variable]
word_or_false -> vedfileprops
        A word  describing the  type of  the current  file (e.g.  "lib",
        "include", "help", "ref", "teach",  etc), and set by  vedsysfile
        when accessing documentation and library files. For an  ordinary
        user text or program file it is false.

        If vedfileprops is a word  containing a `.` character then  XVed
        will use the part preceding the `.` as the window class, and the
        part following  the `.`  as the  window type  (e.g. ved_ls  uses

        If you wish to associate other  information with a file you  can
        use a property created by * newvedfileprop.

vedindentstep -> int                                          [variable]
int -> vedindentstep
        An integer  that  controls  the  treatment  of  tab  characters.
        Default  is  4,  indicating   that  tab  characters  should   be
        represented by 4 spaces. It  is used to control indentation  and
        tabs in ved_tidy. (See also vednotabs, HELP * vedindentstep.)

vedleftmargin -> int_or_p                                     [variable]
int_or_p -> vedleftmargin
        Contains either an  integer or a  procedure, which controls  the
        left margin.  The default  is 0.  It controls  line-breaks,  the
        action of the <RETURN> key,  text justification etc. If it  is a
        procedure, then  it should  return a  valid value  for the  left
        margin when it is run, i.e.

                   p() -> int_margin

        (See also HELP * VEDCOMMS /ved_margin.)

vedline -> int                                                [variable]
int -> vedline
        Line number of cursor position in the current file. Don't  alter
        it without calling vedtrimline to  remove any extra spaces  from
        the right  hand  end.  After altering,  call  vedsetlinesize  to
        update the variable  vvedlinesize. (Calling  vedjumpto does  all
        this for you.)

vedlinemax -> int                                             [variable]
int -> vedlinemax
        Integer holding the maximum line width. If vedbreak is true, the
        lines  are  not  allowed  to  exceed  this  length.  (See   also

vedlineoffset -> int                                          [variable]
int -> vedlineoffset
        An integer count  of the number  of lines in  the file that  are
        above the window. This value is also the line number of the  top
        visible line. (See also vedcolumnoffset, vedmaxscrollvert.)

vednamestring -> string                                       [variable]
string -> vednamestring
        This string is displayed  as the default  message on the  status
        line (i.e.  when there  is  no other  message to  display),  and
        indicates the name of the current buffer in the form

                EDITING: namestring

        for a writeable buffer, or

                EXAMINING: namestring

        for one  with  vedwriteable  false. In  both  cases,  namestring
        consists of  vedcurrent with  vedfileprops preceding  it if  the
        latter is  a word.  (Note that  if vedfileprops  contains a  `.`
        character, only  the part  following  the `.`  is used  in  this

        (In XVed,  the  namestring  information  goes  into  the  window
        manager title bar on each window. If you have title bars on your
        windows and don't want the information duplicated on the  status
        line, you can turn  it off by  setting the application  resource
        ShowFileName to false. See Application Settings in REF * XVED.)

vedneedscompiling -> bool                                     [variable]
bool -> vedneedscompiling
        A boolean set true when a compileable file is altered. (See also
        * vedcompileable.)

vednotabs -> bool                                             [variable]
bool -> vednotabs
        A boolean. If true, tabs are  converted to spaces when the  file
        is read in or written. Also pressing tab key causes spaces to be
        inserted. If false, tabs are preserved. (See also vedindentstep,
        vedhardtabs, vedreadintabs. HELP * vednotabs gives more detailed

vedpathname -> string                                         [variable]
string -> vedpathname
        A string holding the full pathname for the current file, set  up
        initially  from  vedcurrent.  If   vedcurrent  is  an   absolute
        pathname, then  vedpathname  is set  to  vedcurrent;  otherwise,
        vedpathname is current_directory prepended to vedcurrent.

        However  (as   described   in  REF * VEDPROCS,   Real-File   and
        Pseudo-File Buffers),  a  buffer  whose name  contains  a  space
        character is  interpreted  as a  'pseudo  file'. In  this  case,
        vedpathname is just set to the  name under which the buffer  was
        created (and vedcurrent is derived from this, see * vedcurrent).

vedpositionstack -> list                                      [variable]
list -> vedpositionstack
        A list of saved cursor positions which represents the stack used
        by the procedures vedpushkey and vedpopkey.

vedprocwait -> list                                           [variable]
list -> vedprocwait
        Contains a list  of suspended processes  waiting for  Ved-buffer
        device input  from the  current buffer.  (Each list  entry  is a
        vector containing the actual process record and some  associated

        vedprocswaiting returns true if this list contains at least  one
        live process (you  should always  use this  to test  vedprocwait
        non-empty,  because  some  of  the  entries  may  be  for   dead

        See Ved-Buffer Devices and Immediate Mode in REF * VEDPROCS  for
        more details.

vedscreenoffset -> int                                        [variable]
int -> vedscreenoffset
        For non-windowed Ved, the integer  line number on the screen  of
        the top of the current window (e.g. 0 for the top window, 12 for
        the bottom window).

        For windowed Ved (XVed), this is always 0.

vedstatic -> bool_or_int                                      [variable]
bool_or_int -> vedstatic
        Controls  the  mode  of  character  insertion  and  deletion  by
        vedcharinsert, vedchardelete, etc.

        If false (the default), characters are inserted into the current
        buffer line  by shifting  existing  text to  the right  (or  for
        deleting, shifting the text to the right leftwards to erase  the

        If true, or an integer, new characters simply overwrite existing
        text (and deleting simply blanks out character positions).

        When vedstatic  is  an  integer, its  bits  have  the  following
        additional meanings:

            Bit     Meaning
            ---     -------
             0      If set, prevents any character insertion or deletion
                    (calls to  vedcharinsert,  vedchardelete,  etc  will
                    produce the Ved error 'CHARACTER EDITING DISABLED').

             1      If  set,  use  an  invisible  text  cursor   (cursor
                    character `\s`)  rather  than  vedscreenstaticcursor
                    (which is  the default  when  vedstatic has  a  true
                    value). Only effective in XVed.

vedstatusline -> string                                       [variable]
string -> vedstatusline
        String holding complete status line.

vedwriteable -> bool                                          [variable]
bool -> vedwriteable
        A boolean which controls whether a file can be written to  disc.
        If false, Ved will not write the file. (See also vedchanged.)

vedwindowlength -> int                                        [variable]
int -> vedwindowlength
        The integer length of the current window in lines. This includes
        the status  line, so  the number  of actual  file lines  in  the
        window  is  vedwindowlength-1;   when  ved_on_status  is   true,
        vedwindowlength is set to 2 to maintain the same relationship.

vedwlinewidth                                                 [variable]
vedwlineoffset                                                [variable]
vedwcolumnoffset                                              [variable]
        These variables give positions/dimensions within the window that
        differ when on the status line and off it.

            is the width available for file lines; this is always

                vedscreenwidth - vedwcolumnoffset

            is the offset to the first file line on the window; this is
            0 when on the status line, and 1 when off it.

            is the offset to the first file character on the window;
            this is 10 when on the status line, and 1 when off it.

vvedbuffersize -> int                                         [variable]
int -> vvedbuffersize
        The integer  length in  lines of  the current  buffer (i.e.  the
        length of the current file).

vvedlinesize -> int                                           [variable]
int -> vvedlinesize
        Used size of current line. Don't alter. Set by vedsetlinesize.

vvedmarkhi -> int                                             [variable]
int -> vvedmarkhi
        The (integer) line number of the end of the marked range in  the
        current file.

vvedmarklo -> int                                             [variable]
int -> vvedmarklo
        The (integer) line number of  the beginning of the marked  range
        in the current file.

vvedmarkprops -> bool                                         [variable]
bool -> vvedmarkprops
        Controls visibility of marked ranges. If false, then changes  to
        marked ranges are not shown on the screen. Used with  procedures
        vedmarkpush and vedmarkpop.

vvedpromptchar -> char_or_false                               [variable]
char_or_false -> vvedpromptchar
        In documentation and  'immediate mode' files,  this variable  is
        set to contain  a 'prompt  marker space'  character (`\Sp`  as a
        Pop-11 character  constant). In  immediate  mode, it  is  output
        after the  prompt,  making  it possible  to  distinguish  actual
        prompts from normal text.

        When not false, various Ved procedures check for the presence of
        vvedpromptchar in a line, and prevent certain operations when it
        is found (e.g. stop insertion of text inside the prompt).

        (See also HELP * IM.)

wvedwindow -> window                                          [variable]
        In windowed Ved (i.e. XVed), the window structure of the current
        file, or false if it doesn't  have one. In ordinary Ved,  always

4  Variables Associated With Ved Search and Substitution

See REF * VEDSEARCH for more details of the following variables used  by
the Ved Search mechanism:

    * vedwrapped        * vedsafesubstitute
    * ved_search_state  * vvedfoundstring

5  Special Character Variables

The following variables contain special characters-with-attributes  used
by Ved to display the status line, marked range, etc; many of these have
Ved graphics  characters  as  their default  values  (see  Ved  Standard
Graphics Characters in REF * VEDPROCS).

You can use vedset chars ... endvedset to set any of these variables: in
this  case,  you   omit  the   vedscreen-  prefix  on   the  name.   See

5.1  General

vedscreencontrolmark -> char                                  [variable]
char -> vedscreencontrolmark
        Character used  to  show that  a  control or  other  unprintable
        character is at this place in the text.

        Default value is `\Go`, i.e. a 'degree' sign.

vedscreentrailspacemark -> char                               [variable]
char -> vedscreentrailspacemark
        Character used to show  that this place  in the text  contains a
        'trailing space' character (see Ved Special Space Characters  in
        REF * VEDPROCS).

        Default value is `\[b3]S`,  i.e. a bold S  in colour 3  (inverse
        video in monochrome).

vedscreennobreakspacemark -> char                             [variable]
char -> vedscreennobreakspacemark
        Character used to show  that this place  in the text  contains a
        'no-break space' character (see Ved Special Space Characters  in
        REF * VEDPROCS).

        Default value is `\s`, i.e. a space.

vedscreenpromptspacemark -> char                              [variable]
char -> vedscreenpromptspacemark
        Character used to show  that this place  in the text  contains a
        'prompt-marker  space'   character   (see  Ved   Special   Space
        Characters in REF * VEDPROCS).

        Default value is `\s`, i.e. a space.

vedscreenformatspacemark -> char                              [variable]
char -> vedscreenformatspacemark
        Character used to show  that this place  in the text  contains a
        'format-control  space'   character  (see   Ved  Special   Space
        Characters in REF * VEDPROCS).

        Default value is `\s`, i.e. a space.

vedscreenmoremark -> char                                     [variable]
char -> vedscreenmoremark
        Character used for to indicate that there is more text past  the
        end of the line on the screen.

        Default value is `\G|`, i.e. a vertical line.

vedscreenrangemark -> char                                    [variable]
char -> vedscreenrangemark
        Character used  to  "mark"  range  of  lines  by  vedmarklo  and

        Default value is `\[b2]\G|`, i.e. a bold vertical line in colour

vedscreencursorlinemark -> char                               [variable]
char -> vedscreencursorlinemark
        Character put at left of current line when the cursor is on  the
        status line.

        Default value  is `\[b2]\G-`,  i.e. a  bold horizontal  line  in
        colour 2.

vedscreencursorlinerangemark -> char                          [variable]
char -> vedscreencursorlinerangemark
        Character put at left  of current line if  in marked range  when
        cursor is on status line  (should therefore be a combination  of
        vedscreenrangemark and vedscreencursorlinemark).

        Default value is  `\[b2]\G+`, i.e. bold  crossed horizontal  and
        vertical lines in colour 2.

5.2  Status Line

vedscreenstatus_-_mark -> char                                [variable]
char -> vedscreenstatus_-_mark
        Character for horizontal line used  to pad the status line  (not
        used in XVed).

        Default value is `\G-`, i.e. a horizontal line.

vedscreenstatus_-|_mark -> char                               [variable]
char -> vedscreenstatus_-|_mark
        Character shown after  executing a command  on the status  line,
        and (except in XVed) before the line/column number.

        Default value is `\Grt`, i.e. a right-facing T-junction.

vedscreenstatus_|-_mark -> char                               [variable]
char -> vedscreenstatus_|-_mark
        Character used after line/column  number and before the  command
        section of the status line.

        Default value is `\Glt`, i.e. a left-facing T junction.

vedscreenstatusinputmark -> char                              [variable]
char -> vedscreenstatusinputmark
        Character     which      replaces      the      second-from-left
        vedscreenstatus_-_mark on the status line when there are one  or
        more immediate-mode  processes waiting  for  input on  a  buffer
        (i.e. when vedprocswaiting() is true).

        Default value is `\[f]I`, i.e. a flashing I.

vedscreenstatusnumattr -> char                                [variable]
char -> vedscreenstatusnumattr
        The attributes part of this character  is added to the line  (or
        column) number digits displayed on  the left of the status  line
        (the actual character part is ignored).

        When the  column  number  is  being  displayed  (that  is,  when
        vedstatusshowcols is true), `\[1]` is or'ed to the attributes to
        make the colour number odd.

        Default value is `\[b]`, i.e. bold in colour 0 (and thus  colour
        1 when vedstatusshowcols is true).

5.3  Cursors
Ved assigns these  variables to * vedscreencursoron  to change the  text
cursor in  different  contexts. (Although  whether  or not  it  actually
changes is implementation dependent. Currently, they are only  effective
in XVed. Note that the  XVed window resource * cursorColor controls  the
cursor colour when its character  attributes specify the normal  colour,
i.e. colour 0.)

vedscreennormalcursor -> char                                 [variable]
char -> vedscreennormalcursor
        Cursor set  by vedgetinput  when vedstatic  is false:  therefore
        controls the normal cursor displayed  by the Ved top-level  loop
        when not in static mode.

        Default is `O`, i.e. a rectangular block.

        (Note that vedgetinput will  not assign to the  cursor if it  is
        currently turned off, i.e. vedscreencursoron is false.)

vedscreenstaticcursor -> char                                 [variable]
char -> vedscreenstaticcursor
        Cursor set  by vedgetinput  when  vedstatic is  true:  therefore
        controls the normal cursor displayed  by the Ved top-level  loop
        in static mode.

        Default is `_`, i.e. an underscore-style cursor.

        (Note that vedgetinput will  not assign to the  cursor if it  is
        currently turned off, i.e. vedscreencursoron is false.)

vedscreeninasciicursor -> char                                [variable]
char -> vedscreeninasciicursor
        Cursor  set  by  vedinascii;   therefore  controls  the   cursor
        displayed by ved_get_reply, search and substitute, etc.

        Default is `\[f]I`, i.e. a flashing I-beam.

--- C.all/ref/vedvars
--- Copyright University of Sussex 2009. All rights reserved.