Loading ...
Sorry, an error occurred while loading the content.

microemacs + tcl

Expand Messages
  • Schofield, Bryan (GE Trans)
    For giggles, I thought it would be fun to embed a tcl interpreter in ME so that I could write extensions in Tcl, which I find more friendly than emf. I ve
    Message 1 of 2 , May 20, 2005
    • 0 Attachment
      For giggles, I thought it would be fun to embed a tcl interpreter in ME so that I could write extensions in Tcl, which I find more friendly than emf. I've managed to get ME to initialize TCL and find and load "me.tcl", which presumable would do something useful one day. Right now, ME provides one new command in TCL, "me" which acts just like "execute-line", allowing tcl scripts to have crude access to the editor. For example, a tcl script might do this:

      proc tclIsFun {} {
      me {1 find-buffer *scratch*}
      me {1 insert-string "tcl is fun!"}
      }


      But now I'd like to be able to execute arbitrary tcl from within the editor or from other emf macros. For example:

      define-macro tcl-is-fun
      tcl "tclIsFun"
      !emacro


      I'm following the steps in efunc.h for adding a new command, but I don't really understand the cmdHash array. Could anyone help me?


      Thanks,
      -- bryan
    • Schofield, Bryan (GE Trans)
      woot, I got it! so nevermind :-P
      Message 2 of 2 , May 20, 2005
      • 0 Attachment
        woot, I got it! so nevermind :-P

        > -----Original Message-----
        > From: jasspa@yahoogroups.com
        > [mailto:jasspa@yahoogroups.com]On Behalf Of
        > Schofield, Bryan (GE Trans)
        > Sent: Friday, May 20, 2005 2:44 PM
        > To: jasspa@yahoogroups.com
        > Subject: [jasspa] microemacs + tcl
        >
        >
        > For giggles, I thought it would be fun to embed a tcl
        > interpreter in ME so that I could write extensions in Tcl,
        > which I find more friendly than emf. I've managed to get ME
        > to initialize TCL and find and load "me.tcl", which
        > presumable would do something useful one day. Right now, ME
        > provides one new command in TCL, "me" which acts just like
        > "execute-line", allowing tcl scripts to have crude access to
        > the editor. For example, a tcl script might do this:
        >
        > proc tclIsFun {} {
        > me {1 find-buffer *scratch*}
        > me {1 insert-string "tcl is fun!"}
        > }
        >
        >
        > But now I'd like to be able to execute arbitrary tcl from
        > within the editor or from other emf macros. For example:
        >
        > define-macro tcl-is-fun
        > tcl "tclIsFun"
        > !emacro
        >
        >
        > I'm following the steps in efunc.h for adding a new command,
        > but I don't really understand the cmdHash array. Could anyone help me?
        >
        >
        > Thanks,
        > -- bryan
        >
        >
        >
        > ______________________________________________________________
        > ____________
        >
        > This is an unmoderated list. JASSPA is not responsible for
        > the content of
        > any material posted to this list.
        >
        > To unsubscribe, send a mail message to
        >
        > mailto:jasspa-unsubscribe@yahoogroups.com
        >
        > or visit http://groups.yahoo.com/group/jasspa and
        > modify your account settings manually.
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.