From 688d3b0ec21dccc9637ac063ce129d1a5338ebcc Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Wed, 26 Nov 2008 15:42:20 -0800 Subject: [PATCH] give the cheat buffer a name --- cheat.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cheat.el b/cheat.el index 0abef0f..37ccac2 100644 --- a/cheat.el +++ b/cheat.el @@ -135,7 +135,10 @@ The cheat can be saved with `cheat-save-current-buffer'." (defun cheat-command (&rest rest) "Run the cheat command with the given arguments, display the output." (interactive "sArguments for cheat: \n") - (shell-command (concat "cheat " (string-join " " rest)))) + (let* ((cmd (string-join " " rest)) + (buffer (get-buffer-create + (concat "*Cheat: " cmd "*")))) + (shell-command (concat "cheat " cmd) buffer))) (defun cheat-command-to-string (&rest rest) "Run the cheat command with the given arguments and return the output as a