summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2017-11-22 04:01:45 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2017-11-22 04:01:45 +0100
commit3cac7572f286c69de2b5cac626e1baca4af593a9 (patch)
tree630a38bad3b1b09ca215aaf724baed6abfda708c /elisp
parentc3bc0998fff7da8eb78532bfd0c22af693775dc0 (diff)
downloadgeiser-guile-3cac7572f286c69de2b5cac626e1baca4af593a9.tar.gz
geiser-guile-3cac7572f286c69de2b5cac626e1baca4af593a9.tar.bz2
Theoretically unnecessary save-excursion
For some reason, one of our users is experiencing point jumps when calling `geiser-set-scheme'. A save-excursion is all that's needed, even though it *shouldn't* be needed in the first place.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-mode.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index 229c3ea..9a28b02 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -238,12 +238,13 @@ With prefix, recursively macro-expand the resulting expression."
(defun geiser-set-scheme ()
"Associates current buffer with a given Scheme implementation."
(interactive)
- (geiser-syntax--remove-kws)
- (let ((impl (geiser-impl--read-impl)))
- (geiser-impl--set-buffer-implementation impl)
- (geiser-repl--set-up-repl impl)
- (geiser-syntax--add-kws)
- (geiser-syntax--fontify)))
+ (save-excursion
+ (geiser-syntax--remove-kws)
+ (let ((impl (geiser-impl--read-impl)))
+ (geiser-impl--set-buffer-implementation impl)
+ (geiser-repl--set-up-repl impl)
+ (geiser-syntax--add-kws)
+ (geiser-syntax--fontify))))
(defun geiser-mode-switch-to-repl (arg)
"Switches to Geiser REPL.