From bc59be820d6b9bddfc4617a8b0ed3fef3e36c8d5 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 15 Nov 2012 16:37:16 +0900 Subject: [PATCH] add func sed-in-place --- emacs.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emacs.el b/emacs.el index fefa82d..257c9e7 100644 --- a/emacs.el +++ b/emacs.el @@ -1871,6 +1871,17 @@ when SEC is nil, stop auto save if enabled." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; misc funcs +(defvar sed-in-place-history nil + "History of `sed-in-place'") + +(defun sed-in-place (command) + "sed in place"a + (interactive (list (read-shell-command "sed in place: " + "sed --in-place=.bak -e " + 'sed-in-place-history))) + (shell-command command + "*sed in place*")) + (defun dir-show (&optional dir) (interactive) (let ((bf (get-buffer-create "*dir show*"))