2017-04-29 03:00:03 +00:00
|
|
|
;;; funcs.el --- ESS Layer functions File
|
|
|
|
;;
|
2018-01-04 07:00:25 +00:00
|
|
|
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
2017-04-29 03:00:03 +00:00
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
|
|
|
(defun spacemacs/ess-start-repl ()
|
|
|
|
"Start a REPL corresponding to the ess-language of the current buffer."
|
|
|
|
(interactive)
|
|
|
|
(cond
|
|
|
|
((string= "S" ess-language) (call-interactively 'R))
|
|
|
|
((string= "STA" ess-language) (call-interactively 'stata))
|
2017-11-27 10:56:01 +00:00
|
|
|
((string= "SAS" ess-language) (call-interactively 'SAS))
|
|
|
|
((string= "julia" ess-language) (call-interactively 'julia))))
|
2017-04-29 03:00:03 +00:00
|
|
|
|
|
|
|
(defun spacemacs//ess-fix-read-only-inferior-ess-mode ()
|
|
|
|
"Fixes a bug when `comint-prompt-read-only' in non-nil.
|
|
|
|
See https://github.com/emacs-ess/ESS/issues/300"
|
|
|
|
(setq-local comint-use-prompt-regexp nil)
|
|
|
|
(setq-local inhibit-field-text-motion nil))
|