help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

recompile


From: lode leroy
Subject: recompile
Date: Wed, 13 Mar 2013 16:17:37 +0100

I want to define a keyboard macro that does the following:
copy the current line, do a few search-and-replace operations and run it in a shell...
I haven't done anything non-trivial in elisp, so I need some help...

something along the lines of:

(defun recompile-current-line
  (beginning-of-line)
  (set-mark-command)
  (end-of-line)
  (copy-region-as-kill)
  (shell-command
   (replace-regexp "^" "cd ~/build && "
    current-kill)))

can someone give some advice on how to implement this?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]