;; -*-emacs-lisp-*- ;; ;; Emacs startup file for the Debian GNU/Linux ess package ;; ;; Originally contributed by Nils Naumann ;; Modified by Dirk Eddelbuettel ;; Adapted for dh-make by Jim Van Zandt ;;Set up emacs-ess for Emacs with other things we like at KU. ;;;;; ;;;;;; This file is automatically loaded by emacs's site-start.el ;;;;;; when you start a new emacs session. ;;; (setq use-file-dialog nil) (require 'pc-select) (pc-selection-mode) (custom-set-variables '(cua-mode t nil (cua-base)) '(show-paren-mode t) '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify))) '(transient-mark-mode t)) ;;; (setq inferior-ess-own-frame t) (setq inferior-ess-same-window nil) ;;; ;;;;;create a new frame for each help instance ;;; (setq ess-help-own-frame t) ;;;;;If you want all help ;;;;; buffers to go into one frame do: ;;; (setq ess-help-own-frame 'one) (setq ess-ask-for-ess-directory nil) (setq ess-local-process-name "R") (setq split-window-preferred-function nil) (setq ansi-color-for-comint-mode 'filter) (setq comint-prompt-read-only t) (setq comint-scroll-to-bottom-on-input t) (setq comint-scroll-to-bottom-on-output t) (setq comint-move-point-for-output t) ;;http://www.emacswiki.org/cgi-bin/wiki/EmacsSpeaksStatistics ;;(defun my-ess-start-R () ;; (interactive) ;; (if (not (member "*R*" (mapcar (function buffer-name) (buffer-list)))) ;; (progn ;; (delete-other-windows) ;; (setq w1 (selected-window)) ;; (setq w1name (buffer-name)) ;; (setq w2 (split-window w1)) ;; (R) ;; (set-window-buffer w2 "*R*") ;; (set-window-buffer w1 w1name)))) (defun my-ess-eval () (interactive) ;; (my-ess-start-R) (if (and transient-mark-mode mark-active) (call-interactively 'ess-eval-region) (call-interactively 'ess-eval-line-and-step))) (add-hook 'ess-mode-hook '(lambda() (local-set-key [(shift return)] 'my-ess-eval))) ;; http://fuhm.livejournal.com/ ;; This hack removes the really annoying splash screen that emacs22 ;; now displays by default, even when you're trying to edit a buffer. ;; ;; While there is the variable inhibit-splash-screen, that only lets ;; you inhibit it *always*, which I don't really want to do in site ;; configuration. This patch causes it to still be shown when no ;; buffers were specified on the command-line, like emacs used to do, ;; before RMS forced it to be made annoying. ;; ;; This works because this function is called whenever a filename is ;; specified on the command line, which is almost exactly when I want ;; to inhibit the splashscreen. (it also catches a couple other cases ;; like -script, -load, and -L, but that doesn't really matter). ;; --jknight (defadvice command-line-normalize-file-name (before kill-stupid-startup-screen activate) (setq inhibit-startup-screen t))