SHARE
TWEET

Untitled

a guest Oct 20th, 2017 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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))
RAW Paste Data
Top