;;; sclang-minor-mode.el --- IDE for working with SuperCollider -*- coding: utf-8; ;; ;; Copyright (c) 2007, Marije Baalman - nescivi ;;; License: ;;; 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 of the License, 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: ;; ;; sclang-minor-mode for use in help files ;;; Code: (require 'sclang-util) (require 'sclang-mode) (easy-mmode-define-minor-mode sclang-minor-mode "Toggle sclang-minor-mode. With no argument, this command toggles the mode. Non-null prefix argument turns on the mode. Null prefix argument turns off the mode. When sclang-minor-mode is enabled, you can use the key sequences \\\\[sclang-eval-region-or-line] or \\\\[sclang-eval-region] to eval sclang code." ;; The initial value. :init-value nil ;; The indicator for the mode line. :lighter " sclang" ;; The minor mode bindings. :keymap '(("\C-c\C-c" . sclang-eval-region-or-line) ("\C-c\C-d" . sclang-eval-region) ("\C-\M-x" . sclang-eval-defun) ("\C-c\C-h" . sclang-find-help) ("\C-\M-h" . sclang-goto-help-browser) ("\C-c\C-s" . sclang-main-stop) ("\C-c\C-k" . sclang-edit-dev-source))) (provide 'sclang-minor-mode) (easy-mmode-define-minor-mode sclang-help-minor-mode "Toggle sclang-minor-mode. With no argument, this command toggles the mode. Non-null prefix argument turns on the mode. Null prefix argument turns off the mode. When sclang-help-minor-mode is enabled, you can use the key sequences \\\\[sclang-eval-region-or-line] or \\\\[sclang-eval-region] to eval sclang code." ;; The initial value. :init-value nil ;; The indicator for the mode line. :lighter " sclang-help" ;; The minor mode bindings. :keymap '(("\C-c\C-c" . sclang-eval-region-or-line) ("\C-c\C-d" . sclang-eval-region) ("\C-\M-x" . sclang-eval-defun) ("\C-c\C-h" . sclang-find-help) ("\C-c\C-s" . sclang-main-stop) ("\C-c\C-v" . sclang-edit-html-help-file) ("E" . sclang-edit-help-code) ("\C-c\C-k" . sclang-edit-dev-source))) (provide 'sclang-help-minor-mode) ;; mode hooks (defun sclang-minor-hooks () "Sclang minor mode hooks." (sclang-init-document) (sclang-make-document)) (add-hook 'sclang-help-minor-mode-hook 'sclang-minor-hooks) (add-hook 'sclang-minor-mode-hook 'sclang-minor-hooks) ;;; sclang-minor-mode.el ends here