about summary refs log tree commit diff stats
path: root/lisp/acdw-lisp.el
blob: 8f551c9603adc54ce543191c6e2e26666170a98e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
;;; acdw-lisp.el -*- lexical-binding: t; coding: utf-8-unix -*-
;;
;; Extras for Lisp modes.

(defvar lispy-modes '(emacs-lisp-mode
                      eval-expression-minibuffer
                      ielm-mode
                      lisp-mode
                      lisp-interaction-mode
                      scheme-mode
                      slime-repl-mode
                      sly-mrepl-mode)
  "List of modes that are lisp-like enough to hook packages into.")

(defun acdw/eval-region-or-buffer ()
  (interactive)
  (if (region-active-p)
      (let ((begin (region-beginning))
            (end (region-end)))
        (with-message (format "Evaluating %S -> %S" begin end)
          (eval-region begin end)))
    (with-message "Evaluating buffer"
      (eval-buffer))))

(provide 'acdw-lisp)