Merge remote-tracking branch 'sourceforge/master'
[emacs-jabber.git] / jabber-keymap.el
blob6be8833c543cacf7221a43b91eaf87d8c6b91820
1 ;; jabber-keymap.el - common keymap for many modes
3 ;; Copyright (C) 2003, 2004, 2007, 2008 - Magnus Henoch - mange@freemail.hu
4 ;; Copyright (C) 2002, 2003, 2004 - tom berger - object@intelectronica.net
6 ;; This file is a part of jabber.el.
8 ;; This program is free software; you can redistribute it and/or modify
9 ;; it under the terms of the GNU General Public License as published by
10 ;; the Free Software Foundation; either version 2 of the License, or
11 ;; (at your option) any later version.
13 ;; This program is distributed in the hope that it will be useful,
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;; GNU General Public License for more details.
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with this program; if not, write to the Free Software
20 ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 ;; button.el was introduced in Emacs 22
24 (condition-case e
25 (require 'button)
26 (error nil))
28 (defvar jabber-common-keymap
29 (let ((map (make-sparse-keymap)))
30 (define-key map "\C-c\C-c" 'jabber-popup-chat-menu)
31 (define-key map "\C-c\C-r" 'jabber-popup-roster-menu)
32 (define-key map "\C-c\C-i" 'jabber-popup-info-menu)
33 (define-key map "\C-c\C-m" 'jabber-popup-muc-menu)
34 (define-key map "\C-c\C-s" 'jabber-popup-service-menu)
35 ;; note that {forward,backward}-button are not autoloaded.
36 ;; thus the `require' above.
37 (when (fboundp 'forward-button)
38 (define-key map [?\t] 'forward-button)
39 (define-key map [backtab] 'backward-button))
40 map))
42 ;;;###autoload
43 (defvar jabber-global-keymap
44 (let ((map (make-sparse-keymap)))
45 (define-key map "\C-c" 'jabber-connect-all)
46 (define-key map "\C-d" 'jabber-disconnect)
47 (define-key map "\C-r" 'jabber-switch-to-roster-buffer)
48 (define-key map "\C-j" 'jabber-chat-with)
49 (define-key map "\C-l" 'jabber-activity-switch-to)
50 (define-key map "\C-a" 'jabber-send-away-presence)
51 (define-key map "\C-o" 'jabber-send-default-presence)
52 (define-key map "\C-x" 'jabber-send-xa-presence)
53 (define-key map "\C-p" 'jabber-send-presence)
54 map)
55 "Global Jabber keymap (usually under C-x C-j)")
57 ;;;###autoload
58 (define-key ctl-x-map "\C-j" jabber-global-keymap)
60 (provide 'jabber-keymap)
62 ;;; arch-tag: 22a9993d-a4a7-40ef-a025-7cff6c3f5587