annotate lisp/erc/erc-menu.el @ 75786:732f9b589f8e

(change-major-mode-with-file-name): Fix typo in docstring.
author Juanma Barranquero <lekktu@gmail.com>
date Sun, 11 Feb 2007 02:28:57 +0000
parents 7a3f13e2dd57
children 2fae574a2382
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
1 ;; erc-menu.el -- Menu-bar definitions for ERC
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
2
75346
7a3f13e2dd57 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 75259
diff changeset
3 ;; Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
4
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
5 ;; Author: Mario Lang <mlang@delysid.org>
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
6 ;; Keywords: comm, processes, menu
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
7
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
9
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
13 ;; any later version.
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
14
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
18 ;; GNU General Public License for more details.
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
19
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
23 ;; Boston, MA 02110-1301, USA.
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
24
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
25 ;;; Commentary:
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
26
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
27 ;; Loading this file defines a menu for ERC.
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
28
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
29 ;;; Code:
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
30
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
31 (require 'erc)
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
32 (require 'easymenu)
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
33
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
34 (defvar erc-menu-definition
74093
bc5d69739d5e Merge from erc--emacs--22
Miles Bader <miles@gnu.org>
parents: 68822
diff changeset
35 (list "ERC"
bc5d69739d5e Merge from erc--emacs--22
Miles Bader <miles@gnu.org>
parents: 68822
diff changeset
36 ["Connect to server..." erc t]
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
37 ["Disconnect from server..." erc-quit-server erc-server-connected]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
38 "-"
68814
fe9073ac802e Revision: emacs@sv.gnu.org/emacs--devo--0--patch-73
Miles Bader <miles@gnu.org>
parents: 68451
diff changeset
39 ["List channels..." erc-list-channels
fe9073ac802e Revision: emacs@sv.gnu.org/emacs--devo--0--patch-73
Miles Bader <miles@gnu.org>
parents: 68451
diff changeset
40 (and erc-server-connected (fboundp 'erc-list-channels))]
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
41 ["Join channel..." erc-join-channel erc-server-connected]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
42 ["Start a query..." erc-cmd-QUERY erc-server-connected]
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
43 ["Input action..." erc-input-action (erc-default-target)]
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
44 "-"
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
45 (list
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
46 "Current channel"
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
47 ["List users in channel" erc-channel-names erc-channel-users]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
48 ["List channel operators" erc-cmd-OPS erc-channel-users]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
49 ["Set topic..." erc-set-topic
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
50 (and (and (erc-default-target) (not (erc-query-buffer-p)))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
51 (or (not (member "t" erc-channel-modes))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
52 (erc-channel-user-op-p (erc-current-nick))))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
53 (list "Channel modes"
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
54 ["Change mode..." erc-insert-mode-command
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
55 (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
56 ["No external send" (erc-toggle-channel-mode "n")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
57 :active (erc-channel-user-op-p (erc-current-nick))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
58 :style toggle :selected (member "n" erc-channel-modes)]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
59 ["Topic set by channel operator" (erc-toggle-channel-mode "t")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
60 :style toggle :selected (member "t" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
61 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
62 ["Invite only" (erc-toggle-channel-mode "i")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
63 :style toggle :selected (member "i" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
64 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
65 ["Private" (erc-toggle-channel-mode "p")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
66 :style toggle :selected (member "p" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
67 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
68 ["Secret" (erc-toggle-channel-mode "s")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
69 :style toggle :selected (member "s" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
70 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
71 ["Moderated" (erc-toggle-channel-mode "m")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
72 :style toggle :selected (member "m" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
73 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
74 ["Set a limit..." erc-set-channel-limit
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
75 (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
76 ["Set a key..." erc-set-channel-key
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
77 (erc-channel-user-op-p (erc-current-nick))])
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
78 ["Leave this channel..." erc-part-from-channel erc-channel-users]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
79 "-")
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
80 (list "Pals, fools and other keywords"
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
81 ["Add pal..." erc-add-pal]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
82 ["Delete pal..." erc-delete-pal]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
83 ["Add fool..." erc-add-fool]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
84 ["Delete fool..." erc-delete-fool]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
85 ["Add keyword..." erc-add-keyword]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
86 ["Delete keyword..." erc-delete-keyword]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
87 ["Add dangerous host..." erc-add-dangerous-host]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
88 ["Delete dangerous host..." erc-delete-dangerous-host])
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
89 "-"
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
90 (list "IRC services"
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
91 ["Identify to NickServ..." erc-nickserv-identify
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
92 (and erc-server-connected (functionp 'erc-nickserv-identify))])
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
93 "-"
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
94 ["Save buffer in log" erc-save-buffer-in-logs
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
95 (fboundp 'erc-save-buffer-in-logs)]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
96 ["Truncate buffer" erc-truncate-buffer (fboundp 'erc-truncate-buffer)]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
97 "-"
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
98 ["Customize ERC" (customize-group 'erc) t]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
99 ["Enable/Disable ERC Modules" (customize-variable 'erc-modules) t]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
100 ["Show ERC version" erc-version t])
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
101 "ERC menu definition.")
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
102
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
103 (defvar erc-menu-defined nil
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
104 "Internal variable used to keep track of whether we've defined the
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
105 ERC menu yet.")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
106
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
107 ;;;###autoload (autoload 'erc-menu-mode "erc-menu" nil t)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
108 (define-erc-module menu nil
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
109 "Enable a menu in ERC buffers."
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
110 ((unless erc-menu-defined
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
111 ;; make sure the menu only gets defined once, since Emacs 22
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
112 ;; activates it immediately
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
113 (easy-menu-define erc-menu erc-mode-map "ERC menu" erc-menu-definition)
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
114 (setq erc-menu-defined t))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
115 (if (featurep 'xemacs)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
116 (progn
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
117 ;; the menu isn't automatically added to the menu bar in
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
118 ;; XEmacs
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
119 (add-hook 'erc-mode-hook 'erc-menu-add)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
120 (dolist (buffer (erc-buffer-list))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
121 (with-current-buffer buffer (erc-menu-add))))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
122 (erc-menu-add)))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
123 ((if (featurep 'xemacs)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
124 (progn
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
125 (remove-hook 'erc-mode-hook 'erc-menu-add)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
126 (dolist (buffer (erc-buffer-list))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
127 (with-current-buffer buffer (erc-menu-remove))))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
128 (erc-menu-remove)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
129 ;; `easy-menu-remove' is a no-op in Emacs 22
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
130 (message "You might have to restart Emacs to remove the ERC menu"))))
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
131
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
132 ;; silence byte-compiler warning
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
133 (eval-when-compile
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
134 (defvar erc-menu nil))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
135
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
136 (defun erc-menu-add ()
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
137 "Add the ERC menu to the current buffer."
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
138 (easy-menu-add erc-menu erc-mode-map))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
139
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
140 (defun erc-menu-remove ()
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
141 "Remove the ERC menu from the current buffer."
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
142 (easy-menu-remove erc-menu))
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
143
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
144 (provide 'erc-menu)
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
145
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
146 ;;; erc-menu.el ends here
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
147 ;;
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
148 ;; Local Variables:
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
149 ;; indent-tabs-mode: t
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
150 ;; tab-width: 8
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
151 ;; End:
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
152
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
153 ;; arch-tag: 671219f2-b082-4753-a185-1d0c7e0c05bd