#108 Enable utop-command to be buffer-local

This commit is contained in:
Mads Hartmann Jensen 2014-11-04 17:44:28 +01:00
parent 064d874e61
commit 137151cca9
1 changed files with 8 additions and 4 deletions

View File

@ -1229,10 +1229,14 @@ Special keys for utop:
(utop-query-arguments)
;; Create the buffer
(setq buf (get-buffer-create utop-buffer-name))
;; Jump to the buffer
(pop-to-buffer buf)
;; Put it in utop mode
(with-current-buffer buf (utop-mode))))
;; Jump to the buffer - If utop-command is used as a
;; buffer-local variable we pass the value along to the utop
;; buffer.
(let ((cmd utop-command))
(pop-to-buffer buf)
(setq utop-command cmd)
;; Put it in utop mode
(with-current-buffer buf (utop-mode)))))
buf))
(provide 'utop)