Changeset - fbcee4c7e066
[Not reviewed]
0 2 0
Sergey Pashinin - 11 years ago 2014-08-23 12:53:03
sergey@pashinin.com
Moved wg-fill-keymap
2 files changed with 7 insertions and 10 deletions:
0 comments (0 inline, 0 general)
src/workgroups-keys.el
Show inline comments
 
@@ -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)
src/workgroups-utils-basic.el
Show inline comments
 
@@ -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."
0 comments (0 inline, 0 general)