From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.devel Subject: Re: set-temporary-overlay-map seems poorly named Date: Sun, 22 Dec 2013 19:49:10 +0530 Message-ID: <878uvdufxd.fsf@gmail.com> References: <87k3eysqni.fsf@gnu.org> <87r496pwy0.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1387721957 22220 80.91.229.3 (22 Dec 2013 14:19:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 Dec 2013 14:19:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 22 15:19:18 2013 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 1VujsC-0004JB-IY for ged-emacs-devel@m.gmane.org; Sun, 22 Dec 2013 15:19:16 +0100 Original-Received: from localhost ([::1]:57994 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VujsC-0006b5-2d for ged-emacs-devel@m.gmane.org; Sun, 22 Dec 2013 09:19:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vujs3-0006Lz-Go for emacs-devel@gnu.org; Sun, 22 Dec 2013 09:19:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vujrv-0001Ld-7Z for emacs-devel@gnu.org; Sun, 22 Dec 2013 09:19:07 -0500 Original-Received: from mail-pb0-x22f.google.com ([2607:f8b0:400e:c01::22f]:58457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vujru-0001LB-RV; Sun, 22 Dec 2013 09:18:59 -0500 Original-Received: by mail-pb0-f47.google.com with SMTP id um1so4411273pbc.20 for ; Sun, 22 Dec 2013 06:18:57 -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=arfMF4x0ZEdU+FXb66kA1eUzTENuSe2vY97qbRLEfIE=; b=cVofvZXeQ8UEWoQmqaNFyo3phXbmn8PC0fU028CUPUkX+jmM7PXkGZBQpynC0Y/53t +sh4rXIwbAtSeiQVhjzvS27Rhw/jzDwx1mg1+cJTiz4oNED1SK6NLkAt8MCWdJu25kPT 0NBECHrjCKVzpUexT0a2EPX/PYaDnK4qzRGeCImQQo/crl7l4eGn6/DoW9HzxTDECOC6 UFtPk0HuD89WMabKscI2m9sHbpTffsBP9CQ9zot6HPbHwwAYCCHSOqcoRCVCYce8gkOl nRz9EIO59TdTmyBUWS/UHdaIH8J22fipIQmqjNNRfKI5ombIydOBWlZtp2oEr/Kt82Je HE3g== X-Received: by 10.66.123.5 with SMTP id lw5mr20459751pab.83.1387721937414; Sun, 22 Dec 2013 06:18:57 -0800 (PST) Original-Received: from debian-6.05 ([115.242.143.131]) by mx.google.com with ESMTPSA id si6sm18608284pab.19.2013.12.22.06.18.54 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sun, 22 Dec 2013 06:18:56 -0800 (PST) In-Reply-To: <87r496pwy0.fsf@gmail.com> (Jambunathan K.'s message of "Sat, 21 Dec 2013 11:28:15 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::22f 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:166732 Archived-At: Jambunathan K writes: > Chong Yidong writes: > >> This function, new in Emacs 24.4, seems to have nothing to do with >> overlays in the usual Emacs sense. So it's a bad name. >> >> How about renaming it to `set-transient-keymap'? > > How about `set-temporary-keymap'? The following node already uses TEMP-MAP to designate this. ,---- (info "(elisp) Searching Keymaps") | | TEMP-MAP is a pseudo variable that represents the effect of a | `set-temporary-overlay-map' call. | `---- ---------------------------------------------------------------- ,---- C-h f set-temporary-overlay-map | | Normally, MAP is used only once. If the optional argument | KEEP-PRED is t, MAP stays active if a key from MAP is used. | KEEP-PRED can also be a function of no arguments: if it returns | non-nil then MAP stays active. | `---- In essence the map is "self-destructive". The installer ALSO tells when the transient map goes belly up. I believe the notion of "self-destructive" is semantically more richer than "transient" or "temporary". ---------------------------------------------------------------- Looking at instances where `set-temporary-keymap' is used, it seems it helps to "extend" a command to an arbitrary length. C-x {z}+ C-x TAB {left or right}+ C-x C-+ {+ or - or 0}+ It is looks as if a "common prefix" is factored out of a key sequence. So a key sequence like AB AC AD becomes "reduced" to A B C D i.e., A is "factored out". So overlay-map in effects helps to create "command local" maps or to create "sub-commands". ----------------------------------------------------------------