Replace lambda with clearer form

This commit is contained in:
Vasilij Schneidermann
2014-03-03 22:15:04 +01:00
parent 4a2c72b4f3
commit 6072b59896

View File

@ -126,7 +126,7 @@ If t, switching to the same window config as
"Insert ELEMENT in the list of window configs. "Insert ELEMENT in the list of window configs.
This function keeps the sortedness intact." This function keeps the sortedness intact."
(setq eyebrowse-window-configs (setq eyebrowse-window-configs
(-sort (lambda (a b) (< (car a) (car b))) (--sort (< (car it) (car other))
(cons element eyebrowse-window-configs)))) (cons element eyebrowse-window-configs))))
(defun eyebrowse-update-window-config-element (old-element new-element) (defun eyebrowse-update-window-config-element (old-element new-element)
@ -272,17 +272,16 @@ is detected, it will bind gt, gT, gc and zx, too."
(define-key map (kbd (s-concat "M-" (number-to-string n))) (define-key map (kbd (s-concat "M-" (number-to-string n)))
(lambda () (interactive) (lambda () (interactive)
(eyebrowse-switch-to-window-config n))))))) (eyebrowse-switch-to-window-config n)))))))
;;;###autoload ;;;###autoload
(define-minor-mode eyebrowse-mode (define-minor-mode eyebrowse-mode
"Toggle `eyebrowse-mode'. "Toggle `eyebrowse-mode'.
This global minor mode provides a set of keybindings for This global minor mode provides a set of keybindings for
switching window configurations. It tries mimicking the tab switching window configurations. It tries mimicking the tab
behaviour of `ranger`, a file manager." behaviour of `ranger`, a file manager."
:lighter eyebrowse-lighter :lighter eyebrowse-lighter
:keymap eyebrowse-mode-map :keymap eyebrowse-mode-map
:global t :global t
(if eyebrowse-mode (if eyebrowse-mode
(add-to-list 'mode-line-misc-info (add-to-list 'mode-line-misc-info
'(:eval (eyebrowse-update-mode-line)) t) '(:eval (eyebrowse-update-mode-line)) t)