From fbcee4c7e066a58b8332485d886aa09e6b8ba41f 2014-08-23 12:53:03 From: Sergey Pashinin Date: 2014-08-23 12:53:03 Subject: [PATCH] Moved wg-fill-keymap --- diff --git a/src/workgroups-keys.el b/src/workgroups-keys.el index bfa5e19bc7e9877feae96def261844a575a74efb..77001219ac0a8afd38c96d0738a27e96b07bb01c 100644 --- a/src/workgroups-keys.el +++ b/src/workgroups-keys.el @@ -16,6 +16,13 @@ off and then on again to take effect." (defvar workgroups-mode-map nil "Workgroups Mode's keymap.") +(defun wg-fill-keymap (keymap &rest binds) + "Return KEYMAP after defining in it all keybindings in BINDS." + (while binds + (define-key keymap (car binds) (cadr binds)) + (setq binds (cddr binds))) + keymap) + (defvar wg-prefixed-map (wg-fill-keymap (make-sparse-keymap) diff --git a/src/workgroups-utils-basic.el b/src/workgroups-utils-basic.el index e9c0698e4ffa1b20ee4753f5f6830c412342a218..52915e0286e229f0dfcb7ffba02c05b248ad301e 100644 --- a/src/workgroups-utils-basic.el +++ b/src/workgroups-utils-basic.el @@ -445,22 +445,12 @@ the cadr as the accessor function." ;;; misc - -(defun wg-fill-keymap (keymap &rest binds) - "Return KEYMAP after defining in it all keybindings in BINDS." - (while binds - (define-key keymap (car binds) (cadr binds)) - (setq binds (cddr binds))) - keymap) - (defun wg-add-or-remove-hooks (remove &rest pairs) "Add FUNCTION to or remove it from HOOK, depending on REMOVE." (dolist (pair (wg-partition pairs 2)) (funcall (if remove 'remove-hook 'add-hook) (car pair) (cadr pair)))) - - (defmacro wg-set-parameter (place parameter value) "Set PARAMETER to VALUE at PLACE. This needs to be a macro to allow specification of a setf'able place."