From 303ccc28b1ecefbb1c69904d9eccfd960cb2bed6 Mon Sep 17 00:00:00 2001 From: Yonatan Offek Date: Fri, 24 Dec 2010 03:45:41 +0200 Subject: [PATCH] Workaround for emacs asking for kill-buffer confirmation. --- etc/las3r-mode.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/etc/las3r-mode.el b/etc/las3r-mode.el index cc0c96b..a10b568 100644 --- a/etc/las3r-mode.el +++ b/etc/las3r-mode.el @@ -136,18 +136,20 @@ if that value is non-nil." (interactive (list (point))) (save-excursion (backward-sexp) - (let ((src (buffer-substring-no-properties (point) p))) + (let* ((src (buffer-substring-no-properties (point) p)) + (oldbuf (current-buffer))) (let* ((proc (http-post "http://localhost:9876/push" `(("src" . ,(format "%s" src))) 'iso-8859-1)) (buf (process-buffer proc))) - (kill-buffer buf))))) + (switch-to-buffer oldbuf))))) (defun las3r-eval-buffer nil "Evaluate the code in the current buffer." (interactive) - (let ((src (buffer-string))) + (let* ((src (buffer-string)) + (oldbuf (current-buffer))) (let* ((proc (http-post "http://localhost:9876/push" `(("src" . ,(format "%s" src))) 'iso-8859-1)) (buf (process-buffer proc))) - (kill-buffer buf)))) + (switch-to-buffer oldbuf)))) (defun las3r-font-lock-def-at-point (point) "Find the position range between the top-most def* and the