annotate lisp/erc/erc-menu.el @ 110951:85fe6b298326

* make-dist: Remove the unnecessary $shortversion.
author Glenn Morris <rgm@gnu.org>
date Tue, 12 Oct 2010 01:01:11 -0700
parents 1d1d5d9bd884
children 376148b31b5e
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
95614
b52fd6b0e051 Remove unnecessary eval-when-compiles.
Glenn Morris <rgm@gnu.org>
parents: 94660
diff changeset
3 ;; Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007,
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 100908
diff changeset
4 ;; 2008, 2009, 2010 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
94660
2a734255bcc7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79706
diff changeset
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
68451
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
94660
2a734255bcc7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79706
diff changeset
13 ;; the Free Software Foundation, either version 3 of the License, or
2a734255bcc7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79706
diff changeset
14 ;; (at your option) any later version.
68451
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
94660
2a734255bcc7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79706
diff changeset
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
23
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
24 ;;; Commentary:
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 ;; 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
27
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
28 ;;; Code:
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
29
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
30 (require 'erc)
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
31 (require 'easymenu)
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
32
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
33 (defvar erc-menu-definition
74093
bc5d69739d5e Merge from erc--emacs--22
Miles Bader <miles@gnu.org>
parents: 68822
diff changeset
34 (list "ERC"
bc5d69739d5e Merge from erc--emacs--22
Miles Bader <miles@gnu.org>
parents: 68822
diff changeset
35 ["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
36 ["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
37 "-"
68814
fe9073ac802e Revision: emacs@sv.gnu.org/emacs--devo--0--patch-73
Miles Bader <miles@gnu.org>
parents: 68451
diff changeset
38 ["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
39 (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
40 ["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
41 ["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
42 ["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
43 "-"
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
44 (list
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
45 "Current channel"
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
46 ["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
47 ["List channel operators" erc-cmd-OPS erc-channel-users]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
48 ["Set topic..." erc-set-topic
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
49 (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
50 (or (not (member "t" erc-channel-modes))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
51 (erc-channel-user-op-p (erc-current-nick))))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
52 (list "Channel modes"
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
53 ["Change mode..." erc-insert-mode-command
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
54 (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
55 ["No external send" (erc-toggle-channel-mode "n")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
56 :active (erc-channel-user-op-p (erc-current-nick))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
57 :style toggle :selected (member "n" erc-channel-modes)]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
58 ["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
59 :style toggle :selected (member "t" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
60 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
61 ["Invite only" (erc-toggle-channel-mode "i")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
62 :style toggle :selected (member "i" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
63 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
64 ["Private" (erc-toggle-channel-mode "p")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
65 :style toggle :selected (member "p" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
66 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
67 ["Secret" (erc-toggle-channel-mode "s")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
68 :style toggle :selected (member "s" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
69 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
70 ["Moderated" (erc-toggle-channel-mode "m")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
71 :style toggle :selected (member "m" erc-channel-modes)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
72 :active (erc-channel-user-op-p (erc-current-nick))]
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
73 ["Set a limit..." erc-set-channel-limit
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
74 (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 key..." erc-set-channel-key
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
76 (erc-channel-user-op-p (erc-current-nick))])
76856
2fae574a2382 Release ERC 5.2.
Miles Bader <miles@gnu.org>
parents: 75346
diff changeset
77 ["Leave this channel..." erc-part-from-channel erc-channel-users])
2fae574a2382 Release ERC 5.2.
Miles Bader <miles@gnu.org>
parents: 75346
diff changeset
78 "-"
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
79 (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
80 ["Add pal..." erc-add-pal]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
81 ["Delete pal..." erc-delete-pal]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
82 ["Add fool..." erc-add-fool]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
83 ["Delete fool..." erc-delete-fool]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
84 ["Add keyword..." erc-add-keyword]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
85 ["Delete keyword..." erc-delete-keyword]
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
86 ["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
87 ["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
88 "-"
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
89 (list "IRC services"
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
90 ["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
91 (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
92 "-"
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
93 ["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
94 (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
95 ["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
96 "-"
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
97 ["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
98 ["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
99 ["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
100 "ERC menu definition.")
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
101
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
102 (defvar erc-menu-defined nil
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
103 "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
104 ERC menu yet.")
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
105
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
106 ;;;###autoload (autoload 'erc-menu-mode "erc-menu" nil t)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
107 (define-erc-module menu nil
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
108 "Enable a menu in ERC buffers."
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
109 ((unless erc-menu-defined
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
110 ;; 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
111 ;; activates it immediately
68451
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
112 (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
113 (setq erc-menu-defined t))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
114 (if (featurep 'xemacs)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
115 (progn
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
116 ;; 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
117 ;; XEmacs
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
118 (add-hook 'erc-mode-hook 'erc-menu-add)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
119 (dolist (buffer (erc-buffer-list))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
120 (with-current-buffer buffer (erc-menu-add))))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
121 (erc-menu-add)))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
122 ((if (featurep 'xemacs)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
123 (progn
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
124 (remove-hook 'erc-mode-hook 'erc-menu-add)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
125 (dolist (buffer (erc-buffer-list))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
126 (with-current-buffer buffer (erc-menu-remove))))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
127 (erc-menu-remove)
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
128 ;; `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
129 (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
130
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
131 ;; silence byte-compiler warning
95614
b52fd6b0e051 Remove unnecessary eval-when-compiles.
Glenn Morris <rgm@gnu.org>
parents: 94660
diff changeset
132 (defvar erc-menu)
75259
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
133
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
134 (defun erc-menu-add ()
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
135 "Add the ERC menu to the current buffer."
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
136 (easy-menu-add erc-menu erc-mode-map))
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
137
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
138 (defun erc-menu-remove ()
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
139 "Remove the ERC menu from the current buffer."
f45c5edf0be4 Merge from erc--main--0
Miles Bader <miles@gnu.org>
parents: 74093
diff changeset
140 (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
141
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
142 (provide 'erc-menu)
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 ;;; erc-menu.el ends here
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 ;; Local Variables:
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
147 ;; indent-tabs-mode: t
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
148 ;; tab-width: 8
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
149 ;; End:
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
150
fc745b05e928 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22
Miles Bader <miles@gnu.org>
parents:
diff changeset
151 ;; arch-tag: 671219f2-b082-4753-a185-1d0c7e0c05bd