GNU bug report logs - #5330
Term mode in Cocoa does not respect NS-ALTERNATE-MODIFIER

Previous Next

Package: emacs;

Reported by: Scott Bell <sctb <at> me.com>

Date: Wed, 6 Jan 2010 23:57:02 UTC

Severity: normal

Tags: fixed

Merged with 5449

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #41 received at 5330 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Stefan Monnier  <monnier <at> iro.umontreal.ca>
Cc: Scott Bell <sctb <at> me.com>, 5330 <at> debbugs.gnu.org
Subject: Re: Term mode in Cocoa does not respect NS-ALTERNATE-MODIFIER
Date: Wed, 20 Jan 2010 12:18:14 -0500
I narrowed the problem down to this specific change:

2009-12-04  Stefan Monnier  <monnier <at> iro.umontreal.ca>

   Minor cleanup.
   * term.el (term-send-raw, term-send-raw-meta): Use read-key-sequence's
   key decoding rather than do it manually via last-input-event +
   ascii-character.

I'm not sure if the change to term-send-raw breaks anything, but the the
change to term-send-raw-meta definitely prevents the process from
getting M-d correctly.  I've reverted it in the repository for now
(change attached), but you might want to double-check the entire change.


*** lisp/term.el	2010-01-13 08:35:10 +0000
--- lisp/term.el	2010-01-20 17:12:01 +0000
***************
*** 1208,1215 ****
  
  (defun term-send-raw-meta ()
    (interactive)
!   (let* ((keys (this-command-keys))
!          (char (aref keys (1- (length keys)))))
      (term-send-raw-string (if (and (numberp char)
  				   (> char 127)
  				   (< char 256))
--- 1208,1224 ----
  
  (defun term-send-raw-meta ()
    (interactive)
!   (let ((char last-input-event))
!     (when (symbolp last-input-event)
!       ;; Convert `return' to C-m, etc.
!       (let ((tmp (get char 'event-symbol-elements)))
! 	(when tmp
! 	  (setq char (car tmp)))
! 	(when (symbolp char)
! 	  (setq tmp (get char 'ascii-character))
! 	  (when tmp
! 	    (setq char tmp)))))
!     (setq char (event-basic-type char))
      (term-send-raw-string (if (and (numberp char)
  				   (> char 127)
  				   (< char 256))




This bug report was last modified 13 years and 244 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.