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

Re: [jasspa] Transpose Words

Expand Messages
  • Matt Gumm
    Thanks, I ll give it a try. Matt Gumm ________________________________ From: Jon Green To: jasspa@yahoogroups.com; Matt Gumm
    Message 1 of 3 , Sep 15, 2009
    • 0 Attachment
      Thanks, I'll give it a try.

      Matt Gumm


      From: Jon Green <jon@...>
      To: jasspa@yahoogroups.com; Matt Gumm <mattgumm@...>
      Sent: Tuesday, September 15, 2009 3:53:41 AM
      Subject: Re: [jasspa] Transpose Words

      On Tue 15/09/09  9:48 AM , "Matt Gumm" mattgumm@... sent:
      > Is there a way to execute the transpose-words function in JASSPA?
      > Thanks.
      >
      > Matt Gumm
      >    
      >
      >

      Afraid not. You would have to write a macro to do it.

      Here is a very quick and dirty transpose-words macro that does no checking as a starting point. Really this needs to have all of the checking in there to deal with start/end of buffer, line breaks etc. So use with care, but does deal with the very simple case of transposing words.

      ; transpose words
      define-macro transpose-words
          forward-word
          backward-word
          set-mark
          backward-word
          kill-region
          2 forward-word
          backward-word
          yank
          backward-word
      !emacro   

      To try it then cut and past into a buffer and execute-buffer to be able to run it.

      Regards
      Jon.

      ---- Message sent via KC WebMail - http://webmail.mistral.net/

    Your message has been successfully submitted and would be delivered to recipients shortly.