Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. (defun test-mode (command output-file)
  2. "Test this code in a buffer."
  3. (setq old-buffer (current-buffer))
  4. (interactive
  5. (list (read-shell-command "shell command:" nil nil)
  6. (read-file-name "file name:")))
  7. (start-process-shell-command command "test-mode-process" command)
  8. (find-file-other-window output-file)
  9. (revert-buffer t t t)
  10. (setq buffer-read-only t)
  11. (other-window 1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement