From c18dbb6efe7b1182efe4f79b0b8b55ad3428aa4f Mon Sep 17 00:00:00 2001 From: Marije Baalman Date: Thu, 9 Apr 2009 20:53:47 +0000 Subject: [PATCH] added scel function for shortcut to open source file at development location git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@9037 a380766d-ff14-0410-b294-a243070f3f08 --- el/sclang-dev.el | 24 ++++++++++++++++++++++++ el/sclang-minor-mode.el | 2 ++ el/sclang-mode.el | 1 + 3 files changed, 27 insertions(+) create mode 100644 el/sclang-dev.el diff --git a/el/sclang-dev.el b/el/sclang-dev.el new file mode 100644 index 0000000..2903c38 --- /dev/null +++ b/el/sclang-dev.el @@ -0,0 +1,24 @@ +(sclang-set-command-handler + 'openDevSource + (lambda (file) + ) + ) + +(defun sclang-edit-dev-source () + "Edit the help file at the development location." +; (sclang-document-name . (prSetTitle (buffer-name))) + (interactive) + (sclang-perform-command 'openDevSource (buffer-file-name)) + ) + +;(defun sclang-open-dev-source (file) +; "Open the help file at the development location." +; (if (sclang-html-file-p file) +; (html-mode) +; ;; (find-file file) +; ) +; (if ( sclang-sc-file-p file ) +; (sclang-mode) +; ) +; ) + diff --git a/el/sclang-minor-mode.el b/el/sclang-minor-mode.el index d7745ad..d42e815 100644 --- a/el/sclang-minor-mode.el +++ b/el/sclang-minor-mode.el @@ -22,6 +22,7 @@ sclang code with the normal command C-c C-c and C-c C-x." ("\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) @@ -46,6 +47,7 @@ sclang code with the normal command C-c C-c and C-c C-x." ("\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) diff --git a/el/sclang-mode.el b/el/sclang-mode.el index 25b146f..0884d3e 100644 --- a/el/sclang-mode.el +++ b/el/sclang-mode.el @@ -132,6 +132,7 @@ (define-key map "\C-c\C-r" 'sclang-main-run) (define-key map "\C-c\C-s" 'sclang-main-stop) (define-key map "\C-c\C-p" 'sclang-show-server-panel) + (define-key map "\C-c\C-k" 'sclang-edit-dev-source) ;; electric characters (define-key map "}" 'sclang-electric-brace) (define-key map ")" 'sclang-electric-brace)