From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: loaded minor modes should be added to `mode-line-mode-menu' and Options menu Date: Thu, 27 Sep 2007 15:52:07 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1190933543 30938 80.91.229.12 (27 Sep 2007 22:52:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Sep 2007 22:52:23 +0000 (UTC) To: "Emacs-Devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 28 00:52:18 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ib2DS-0003ST-AT for ged-emacs-devel@m.gmane.org; Fri, 28 Sep 2007 00:52:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ib2DO-0002Xb-OV for ged-emacs-devel@m.gmane.org; Thu, 27 Sep 2007 18:52:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ib2DJ-0002V2-CO for emacs-devel@gnu.org; Thu, 27 Sep 2007 18:52:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ib2DG-0002Su-F2 for emacs-devel@gnu.org; Thu, 27 Sep 2007 18:52:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ib2DG-0002Sr-7q for emacs-devel@gnu.org; Thu, 27 Sep 2007 18:52:06 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ib2DF-0007ea-S0 for emacs-devel@gnu.org; Thu, 27 Sep 2007 18:52:06 -0400 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l8RMq3Ws025525 for ; Thu, 27 Sep 2007 17:52:03 -0500 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id l8Q83NrE020697 for ; Thu, 27 Sep 2007 16:52:02 -0600 Original-Received: from dhcp-4op11-4op12-west-130-35-178-158.us.oracle.com by acsmt351.oracle.com with ESMTP id 3251698931190933517; Thu, 27 Sep 2007 15:51:57 -0700 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-Detected-Kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:79974 Archived-At: 1. Currently, predefined local minor modes are added to the minor-mode `mouse-3' menu in the mode-line, and predefined global minor modes are added to the menu-bar Options menu, some of them to submenu Show/Hide. The former is done in bindings.el; the latter is done in menu-bar.el. In both cases, the list of modes is hard-coded, static. This takes no account of what minor modes the user might have defined (loaded). It would be better for these menus to reflect the user's own context: to show which minor modes have been defined, whether they were predefined as part of Emacs or not. It makes at least as much sense for a user to be able to access, by menu, the modes s?he actually uses as modes s?he might never use. Instead of hard-coding the list of minor modes to include in these menus, why not let `define-minor-mode', `define-global-minor-mode', and `define-globalized-minor-mode' dynamically update the menus appropriately? Then, if a library that defines a new minor mode is loaded, that mode will be automatically added to the appropriate (local or global) menu (assuming that one of those macros defines it). In addition, the hard-coding of all this is repetitive - essentially the same thing is done for each minor mode. It make sense to do this by program - why not when the minor mode is defined? 2. The title of the mode-line menu for the local modes should be "Local Minor Modes", not "Minor Modes".