Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Emacs: only load Quack in Scheme mode.

  • Loading branch information...
commit 0bd426a83afab949f0e489e701e64cd385d0d54e 1 parent 29a86d0
@epatters authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 .emacs
View
8 .emacs
@@ -38,8 +38,9 @@
;; Racket/Scheme.
(require 'geiser-install)
-(require 'quack) ; Load quack *after* geiser.
-(setq quack-fontify-style 'emacs)
+(defun scheme-mode-quack-hook ()
+ (require 'quack)
+ (setq quack-fontify-style 'emacs))
(defun paredit-space-for-delimiter-predicates-scheme (endp delimiter)
"Do not automatically insert a space when a '#' precedes parentheses."
@@ -47,10 +48,13 @@
(cond ((eq (char-syntax delimiter) ?\()
(not (looking-back "#\\|#hash")))
(else t))))
+
(defun scheme-mode-paredit-hook ()
(enable-paredit-mode)
(add-to-list (make-local-variable 'paredit-space-for-delimiter-predicates)
'paredit-space-for-delimiter-predicates-scheme))
+
+(add-hook 'scheme-mode-hook 'scheme-mode-quack-hook)
(add-hook 'scheme-mode-hook 'scheme-mode-paredit-hook)
(add-hook 'geiser-repl-mode-hook 'scheme-mode-paredit-hook)
Please sign in to comment.
Something went wrong with that request. Please try again.