summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-09-11 22:46:10 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-09-11 22:46:10 +0200
commit4f99a8b10d863ff5933b207b152b969db9596d78 (patch)
tree9188802e13708fd88837210e08beae3836c06dd5 /elisp
parent74d2a0fd29254679b77148614fa8c91f0acb36de (diff)
downloadgeiser-4f99a8b10d863ff5933b207b152b969db9596d78.tar.gz
geiser-4f99a8b10d863ff5933b207b152b969db9596d78.tar.bz2
A better way of doing the above
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-base.el11
-rw-r--r--elisp/geiser-repl.el4
2 files changed, 11 insertions, 4 deletions
diff --git a/elisp/geiser-base.el b/elisp/geiser-base.el
index 868288c..4793616 100644
--- a/elisp/geiser-base.el
+++ b/elisp/geiser-base.el
@@ -1,6 +1,6 @@
;;; geiser-base.el --- shared bits
-;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -67,6 +67,15 @@
(insert str)
(put-text-property p (point) 'face face)))
+
+(defmacro geiser--save-msg (&rest body)
+ (let ((msg (make-symbol "msg")))
+ `(let ((,msg (current-message)))
+ ,@body
+ (message ,msg))))
+
+(put 'geiser--save-msg 'lisp-indent-function 0)
+
(provide 'geiser-base)
;;; geiser-base.el ends here
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 1530c01..e28428f 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -466,9 +466,7 @@ With a prefix argument, force exit by killing the scheme process."
geiser-repl-history-no-dups-p)
(setq geiser-eval--get-module-function 'geiser-repl--module-function)
(when geiser-repl-autodoc-p
- (let ((msg (current-message)))
- (geiser-autodoc-mode 1)
- (message msg)))
+ (geiser--save-msg (geiser-autodoc-mode 1)))
(setq geiser-autodoc--inhibit-function 'geiser-con--is-debugging)
(geiser-company--setup geiser-repl-company-p)
(setq geiser-smart-tab-mode-string "")