-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflex-compile.el
86 lines (69 loc) · 2.94 KB
/
flex-compile.el
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
;;; flex-compile.el --- Run, evaluate and compile across many languages -*- lexical-binding: t; -*-
;; Copyright (C) 2015 - 2024 Paul Landes
;; Version: 1.5
;; Author: Paul Landes
;; Maintainer: Paul Landes
;; Keywords: compilation integration processes
;; URL: https://github.com/plandes/flex-compile
;; Package-Requires: ((emacs "26.1") (dash "2.17.0") (buffer-manage "1.1"))
;; This file is not part of GNU Emacs.
;; This program 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 2, 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.
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; Run, evaluate and compile functionality for a variety of different languages
;; and modes. The specific "compilation" method is different across each
;; add-on library. For example, for ESS and Clojure you can evaluate a
;; specific file and/or evaluate a specfic expression via a REPL. For running
;; a script or starting a `make' an async process is started.
;;
;; For more information see https://github.com/plandes/flex-compile
;;; Code:
(require 'flex-compile-manage)
(require 'flex-compile-script)
(require 'flex-compile-make)
(require 'flex-compile-command)
(require 'flex-compile-choice-program)
(require 'flex-compile-org-export)
(require 'flex-compile-xml-validate)
(require 'flex-compile-python)
(require 'flex-compile-clojure)
(require 'flex-compile-lisp)
(require 'flex-compile-ess)
(require 'flex-compile-comint)
(require 'flex-compile-cli)
(require 'flex-compiler)
(defun flex-compile-key-bindings ()
"Bind keys globally to flex compiler actions.
Note: this clobbers the following bindings:
`mark-page'
`delete-blank-lines'.
This binds the following:
- C-x C-p: `flex-compiler-do-activate'
- C-x C-u: `flex-compiler-do-compile'
- C-x C-y: `flex-compiler-do-clean'
- C-x C-i: `flex-compiler-do-run-or-set-config'
- C-x C-o: `flex-compiler-do-eval'"
;; switch compiler; clobbers `mark-page'
(global-set-key "\C-x\C-p" 'flex-compiler-do-activate)
(global-set-key "\C-x\C-u" 'flex-compiler-do-compile)
(global-set-key "\C-x\C-y" 'flex-compiler-do-clean)
(global-set-key "\C-x\C-i" 'flex-compiler-do-run-or-set-config)
;; clobbers `delete-blank-lines'
(global-set-key "\C-x\C-o" 'flex-compiler-do-eval))
(defun flex-compile-init ()
"Initialize the flex-compile system."
(flex-compiler-config-load)
(flex-compiler-do-activate "disable"))
(flex-compile-init)
(provide 'flex-compile)
;;; flex-compile.el ends here