djcb/mu — pull request #93 by tarsius (2012-11-11 13:53:35+00:00)
Title: add various commands to replace anonymous lambas in keymaps 

I heavily customize keybindings using a tool based on org-mode tables (unreleased). When encountering a binding that is an anonymous lambda it shows that binding as `#` but it is impossible to bind another key.

To work around this I replace the lambda bindings before doing the actual customization. For mu4e that just takes to much code as shown below.

Would you please consider merging this branch which replaces the lambdas with named commands.

Note that I replaced
```
(lambda () (interactive) (goto-char (point-min)))
```
with `beginning-of-buffer` which should do the same and that the new scroll commands have the `mu4e-` prefix not `mu4e-view-` prefix but are still defined in `mu4e-views.el`. They are only used there but *could* be used elsewhere, actually they are not even mu4e specific.

```
(when (require 'mu4e nil t)
(let (def)
(setq def (lookup-key mu4e-headers-mode-map (naked "C--")))
(unless (symbolp def)
(fset 'mu4e-headers-split-view-resize- def)
(define-key mu4e-headers-mode-map (naked "C--")
'mu4e-headers-split-view-resize-)
(define-key mu4e-headers-mode-map (naked "C-kp-subtract")
'mu4e-headers-split-view-resize-)
(define-key mu4e-view-mode-map (naked "C--")
'mu4e-headers-split-view-resize-)
(define-key mu4e-view-mode-map (naked "C-kp-subtract")
'mu4e-headers-split-view-resize-))
(setq def (lookup-key mu4e-view-mode-map (naked "home")))
(unless (symbolp def)
(fset 'mu4e+goto-home def)
(define-key mu4e-view-mode-map (naked "home") 'mu4e+goto-home))
(setq def (lookup-key mu4e-view-mode-map (naked "end")))
(unless (symbolp def)
(fset 'mu4e+goto-end def)
(define-key mu4e-view-mode-map (naked "end") 'mu4e+goto-end))
(setq def (lookup-key mu4e-view-mode-map (naked "RET")))
(unless (symbolp def)
(fset 'mu4e+scroll-up+1 def)
(define-key mu4e-view-mode-map (naked "RET") 'mu4e+scroll-up+1))
(setq def (lookup-key mu4e-view-mode-map (naked "backspace")))
(unless (symbolp def)
(fset 'mu4e+scroll-up-1 def)
(define-key mu4e-view-mode-map (naked "backspace"))
'mu4e+scroll-up-1)))
```