From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: Namespace macros Date: Mon, 08 Dec 2014 13:52:16 +0100 Message-ID: References: <877fy77zhp.fsf@web.de> <87k326d4ww.fsf@gmail.com> <877fy6rp2o.fsf@web.de> <548230FB.40307@dancol.org> <5482C872.5010304@dancol.org> <5483C537.3010707@dancol.org> <54840719.5080209@dancol.org> <87a92zmnv4.fsf@lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1418043182 20070 80.91.229.3 (8 Dec 2014 12:53:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Dec 2014 12:53:02 +0000 (UTC) Cc: emacs-devel To: Artur Malabarba Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 08 13:52:53 2014 Return-path: Envelope-to: ged-emacs-devel@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 1Xxxo4-0002MA-G2 for ged-emacs-devel@m.gmane.org; Mon, 08 Dec 2014 13:52:53 +0100 Original-Received: from localhost ([::1]:33814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xxxo4-0007qS-4b for ged-emacs-devel@m.gmane.org; Mon, 08 Dec 2014 07:52:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xxxnh-0007qL-Mo for emacs-devel@gnu.org; Mon, 08 Dec 2014 07:52:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XxxnY-00030k-KZ for emacs-devel@gnu.org; Mon, 08 Dec 2014 07:52:29 -0500 Original-Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:61584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxxnY-00030e-Cd for emacs-devel@gnu.org; Mon, 08 Dec 2014 07:52:20 -0500 Original-Received: by mail-wg0-f41.google.com with SMTP id y19so6080856wgg.14 for ; Mon, 08 Dec 2014 04:52:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=E7mBni8rJ9oRYy3bvFNCQsb5boxSMRbcTpZjoSUsUaM=; b=Ie8U9fjcRcyK0u+4uC/kGQU8NFOQj1eyM45R6X2QxB6B1v/22hXAfUMuq2u0ToZwT0 YVObosUO8vllfsB4E0u7FmM3AZ7eM9R/a0R5SRkIfvOzVHAFfAsIJU+MWaHVnUkFouGM 75L7I/kqcea89TUQwLAjLvExOfDEDdlZlvlB8odu3xzjpyaAou0gLHeftDkZFHhQ/LIK WxoUxxDKRdNj0YE+6XHhBqPP+b0Za49fvDJIoTgxtU46Fzlv6GsCNS10ty2eDjpYAEuE IDfd50ce262+bvffwgPw0d78clzujzUHq8CXPuDJLjoJxI6MOT607p6J/IJ2kmNFqAMJ 6L3A== X-Received: by 10.181.13.42 with SMTP id ev10mr23521043wid.78.1418043138520; Mon, 08 Dec 2014 04:52:18 -0800 (PST) Original-Received: from ix ([212.46.172.140]) by mx.google.com with ESMTPSA id fo12sm9668295wic.19.2014.12.08.04.52.17 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 08 Dec 2014 04:52:17 -0800 (PST) Original-Received: from helmut by ix with local (Exim 4.80) (envelope-from ) id 1XxxnU-0000yk-6r; Mon, 08 Dec 2014 13:52:16 +0100 In-Reply-To: (Artur Malabarba's message of "Mon, 8 Dec 2014 11:02:43 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:179385 Archived-At: On Mon, Dec 08 2014, Artur Malabarba wrote: >> because 1) "define-minor-mode mode" is >> really useless for grep > > This will be the case for any namespacing solution. You can work around by > defining the minor mode after the macro. > Also, I would be happy to add an option to avoid namespacing the > `define-minor-mode' form (and similar ones), if anyone wants it. Some commands like M-x gnus or M-x rmail don't have proper prefixes. I suppose those would also need to be defined after the macro or with an option to suppress automatic prefixing. >> 2) it still uses the "camcorder-" prefix for key >> bindings. > > This can also be worked around by defining the keymap with a series of > `define-key' statements instead of doing it inside the `define-minor-mode'. > Which is something I see a lot of packages doing anyway. Something like `(([f12] . ,#'stop)) would probably also work. Not exactly an improvement, though. > Now that I think about it, I can also improve the macro to "look inside" the > fifth argument of a `define-minor-mode' call even if it's a quoted list, > since that argument is guaranteed to be a keymap. I guess that temptation will come up often: just add a special case for macro X. Helmut