Commit cc06be90 authored by Stefan Kangas's avatar Stefan Kangas
Browse files

* lisp/bs.el (bs-mode-map): Prefer defvar-keymap.

parent 18d412a5
...@@ -434,58 +434,61 @@ Used internally, only.") ...@@ -434,58 +434,61 @@ Used internally, only.")
(defvar bs--marked-buffers nil (defvar bs--marked-buffers nil
"Currently marked buffers in Buffer Selection Menu.") "Currently marked buffers in Buffer Selection Menu.")
(defvar bs-mode-map (defvar-keymap bs-mode-map
(let ((map (make-sparse-keymap))) :doc "Keymap of `bs-mode'."
(define-key map " " 'bs-select) "SPC" #'bs-select
(define-key map "f" 'bs-select) "f" #'bs-select
(define-key map "v" 'bs-view) "v" #'bs-view
(define-key map "!" 'bs-select-in-one-window) "!" #'bs-select-in-one-window
(define-key map [mouse-2] 'bs-mouse-select) "F" #'bs-select-other-frame
(define-key map "F" 'bs-select-other-frame) "1" #'digit-argument
(let ((key ?1)) "2" #'digit-argument
(while (<= key ?9) "3" #'digit-argument
(define-key map (char-to-string key) 'digit-argument) "4" #'digit-argument
(setq key (1+ key)))) "5" #'digit-argument
(define-key map "-" 'negative-argument) "6" #'digit-argument
(define-key map "\e-" 'negative-argument) "7" #'digit-argument
(define-key map "o" 'bs-select-other-window) "8" #'digit-argument
(define-key map "\C-o" 'bs-tmp-select-other-window) "9" #'digit-argument
(define-key map [mouse-3] 'bs-mouse-select-other-frame) "-" #'negative-argument
(define-key map [up] 'bs-up) "ESC -" #'negative-argument
(define-key map "n" 'bs-down) "o" #'bs-select-other-window
(define-key map "p" 'bs-up) "C-o" #'bs-tmp-select-other-window
(define-key map [down] 'bs-down) "<up>" #'bs-up
(define-key map "\C-m" 'bs-select) "n" #'bs-down
(define-key map "b" 'bs-bury-buffer) "p" #'bs-up
(define-key map "s" 'bs-save) "<down>" #'bs-down
(define-key map "S" 'bs-show-sorted) "C-m" #'bs-select
(define-key map "a" 'bs-toggle-show-all) "b" #'bs-bury-buffer
(define-key map "d" 'bs-delete) "s" #'bs-save
(define-key map "\C-d" 'bs-delete-backward) "S" #'bs-show-sorted
(define-key map "k" 'bs-delete) "a" #'bs-toggle-show-all
(define-key map "g" 'bs-refresh) "d" #'bs-delete
(define-key map "C" 'bs-set-configuration-and-refresh) "C-d" #'bs-delete-backward
(define-key map "c" 'bs-select-next-configuration) "k" #'bs-delete
(define-key map "q" 'bs-kill) "g" #'bs-refresh
;; (define-key map "z" 'bs-kill) "C" #'bs-set-configuration-and-refresh
(define-key map "\C-c\C-c" 'bs-kill) "c" #'bs-select-next-configuration
(define-key map "\C-g" 'bs-abort) "q" #'bs-kill
(define-key map "\C-]" 'bs-abort) ;; "z" #'bs-kill
(define-key map "%" 'bs-toggle-readonly) "C-c C-c" #'bs-kill
(define-key map "~" 'bs-clear-modified) "C-g" #'bs-abort
(define-key map "M" 'bs-toggle-current-to-show) "C-]" #'bs-abort
(define-key map "+" 'bs-set-current-buffer-to-show-always) "%" #'bs-toggle-readonly
;;(define-key map "-" 'bs-set-current-buffer-to-show-never) "~" #'bs-clear-modified
(define-key map "t" 'bs-visit-tags-table) "M" #'bs-toggle-current-to-show
(define-key map "m" 'bs-mark-current) "+" #'bs-set-current-buffer-to-show-always
(define-key map "u" 'bs-unmark-current) ;; "-" #'bs-set-current-buffer-to-show-never
(define-key map "U" 'bs-unmark-all) "t" #'bs-visit-tags-table
(define-key map "\177" 'bs-unmark-previous) "m" #'bs-mark-current
(define-key map ">" 'scroll-right) "u" #'bs-unmark-current
(define-key map "<" 'scroll-left) "U" #'bs-unmark-all
(define-key map "?" 'bs-help) "DEL" #'bs-unmark-previous
map) ">" #'scroll-right
"Keymap of `bs-mode'.") "<" #'scroll-left
"?" #'bs-help
"<mouse-2>" #'bs-mouse-select
"<mouse-3>" #'bs-mouse-select-other-frame)
;; ---------------------------------------------------------------------- ;; ----------------------------------------------------------------------
;; Functions ;; Functions
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment