[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdesdk/scripts/kde-emacs
From:       David Faure <faure () kde ! org>
Date:       2011-12-19 18:22:49
Message-ID: 20111219182249.F337FAC881 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1269385 by dfaure:

Provide option to use the qtcreator shortcuts in xemacs, for people like me who \
switch often between both.


 M  +23 -4     kde-emacs-bindings.el  
 M  +5 -0      kde-emacs-vars.el  


--- trunk/KDE/kdesdk/scripts/kde-emacs/kde-emacs-bindings.el #1269384:1269385
@@ -79,7 +79,7 @@
 ;; Some example bindings, feel free to customize :)
 (define-key global-map [(meta up)] 'scroll-other-up)
 (define-key global-map [(meta down)] 'scroll-other-down)
-(define-key global-map [(control j)] 'goto-line)
+(global-set-key [(control j)] 'goto-line)
 (global-set-key [(control %)] 'match-paren) ;;for all buffers :)
 
 (if (featurep 'igrep)
@@ -118,13 +118,30 @@
   )
 
 (define-key global-map [(shift button3)] 'mouse-function-menu)
+(if kde-emacs-newline-semicolon
+    (define-key c++-mode-map "\;" 'insert-semicolon))
+
+(if kde-emacs-use-qtcreator-shortcuts
+  (progn
+    ;(define-key global-map [(shift f4)] 'makeclean)
+    (define-key global-map [(control b)] 'make)
+    (define-key global-map [(control B)] 'makeinstall)
+    ;(define-key global-map [(shift f5)] 'makeinstallexec) ; TODO replace with \
run-current-program +    (define-key global-map [(shift f6)] 'makethisfile)
+    (define-key c++-mode-map [(f4)] 'kde-switch-cpp-h)
+    (define-key c-mode-map [(f4)] 'kde-switch-cpp-h)
+    (define-key c++-mode-map [(shift f2)] 'switch-to-function-def)
+    (define-key c-mode-map [(shift f2)] 'switch-to-function-def)
+    (define-key c++-mode-map [(control shift f2)] 'agulbra-make-member)
+    (define-key c-mode-map [(control shift f2)] 'agulbra-make-member)
+    (define-key global-map [(f6)] 'next-error)
+  )
+; else
+  (progn ; Historic default keybindings
 (define-key global-map [(shift f4)] 'makeclean)
 (define-key global-map [(f4)] 'make)
 (define-key global-map [(f5)] 'makeinstall)
 (define-key global-map [(shift f5)] 'makeinstallexec) ; TODO replace with \
                run-current-program
-(define-key global-map [(shift f6)] 'makethisfile)
-(if kde-emacs-newline-semicolon 
-    (define-key c++-mode-map "\;" 'insert-semicolon))
 (define-key c++-mode-map [(f6)] 'kde-switch-cpp-h)
 (define-key c-mode-map [(f6)] 'kde-switch-cpp-h)
 (define-key c++-mode-map [(f7)] 'switch-to-function-def)
@@ -132,6 +149,8 @@
 (define-key c++-mode-map [(f9)] 'agulbra-make-member)
 (define-key c-mode-map [(f9)] 'agulbra-make-member)
 (define-key global-map [(meta n)] 'next-error)
+  )
+)
 
 ; kde-emacs-headers:
 (define-key c++-mode-map [(f10)] 'kdab-insert-header)
--- trunk/KDE/kdesdk/scripts/kde-emacs/kde-emacs-vars.el #1269384:1269385
@@ -110,6 +110,11 @@
   :group 'kde-devel
   :type 'boolean)
 
+(defcustom kde-emacs-use-qtcreator-shortcuts nil
+  "Set this to true to get from kde-emacs-bindings.el the same shortcuts as Qt \
Creator." +  :group 'kde-devel
+  :type 'boolean)
+
 (defcustom kde-header-protection-parts-to-show 1
   "Set this variable to the number of parts from the file name you want to be used \
for the defined word in the   header-protection function..  E.g. setting this to 3 \
makes header-protection define KIG_MISC_NEWTYPE_H for a 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic