From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: key map entry for shift-return? Date: Fri, 10 Jul 2009 08:01:11 +0000 (UTC) Organization: muc.de e.V. Message-ID: References: <961bb7e9-56d4-40d5-b0dc-4c15e0da722b@x25g2000prf.googlegroups.com> <878wiykk2r.fsf@catnip.gol.com> <1648be38-5e41-4d7b-98d8-1f6e6494d2a2@g7g2000prg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1247215331 19239 80.91.229.12 (10 Jul 2009 08:42:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Jul 2009 08:42:11 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 10 10:42:04 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MPBgB-0007He-UP for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Jul 2009 10:42:04 +0200 Original-Received: from localhost ([127.0.0.1]:55897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPBgA-0005O0-UU for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Jul 2009 04:42:03 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.esat.net!colt.net!feeder.news-service.com!newsfeed.freenet.de!news.tu-darmstadt.de!news.muc.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 61 Original-NNTP-Posting-Host: marvin.muc.de Original-X-Trace: colin2.muc.de 1247212871 23628 2001:608:1000::2 (10 Jul 2009 08:01:11 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: Fri, 10 Jul 2009 08:01:11 +0000 (UTC) User-Agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (FreeBSD/4.11-RELEASE (i386)) Original-Xref: news.stanford.edu gnu.emacs.help:170721 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:65922 Archived-At: Hi, Miles! Miles Bader wrote: > Alan Mackenzie writes: >> The guy who wrote it, Kalle Niemitalo, doesn't much like GPL-3, and >> doesn't want to assign it to the FSF, so it can't become part of Emacs. > Sounds worth rewriting to get around the ass-hattery... The what? It sounds somewhat derogatory, whatever it means. I really can't bring myself to disparage Kalle, who supplied me what I needed at a time (over a decade ago) when I could barely even formulate the problem, never mind solve it. Dislike of the GPLs and aversion to assigning copyright to the FSF aren't exactly uncommon, though I personally disagree with these stances. Rewriting it would indeed be worth it, though I think I'd have to leave it to other people since I know KN's code too well. People ask about "control arrow keys on a tty" quite a lot. There's one problem in Emacs at the moment: the function `event-apply-modifier' strips out the upper-caseity from C-S-. I don't know why it does this, but my own personal fix hasn't caused me any problems: (defun acm-event-apply-modifier (event symbol lshiftby prefix) "Apply a modifier flag to event EVENT. Unlike the core Emacs function `event-apply-modifier', when both and are modifying a\(n English\) letter in an event, b25 is set (for shift), and the LSB contains C-. SYMBOL is the name of this modifier, as a symbol. LSHIFTBY is the bit position of the modifier bit; e.g. 25 means 0x2000000. PREFIX is the string that represents this modifier in an event type symbol." (if (numberp event) (let ((letter (logand event 4194303))) ; 2^22 - 1 (if (eq symbol 'control) (cond ((and (>= letter ?A) (<= letter ?Z)) (- (logior (lsh 1 25) event) ?A -1)) ; add ((and (>= letter ?a) (<= letter ?z)) (- event ?a -1)) ((and (>= letter ?\C-a) (<= letter ?\C-z) (not (memq letter '(?\C-i ?\C-m))))) ; Can by typed without (t (logior (lsh 1 lshiftby) event))) (logior (lsh 1 lshiftby) event))) (if (memq symbol (event-modifiers event)) event (let ((event-type (if (symbolp event) event (car event)))) (setq event-type (intern (concat prefix (symbol-name event-type)))) (if (symbolp event) event-type (cons event-type (cdr event))))))) > -Miles -- Alan Mackenzie (Nuernberg).