2016-01-04 19:20:54 +00:00
|
|
|
;;; keybindings.el --- Spacemacs Base Layer key-bindings File
|
|
|
|
;;
|
2016-01-12 02:40:54 +00:00
|
|
|
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
|
2016-01-04 19:20:54 +00:00
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
|
|
|
;; describe functions ---------------------------------------------------------
|
|
|
|
(defmacro spacemacs||set-helm-key (keys func)
|
|
|
|
"Define a key bindings for FUNC using KEYS.
|
|
|
|
Ensure that helm is required before calling FUNC."
|
|
|
|
(let ((func-name (intern (format "spacemacs/%s" (symbol-name func)))))
|
|
|
|
`(progn
|
|
|
|
(defun ,func-name ()
|
|
|
|
,(format "Wrapper to ensure that `helm' is loaded before calling %s."
|
|
|
|
(symbol-name func))
|
|
|
|
(interactive)
|
|
|
|
(require 'helm)
|
|
|
|
(call-interactively ',func))
|
|
|
|
(spacemacs/set-leader-keys ,keys ',func-name))))
|
|
|
|
(spacemacs||set-helm-key "hL" helm-locate-library)
|
2016-01-09 15:04:07 +00:00
|
|
|
(spacemacs||set-helm-key "hdm" describe-mode)
|
2016-01-04 19:20:54 +00:00
|
|
|
;; search functions -----------------------------------------------------------
|
|
|
|
(spacemacs||set-helm-key "sww" helm-wikipedia-suggest)
|
|
|
|
(spacemacs||set-helm-key "swg" helm-google-suggest)
|