(define-key esc-map "!" 'shell-command)
(define-key esc-map "|" 'shell-command-on-region)
-;; This is an experiment--make up and down arrows do history.
-(define-key minibuffer-local-map [up] 'previous-history-element)
-(define-key minibuffer-local-map [down] 'next-history-element)
-(define-key minibuffer-local-ns-map [up] 'previous-history-element)
-(define-key minibuffer-local-ns-map [down] 'next-history-element)
-(define-key minibuffer-local-completion-map [up] 'previous-history-element)
-(define-key minibuffer-local-completion-map [down] 'next-history-element)
-(define-key minibuffer-local-must-match-map [up] 'previous-history-element)
-(define-key minibuffer-local-must-match-map [down] 'next-history-element)
+(let ((map minibuffer-local-map))
+ (define-key map "\en" 'next-history-element)
+ (define-key map [next] 'next-history-element)
+ (define-key map [down] 'next-history-element)
+ (define-key map "\ep" 'previous-history-element)
+ (define-key map [prior] 'previous-history-element)
+ (define-key map [up] 'previous-history-element)
+ (define-key map "\es" 'next-matching-history-element)
+ (define-key map "\er" 'previous-matching-history-element))
(define-key global-map "\C-u" 'universal-argument)
(let ((i ?0))