annotate lisp/erc/erc-menu.el @ 90913:3042eff9492b

(obj): Add font.o and w32font.o
author Jason Rumney <jasonr@gnu.org>
date Wed, 06 Jun 2007 20:27:53 +0000
parents 2fae574a2382
children 85d67fae9a94
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
76856
2fae574a2382 Release ERC 5.2.
Miles Bader <miles@gnu.org>
parents: 75346
diff changeset
3 ;; Copyright (C) 2001, 2002, 2004, 2005, 2006,
2fae574a2382 Release ERC 5.2.
Miles Bader <miles@gnu.org>
parents: 75346
diff changeset
4 ;; 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
5
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
6 ;; 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
7 ;; Keywords: comm, processes, menu
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
8
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
9 ;; 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
10
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
11 ;; 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
12 ;; 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
13 ;; 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
14 ;; any later version.
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
15
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
16 ;; 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
17 ;; 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
18 ;; 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
19 ;; 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
20
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
21 ;; 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
22 ;; 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
23 ;; 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
24 ;; Boston, MA 02110-1301, USA.
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
25
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
26 ;;; Commentary:
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
27
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
28 ;; 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
29
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
30 ;;; Code:
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
31
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
32 (require 'erc)
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
33 (require 'easymenu)
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
34
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
35 (defvar erc-menu-definition
74093
bc5d69739d5e Merge from erc--emacs--22
Miles Bader <miles@gnu.org>
parents: 68822
diff changeset
36 (list "ERC"
bc5d69739d5e Merge from erc--emacs--22
Miles Bader <miles@gnu.org>
parents: 68822
diff changeset
37 ["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
38 ["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
39 "-"
68814
fe9073ac802e Revision: emacs@sv.gnu.org/emacs--devo--0--patch-73
Miles Bader <miles@gnu.org>
parents: 68451
diff changeset
40 ["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
41 (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
42 ["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
43 ["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
44 ["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
45 "-"
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
46 (list
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
47 "Current channel"
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
48 ["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
49 ["List channel operators" erc-cmd-OPS erc-channel-users]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
50 ["Set topic..." erc-set-topic
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
51 (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
52 (or (not (member "t" erc-channel-modes))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
53 (erc-channel-user-op-p (erc-current-nick))))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
54 (list "Channel modes"
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
55 ["Change mode..." erc-insert-mode-command
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
56 (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
57 ["No external send" (erc-toggle-channel-mode "n")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
58 :active (erc-channel-user-op-p (erc-current-nick))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
59 :style toggle :selected (member "n" erc-channel-modes)]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
60 ["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
61 :style toggle :selected (member "t" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
62 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
63 ["Invite only" (erc-toggle-channel-mode "i")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
64 :style toggle :selected (member "i" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
65 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
66 ["Private" (erc-toggle-channel-mode "p")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
67 :style toggle :selected (member "p" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
68 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
69 ["Secret" (erc-toggle-channel-mode "s")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
70 :style toggle :selected (member "s" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
71 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
72 ["Moderated" (erc-toggle-channel-mode "m")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
73 :style toggle :selected (member "m" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
74 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
75 ["Set a limit..." erc-set-channel-limit
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
76 (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
77 ["Set a key..." erc-set-channel-key
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
78 (erc-channel-user-op-p (erc-current-nick))])
76856
2fae574a2382 Release ERC 5.2.
Miles Bader <miles@gnu.org>
parents: 75346
diff changeset
79 ["Leave this channel..." erc-part-from-channel erc-channel-users])
2fae574a2382 Release ERC 5.2.
Miles Bader <miles@gnu.org>
parents: 75346
diff changeset
80 "-"
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
81 (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
82 ["Add pal..." erc-add-pal]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
83 ["Delete pal..." erc-delete-pal]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
84 ["Add fool..." erc-add-fool]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
85 ["Delete fool..." erc-delete-fool]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
86 ["Add keyword..." erc-add-keyword]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
87 ["Delete keyword..." erc-delete-keyword]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
88 ["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
89 ["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
90 "-"
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
91 (list "IRC services"
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
92 ["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
93 (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
94 "-"
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
95 ["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
96 (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
97 ["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
98 "-"
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
99 ["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
100 ["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
101 ["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
102 "ERC menu definition.")
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
103
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
104 (defvar erc-menu-defined nil
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
105 "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
106 ERC menu yet.")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
107
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
108 ;;;###autoload (autoload 'erc-menu-mode "erc-menu" nil t)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
109 (define-erc-module menu nil
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
110 "Enable a menu in ERC buffers."
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
111 ((unless erc-menu-defined
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
112 ;; 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
113 ;; activates it immediately
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
114 (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
115 (setq erc-menu-defined t))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
116 (if (featurep 'xemacs)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
117 (progn
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
118 ;; 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
119 ;; XEmacs
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
120 (add-hook 'erc-mode-hook 'erc-menu-add)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
121 (dolist (buffer (erc-buffer-list))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
122 (with-current-buffer buffer (erc-menu-add))))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
123 (erc-menu-add)))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
124 ((if (featurep 'xemacs)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
125 (progn
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
126 (remove-hook 'erc-mode-hook 'erc-menu-add)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
127 (dolist (buffer (erc-buffer-list))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
128 (with-current-buffer buffer (erc-menu-remove))))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
129 (erc-menu-remove)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
130 ;; `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
131 (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
132
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
133 ;; silence byte-compiler warning
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
134 (eval-when-compile
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
135 (defvar erc-menu nil))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
136
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
137 (defun erc-menu-add ()
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
138 "Add the ERC menu to the current buffer."
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
139 (easy-menu-add erc-menu erc-mode-map))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
140
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
141 (defun erc-menu-remove ()
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
142 "Remove the ERC menu from the current buffer."
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
143 (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
144
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
145 (provide 'erc-menu)
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
146
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
147 ;;; erc-menu.el ends here
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
148 ;;
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
149 ;; Local Variables:
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
150 ;; indent-tabs-mode: t
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
151 ;; tab-width: 8
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
152 ;; End:
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
153
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
154 ;; arch-tag: 671219f2-b082-4753-a185-1d0c7e0c05bd