Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some racket support #488

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions le-racket.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
;;; le-racket.el --- lispy support for Racket. -*- lexical-binding: t -*-

;; Copyright (C) 2014-2015 Oleh Krehel

;; This file is not part of GNU Emacs

;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; For a full copy of the GNU General Public License
;; see <http://www.gnu.org/licenses/>.

;;; Commentary:
;;

;;; Code:

(eval-and-compile
(require 'racket-mode nil t))

(declare-function racket-lispy-visit-symbol-definition "racket-edit")


(defun lispy-goto-symbol-racket (symbol)
(racket-lispy-visit-symbol-definition symbol))

(provide 'le-racket)

;;; le-racket.el ends here
3 changes: 3 additions & 0 deletions lispy.el
Original file line number Diff line number Diff line change
Expand Up @@ -2037,6 +2037,8 @@ When the region is active, toggle a ~ at the start of the region."
(inferior-emacs-lisp-mode
(setq this-command 'ielm-return)
(ielm-return))
(racket-repl-mode
(racket-repl-submit))
(t
(if (and (not (lispy--in-string-or-comment-p))
(if (memq major-mode lispy-clojure-modes)
Expand Down Expand Up @@ -4154,6 +4156,7 @@ Sexp is obtained by exiting list ARG times."
'((clojure-mode lispy-goto-symbol-clojure le-clojure)
(clojurescript-mode lispy-goto-symbol-clojurescript le-clojure)
(scheme-mode lispy-goto-symbol-scheme le-scheme)
(racket-mode lispy-goto-symbol-racket le-racket)
(lisp-mode lispy-goto-symbol-lisp le-lisp)
(python-mode lispy-goto-symbol-python le-python))
"An alist of `major-mode' to function for jumping to symbol.
Expand Down