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

2538Re: [jasspa] Zap to chararcter macro

Expand Messages
  • Steven Phillips
    Feb 9, 2010
      This should do what you what, copy this into your user emf file...

      Steve

      ----- zap macro ----------------------
      define-macro zap
        !force set-variable #l0 @1
        !if &not $status
          set-variable #l0 @mc "Zap to char: "
        !elif &sub &len #l0 1
          ml-write "[Error: invalid argument, must be a single char]"
          !abort
        !endif
        set-mark
        !if &les @# 0
          !force !force &abs @# search-buffer "bM" #l0
        !else
          !force !force &abs @# search-buffer "M" #l0
        !endif
        !if &not $status
          ml-write &spr "[Search for '%s' failed]" #l0
          !abort
        !endif
        kill-region
      !emacro
      --------------- end -------------------

      neeraj wrote:
       

      Hi All
      I am new to jasspa esp its macro lang (new as in a week old). I love the editor its fast and small and its emacs.

      One thing I am missing dearly is the zap to character (Meta-z) in emacs. It should not be overly complicated to write one, I was wondering if anyone has hacked it already or has any pointers.

      Thanks
      neeraj

    • Show all 3 messages in this topic