From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Wiesner Newsgroups: gmane.emacs.help Subject: Re: Menu on minor mode lighter Date: Sat, 2 Aug 2014 15:12:01 +0200 Message-ID: <020BFB09-E6B9-462F-8C29-882795452C3A@lunaryorn.com> References: <8738dg6sd0.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1406985151 5582 80.91.229.3 (2 Aug 2014 13:12:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Aug 2014 13:12:31 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 02 15:12:25 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XDZ6m-0003nH-QV for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Aug 2014 15:12:24 +0200 Original-Received: from localhost ([::1]:44172 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDZ6m-00046y-Cg for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Aug 2014 09:12:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDZ6Y-000461-8O for help-gnu-emacs@gnu.org; Sat, 02 Aug 2014 09:12:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XDZ6T-0000BK-6Y for help-gnu-emacs@gnu.org; Sat, 02 Aug 2014 09:12:10 -0400 Original-Received: from vega.uberspace.de ([95.143.172.245]:38416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDZ6S-0000BE-SG for help-gnu-emacs@gnu.org; Sat, 02 Aug 2014 09:12:05 -0400 Original-Received: (qmail 27661 invoked from network); 2 Aug 2014 13:12:03 -0000 Original-Received: from localhost (HELO hostname.fritz.box) (127.0.0.1) by vega.uberspace.de with SMTP; 2 Aug 2014 13:12:03 -0000 In-Reply-To: <8738dg6sd0.fsf@web.de> X-Mailer: Apple Mail (2.1878.6) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 95.143.172.245 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99054 Archived-At: Am 01.08.2014 um 19:18 schrieb Michael Heerdegen = : > Sebastian Wiesner writes: >=20 >> how can I add a menu to the mode line lighter of a minor mode, = similar >> to the menu that appears when you click on the mode line lighter of >> Dired? However, the menu should *not* appear in the global menu bar, >> if the minor mode is enabled. >=20 > In the mode-line, down-mouse-1 is bound to `mouse-minor-mode-menu'. > `mouse-minor-mode-menu' determines the indicator string you clicked on > and calls `minor-mode-menu-from-indicator' on it. >=20 > So the presumably easiest way to do what you want is to advice > `minor-mode-menu-from-indicator' to pop up a different menu for = certain > indicators. Mh, the doctoring of `minor-mode-menu-from-indicator' says (emphasis = mine): Show menu for minor mode specified by INDICATOR. Interactively, INDICATOR is read using completion. If there is _no menu defined for the minor mode_, then create one with items `Turn Off' and `Help=92. So how do I do that? How do I =93define a menu for a minor mode=94?=