| 340 | | (defvar mode-line-buffer-identification-keymap nil "\ |
|---|
| | 340 | (defvar mode-line-buffer-identification-keymap |
|---|
| | 341 | ;; Add menu of buffer operations to the buffer identification part |
|---|
| | 342 | ;; of the mode line.or header line. |
|---|
| | 343 | (let ((map (make-sparse-keymap))) |
|---|
| | 344 | ;; Bind down- events so that the global keymap won't ``shine |
|---|
| | 345 | ;; through''. |
|---|
| | 346 | (define-key map [mode-line mouse-1] 'mode-line-previous-buffer) |
|---|
| | 347 | (define-key map [header-line down-mouse-1] 'ignore) |
|---|
| | 348 | (define-key map [header-line mouse-1] 'mode-line-previous-buffer) |
|---|
| | 349 | (define-key map [mode-line mouse-3] 'mode-line-next-buffer) |
|---|
| | 350 | (define-key map [header-line down-mouse-3] 'ignore) |
|---|
| | 351 | (define-key map [header-line mouse-3] 'mode-line-next-buffer) |
|---|
| | 352 | map) "\ |
|---|
| 342 | | |
|---|
| 343 | | ;; Add menu of buffer operations to the buffer identification part |
|---|
| 344 | | ;; of the mode line.or header line. |
|---|
| 345 | | ; |
|---|
| 346 | | (let ((map (make-sparse-keymap))) |
|---|
| 347 | | ;; Bind down- events so that the global keymap won't ``shine |
|---|
| 348 | | ;; through''. |
|---|
| 349 | | (define-key map [mode-line mouse-1] 'mode-line-previous-buffer) |
|---|
| 350 | | (define-key map [header-line down-mouse-1] 'ignore) |
|---|
| 351 | | (define-key map [header-line mouse-1] 'mode-line-previous-buffer) |
|---|
| 352 | | (define-key map [header-line down-mouse-3] 'ignore) |
|---|
| 353 | | (define-key map [mode-line mouse-3] 'mode-line-next-buffer) |
|---|
| 354 | | (define-key map [header-line down-mouse-3] 'ignore) |
|---|
| 355 | | (define-key map [header-line mouse-3] 'mode-line-next-buffer) |
|---|
| 356 | | (setq mode-line-buffer-identification-keymap map)) |
|---|