 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 ;; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
 ;; License for more details.
-;;100 731 439 3
+;;
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; see the file COPYING.  If not, write to the
 ;; Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 ;; -----------------------------------------------------------------------
 
-(setq debug-on-error nil)
+(setq debug-on-error t)
+(setq use-package-verbose t)
 (defvar ska-init-verbose nil)
 
 (defmacro ska-init-message (&rest args)

                           (point)))))

;; f4 fuer kill-buffer ist ja nett, aber oft brauche ich auch
;; killbuffer und schliess window (auf shift f4...)
(defun ska-kill-this-window ()
  "Kill buffer in current window and delete window after that."
  (interactive)

    )
)

;; This defun is slightly different from the others since it works for
;; two major modes. Therefore the map to use is passed
(defun ska-c-common-mode-keys (map)
  "Set my personal keys for C and C++. 
Argument MAP is c-mode-map or c++-mode-map."
  (message "Setting keys for common c mode.")
  (define-key map '[(meta tab)]               'hippie-expand)
  (define-key map '[(control b) (control a)]  'ska-edit-automake-file)
  (define-key map '[(control b) (control b)]  'compile)
  (define-key map '[(control b) (control m)]  'manual-entry)
  ;; macros, templates, skeletons:
  (define-key map '[(control b) (m) (f) (f)]  'ska-skel-c-fflush)
  (define-key map '[(control b) (m) (f) (p)]  'ska-skel-c-fprintf)
  (define-key map '[(control b) (m) (i)]      'ska-skel-c-include)
  (define-key map '[(control b) (m) (m)]      'ska-skel-c-main)
  (define-key map '[(control b) (m) (c)]      'ska-skel-c-comment)
  (define-key map '[(control b) (m) (n)]      'ska-skel-c-printf-newline)
  (define-key map '[(control b) (m) (p)]      'ska-skel-c-printf)
  (define-key map '[(control b) (m) (P)]      'ska-skel-c-printf-flush)
  (define-key map '[(control b) (m) (l) (w)]  'ska-skel-c-loop-while)
  )

(defun ska-c++-mode-keys ()
  "Set my personal keys for C++ mode."
  (local-set-key '[(control b) (m) (c)]     'ska-skel-cc-class)
  (local-set-key '[(control b) return]      'ska-skel-cc-endl)
  (local-set-key '[(control b) (m) (l) (f)] 'ska-skel-cc-loop-for)
  )
(defun ska-c-mode-keys ()
  "Set my personal keys for plain C mode."
  (local-set-key '[(control b) (m) (c)]     'ska-skel-c-comment)
  (local-set-key '[(control b) return]      'ska-skel-cc-endl)
  (local-set-key '[(control b) (m) (l) (f)] 'ska-skel-c-loop-for)
  )

(add-hook 'c++-mode-hook
          '(lambda ()
             ;; my keybindings
             (ska-c-common-mode-keys c++-mode-map)
             (ska-c++-mode-keys)
             ))
