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: RE: C-M-TAB stand-in for M-TAB, on MS Windows? Date: Tue, 27 May 2008 13:09:10 -0700 Message-ID: <006401c8c035$8704af50$0200a8c0@us.oracle.com> References: <007901c8bec5$4179df80$0200a8c0@us.oracle.com> <3F8C7B43-05C3-4970-91DA-73152E9286E8@pobox.com> <483AE253.1010208@gmail.com> <000001c8bf4e$ef90aed0$0200a8c0@us.oracle.com> <483AEDA0.1000105@gmail.com> <000201c8bf54$0a312490$0200a8c0@us.oracle.com> <483B27CA.9000102@gmail.com> <000801c8bf88$47c9e3d0$0200a8c0@us.oracle.com> <483B4B4A.8010502@gmail.com> <000901c8bf8f$420017b0$0200a8c0@us.oracle.com> <483BAEDB.6020709@gmail.com> <002a01c8c008$65fd4e70$0200a8c0@us.oracle.com> <003201c8c014$198f9be0$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0065_01C8BFFA.DAA5D750" X-Trace: ger.gmane.org 1211918972 31022 80.91.229.12 (27 May 2008 20:09:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 May 2008 20:09:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Eli Zaretskii'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 27 22:10:11 2008 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 1K15Ue-0006uV-7B for ged-emacs-devel@m.gmane.org; Tue, 27 May 2008 22:10:00 +0200 Original-Received: from localhost ([127.0.0.1]:50944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K15Ts-0004Fb-Vs for ged-emacs-devel@m.gmane.org; Tue, 27 May 2008 16:09:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K15To-0004EV-Bu for emacs-devel@gnu.org; Tue, 27 May 2008 16:09:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K15Tn-0004EJ-KK for emacs-devel@gnu.org; Tue, 27 May 2008 16:09:07 -0400 Original-Received: from [199.232.76.173] (port=43058 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K15Tn-0004EG-HY for emacs-devel@gnu.org; Tue, 27 May 2008 16:09:07 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]:13495) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K15Ti-0000W0-UY; Tue, 27 May 2008 16:09:03 -0400 Original-Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m4RK8xbA023523; Tue, 27 May 2008 14:09:00 -0600 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m4R4RF7c017689; Tue, 27 May 2008 14:08:59 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt350.oracle.com with ESMTP id 3681314061211918931; Tue, 27 May 2008 13:08:51 -0700 Original-Received: from dradamslap1 (/24.5.171.3) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 27 May 2008 13:08:50 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Thread-Index: AcjAKmN3AcUfsQ1HSBqP0pAFqibFFwABRvkg X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: 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:97826 Archived-At: This is a multi-part message in MIME format. ------=_NextPart_000_0065_01C8BFFA.DAA5D750 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit > I have a problem with this description: it doesn't really explain what > can and what can't be an argument to these functions, and whether > there's any significance to the term "hot-key" that is part of the > functions' names. An example helps, but a single example is not > enough to overcome the difficulty of a total lack of description of > the argument, and also of what the function actually does. Come to > think about it, the suggested text explains even less than the doc > string does, which to me doesn't make sense (it should be the other > way around). > > > +@vindex w32-register-hot-key > > +@vindex w32-unregister-hot-key > > These should be @findex; @vindex is for variables/options. > > > + Although the @key{ALT} key is mapped by default to the Emacs > > +@key{META} key, MS Windows preempts its use by Emacs for certain key > > +combinations, such as @key{ALT-TAB}. You can use function > > +@code{w32-register-hot-key} to allow a key sequence to be seen by > > +Emacs instead of being grabbed by Windows. > > + > > +@kindex M-TAB @r{(MS-Windows)} > > +@cindex @code{M-TAB} vs @code{Alt-TAB} (MS-Windows) > > You should use @kbd{M-@key{TAB}} and @kbd{Alt-@key{TAB}}, not > @key{ALT-TAB} or @code{M-TAB}. > > > +@cindex @code{Alt-TAB} vs @code{M-TAB} (MS-Windows) > > + For example, @code{(w32-register-hot-key [M-tab])} lets you use > > +@kbd{M-TAB} normally in Emacs. This is effective at all levels, so, > ^^ > Two spaces after a period that ends a sentence, please. > > Finally, please include a ChangeLog entry with your patch. Thanks for the corrections. Attached is a new patch. My knowledge of this is limited to what the doc string says, so I've reproduced that. Feel free to make any more additions or corrections. In particular, feel free to explain what a Windows hot key and hotkey-id are. It is important to at least let users know that they can recuperate M-TAB. But I certainly agree that it would be good to have a complete and accurate description of what these functions do. If you can provide that information, please do submit a better patch. BTW, it looks to me like there might be similar syntax errors to those I made (e.g. @code{Alt} in @cindex), throughout this file - you might want to check the syntax generally. HTH. 2008-05-27 Drew Adams * msdog.text: Added descriptions of w32-register-hot-key and w32-unregister-hot-key. ------=_NextPart_000_0065_01C8BFFA.DAA5D750 Content-Type: application/octet-stream; name="msdog-texi-2008-05-27b.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="msdog-texi-2008-05-27b.patch" diff -u -w "msdog.texi" "msdog-patched-2008-05-27b.texi"=0A= --- msdog.texi 2008-05-27 12:49:58.000000000 -0700=0A= +++ msdog-patched-2008-05-27b.texi 2008-05-27 12:55:04.000000000 -0700=0A= @@ -403,6 +403,33 @@=0A= key. If you wish it to produce the @code{Alt} modifier instead, set=0A= the variable @code{w32-alt-is-meta} to a @code{nil} value.=0A= =0A= +@findex w32-register-hot-key=0A= +@findex w32-unregister-hot-key=0A= + Although the @key{ALT} key is mapped by default to the Emacs=0A= +@key{META} key, MS Windows preempts its use by Emacs for certain key=0A= +combinations, such as @kbd{Alt-@key{TAB}}. You can use function=0A= +@code{w32-register-hot-key} to allow a key sequence to be seen by Emacs=0A= +instead of being grabbed by Windows. This registers the key sequence as=0A= +a Windows hot key.=0A= +=0A= + The argument to @code{w32-register-hot-key} must be a one element key=0A= +definition in vector form that would be acceptable to `define-key'. The=0A= +@code{meta} modifier is interpreted as @key{ALT} if `w32-alt-is-meta' is=0A= +@code{t}, and @code{hyper} is always interpreted as the Windows modifier=0A= +keys. The return value is the hotkey-id if registered, otherwise=0A= +@code{nil}.=0A= +=0A= +@kindex M-TAB @r{(MS-Windows)}=0A= +@cindex @kbd{M-@key{TAB}} vs @kbd{Alt-@key{TAB}} (MS-Windows)=0A= +@cindex @kbd{Alt-@key{TAB}} vs @kbd{M-@key{TAB}} (MS-Windows)=0A= + For example, @code{(w32-register-hot-key [M-tab])} lets you use=0A= +@kbd{M-TAB} normally in Emacs. This is effective at all levels, so, for=0A= +instance, you can use @kbd{M-TAB} at top level to complete the word or=0A= +symbol at point, and you can use it during incremental search to=0A= +complete the current search string against previously sought strings.=0A= +The function @code{w32-unregister-hot-key} reverses the effect of=0A= +@code{w32-register-hot-key}.=0A= +=0A= @vindex w32-capslock-is-shiftlock=0A= By default, the @key{CapsLock} key only affects normal character=0A= keys (it converts lower-case characters to their upper-case=0A= =0A= Diff finished at Tue May 27 12:59:36=0A= ------=_NextPart_000_0065_01C8BFFA.DAA5D750--