diff options
author | 2006-12-15 04:57:36 +0100 | |
---|---|---|
committer | 2006-12-15 04:57:36 +0100 | |
commit | b63e546930fbadc142359d65d1664bf13ead66ff (patch) | |
tree | 84f5820c7758411a665388d68fc6878339ceb7d3 | |
parent | ebuild-mode-1.1 (diff) | |
download | ebuild-mode-b63e546930fbadc142359d65d1664bf13ead66ff.tar.gz ebuild-mode-b63e546930fbadc142359d65d1664bf13ead66ff.tar.bz2 ebuild-mode-b63e546930fbadc142359d65d1664bf13ead66ff.zip |
ebuild-mode-1.2ebuild-mode-1.2
Extracted from ebuild-mode-1.2.tar.gz and added retroactively.
-rw-r--r-- | ebuild-mode.el | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ebuild-mode.el b/ebuild-mode.el index 176a14b..6116d4c 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -94,6 +94,25 @@ (setq tab-width 4 indent-tabs-mode t)) +(defun ebuild-mode-run-command (command) + (let ((process-connection-type "t") + (buffer (format "*ebuild %s*" command))) + (start-process "ebuild-digest" buffer "env" "NOCOLOR=yes" "ebuild" (buffer-file-name) command) + (pop-to-buffer buffer))) + +(defmacro define-ebuild-mode-command (key command) + (let ((name (intern (format "ebuild-mode-command-%s" command)))) + `(progn + (defun ,name () + ,(format "Runs the ebuild %s command for the ebuild in the current buffer" command) + (interactive) + (ebuild-mode-run-command ,command)) + (define-key ebuild-mode-map ,key ',name)))) + +(define-ebuild-mode-command "\C-ced" "digest") +(define-ebuild-mode-command "\C-cef" "fetch") +(define-ebuild-mode-command "\C-ceu" "unpack") + ;; (add-to-list 'auto-mode-alist '("\\.ebuild\\'" . ebuild-mode)) ;; (add-to-list 'auto-mode-alist '("\\.eclass\\'" . ebuild-mode)) ;; (add-to-list 'auto-mode-alist '("\\.eselect\\'" . eselect-mode)) |