Annotation of 43BSDReno/contrib/emacs-18.55/kepteditor.com, revision 1.1

1.1     ! root        1: $ verify = f$verify (0)
        !             2: $ !
        !             3: $ ! Kept_Editor.COM
        !             4: $ ! Command file for use on VMS to spawn an Emacs process
        !             5: $ ! that can be suspended with C-z and will not go away
        !             6: $ ! when other programs are run.  This is the normal way
        !             7: $ ! for users to invoke Emacs on VMS; the command "emacs"
        !             8: $ ! is normally defined to execute this file.
        !             9: $ ! That definition, and other definitions used by it, are done by `emacs.com'.
        !            10: $ ! Users who want to use Emacs should have their `login.com' files
        !            11: $ ! execute `emacs.com', which is to be found in this directory.
        !            12: $ !
        !            13: $ ! Joe Kelsey
        !            14: $ ! FlexComm Corp.
        !            15: $ !
        !            16: $ ! September, 1985
        !            17: $ !
        !            18: $ ! Run or attach to an editor in a kept fork.
        !            19: $ !
        !            20: $ ! Modified by Marty Sasaki to define the job logical name
        !            21: $ ! "EMACS_FILE_NAME" with the value of the filename on the command
        !            22: $ ! line. Lisp code can then use the value of the logical to resume or
        !            23: $ ! to start editing in that file.
        !            24: $ !
        !            25: $ !
        !            26: $      edit            = ""
        !            27: $      name            = p1 + " " + f$trnlnm ( "TT" ) - ":"
        !            28: $      priv_list       = f$setprv ("NOWORLD, NOGROUP")
        !            29: $      pid             = 0
        !            30: $ 10$:
        !            31: $      proc            = f$getjpi ( f$pid ( pid ), "PRCNAM")
        !            32: $      if proc .eqs. name then -
        !            33: $              goto attach
        !            34: $      if pid .ne. 0 then -
        !            35: $              goto 10$
        !            36: $ spawn:
        !            37: $      args            = p2 + " " + p3 + " " + p4 + " " + p5 + " " + -
        !            38:                          p6 + " " + p7 + " " + p8
        !            39: $      priv_list       = f$setprv ( priv_list )
        !            40: $      write sys$error -
        !            41: "[Spawning a new Kept ''P1']"
        !            42: $      if p1 .nes. "TPU" then -
        !            43: $              goto check_emacs
        !            44: $      define/user     sys$input       sys$command
        !            45: $      spawn   /process="''NAME'" -
        !            46:                /nolog -
        !            47:                edit/'p1' 'args'
        !            48: $      goto quit
        !            49: $ check_emacs:
        !            50: $      if p1 .nes. "EMACS" then -
        !            51: $              goto un_kempt
        !            52: $      define/user     sys$input       sys$command
        !            53: $      spawn   /process="''NAME'" -
        !            54:                /nolog -
        !            55:                runemacs 'args'
        !            56: $      goto quit
        !            57: $ un_kempt:
        !            58: $ ! The editor is unruly - spawn a process and let the user deal with the
        !            59: $ ! editor himself.
        !            60: $      spawn   /process="''NAME'" -
        !            61:                /nolog
        !            62: $      goto quit
        !            63: $ attach:
        !            64: $      priv_list       = f$setprv ( priv_list )
        !            65: $      message_status = f$environment("message")
        !            66: $      set noon
        !            67: $      set message /nofacility/noidentification/noseverity/notext
        !            68: $      deassign/job emacs_file_name
        !            69: $      set on
        !            70: $      set message 'message_status
        !            71: $      if p2 .eqs. "" then goto no_logical
        !            72: $      temp = f$trnlnm("SYS$DISK") + f$directory() + p2
        !            73: $      temp = f$edit(temp,"lowercase")
        !            74: $      define/nolog/job emacs_file_name "''temp'"
        !            75: $ no_logical:
        !            76: $      write sys$error -
        !            77: "[Attaching to process ''NAME']"
        !            78: $      define/user     sys$input       sys$command
        !            79: $      attach "''NAME'"
        !            80: $ quit:
        !            81: $      write sys$error -
        !            82: "[Attached to DCL in directory ''F$TRNLNM("SYS$DISK")'''F$DIRECTORY()']"
        !            83: $      if verify then -
        !            84: $              set verify
        !            85: $      exit

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.