GNU bug report logs - #9751
23.3; Alternative Keyboard Feature/Bug

Previous Next

Package: emacs;

Reported by: Nikos Pitsianis <nikos <at> cs.duke.edu>

Date: Fri, 14 Oct 2011 07:19:02 UTC

Severity: normal

Found in version 23.3

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> jurta.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: lekktu <at> gmail.com, Andreas Schwab <schwab <at> linux-m68k.org>,
	Nikos Pitsianis <nikos <at> cs.duke.edu>, 9751 <at> debbugs.gnu.org
Subject: Re: bug#9751: 23.3; Alternative Keyboard Feature/Bug
Date: Tue, 25 Oct 2011 18:45:01 +0300
>> The patch below at least works for this test case,
>
> Installed,

Thanks!  This old problem is finally solved:

http://lists.gnu.org/archive/html/emacs-devel/2009-05/msg00091.html

Building the reverse mapping is possible now with a function like:

(defun reverse-input-method (input-method)
  "Build the reverse mapping of single letters from INPUT-METHOD."
  (interactive
   (list (read-input-method-name "Use input method (default current): ")))
  (if (and input-method (symbolp input-method))
      (setq input-method (symbol-name input-method)))
  (let ((current current-input-method)
        (modifiers '(nil (control) (meta) (control meta))))
    (when input-method
      (activate-input-method input-method))
    (when (and current-input-method quail-keyboard-layout)
      (dolist (map (cdr (quail-map)))
        (let* ((to (car map))
               (from (quail-get-translation
                      (cadr map) (char-to-string to) 1)))
          (when (and (characterp from) (characterp to))
            (dolist (mod modifiers)
              (define-key function-key-map
                (vector (append mod (list from)))
                (vector (append mod (list to)))))))))
    (when input-method
      (activate-input-method current))))




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

Previous Next


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