/[emacs]/emacs/lisp/international/quail.el
ViewVC logotype

Diff of /emacs/lisp/international/quail.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.119 by rms, Sun Feb 3 10:33:01 2002 UTC revision 1.119.4.1 by miles, Fri Apr 4 06:20:22 2003 UTC
# Line 2  Line 2 
2    
3  ;; Copyright (C) 1995, 2000 Electrotechnical Laboratory, JAPAN.  ;; Copyright (C) 1995, 2000 Electrotechnical Laboratory, JAPAN.
4  ;; Licensed to the Free Software Foundation.  ;; Licensed to the Free Software Foundation.
5  ;; Copyright (C) 2001 Free Software Foundation, Inc.  ;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
6    
7  ;; Author: Kenichi HANDA <handa@etl.go.jp>  ;; Author: Kenichi HANDA <handa@etl.go.jp>
8  ;;         Naoto TAKAHASHI <ntakahas@etl.go.jp>  ;;         Naoto TAKAHASHI <ntakahas@etl.go.jp>
# Line 147  See the documentation of `quail-define-p Line 147  See the documentation of `quail-define-p
147          title          title
148        (condition-case nil        (condition-case nil
149            (mapconcat            (mapconcat
150             (lambda (x)             (lambda (x)
151               (cond ((stringp x) x)               (cond ((stringp x) x)
152                     ((and (listp x) (symbolp (car x)) (= (length x) 3))                     ((and (listp x) (symbolp (car x)) (= (length x) 3))
153                      (if (symbol-value (car x))                      (if (symbol-value (car x))
# Line 618  This layout is almost the same as that o Line 618  This layout is almost the same as that o
618   but the location of key \\ (backslash) is just right of key ' (single-quote),   but the location of key \\ (backslash) is just right of key ' (single-quote),
619   not right of RETURN key.")   not right of RETURN key.")
620    
 (defvar quail-keyboard-layout quail-keyboard-layout-standard  
   "A string which represents physical key layout of a particular keyboard.  
 We assume there are six rows and each row has 15 keys (columns),  
         the first row is above the `1' - `0' row,  
         the first column of the second row is left of key `1',  
         the first column of the third row is left of key `q',  
         the first column of the fourth row is left of key `a',  
         the first column of the fifth row is left of key `z',  
         the sixth row is below the `z' - `/' row.  
 Nth (N is even) and (N+1)th characters in the string are non-shifted  
 and shifted characters respectively at the same location.  
 The location of Nth character is row (N / 30) and column ((N mod 30) / 2).  
 The command `quail-set-keyboard-layout' usually sets this variable.")  
   
621  (defconst quail-keyboard-layout-len 180)  (defconst quail-keyboard-layout-len 180)
622    
623  ;; Here we provide several examples of famous keyboard layouts.  ;; Here we provide several examples of famous keyboard layouts.
# Line 671  The command `quail-set-keyboard-layout' Line 657  The command `quail-set-keyboard-layout'
657                                ")                                ")
658     '("pc105-uk" . "\     '("pc105-uk" . "\
659                                \                                \
660  `\2541!2\3\243$5%6^7&8*9(0)-_=+    \  `\2541!2\"3\2434$5%6^7&8*9(0)-_=+     \
661    qQwWeErRtTyYuUiIoOpP[{]}    \    qQwWeErRtTyYuUiIoOpP[{]}    \
662    aAsSdDfFgGhHjJkKlL;:'@#~    \    aAsSdDfFgGhHjJkKlL;:'@#~    \
663  \\|zZxXcCvVbBnNmM,<.>/?        \  \\|zZxXcCvVbBnNmM,<.>/?        \
# Line 681  The command `quail-set-keyboard-layout' Line 667  The command `quail-set-keyboard-layout'
667  See the documentation of `quail-keyboard-layout' for the format of  See the documentation of `quail-keyboard-layout' for the format of
668  the layout string.")  the layout string.")
669    
670    (defcustom quail-keyboard-layout quail-keyboard-layout-standard
671      "A string which represents physical key layout of a particular keyboard.
672    We assume there are six rows and each row has 15 keys (columns),
673            the first row is above the `1' - `0' row,
674            the first column of the second row is left of key `1',
675            the first column of the third row is left of key `q',
676            the first column of the fourth row is left of key `a',
677            the first column of the fifth row is left of key `z',
678            the sixth row is below the `z' - `/' row.
679    Nth (N is even) and (N+1)th characters in the string are non-shifted
680    and shifted characters respectively at the same location.
681    The location of Nth character is row (N / 30) and column ((N mod 30) / 2).
682    The command `quail-set-keyboard-layout' usually sets this variable."
683      :group 'quail
684      :type `(choice
685              ,@(mapcar (lambda (pair)
686                          (list 'const :tag (car pair) (cdr pair)))
687                        quail-keyboard-layout-alist)
688              (string :tag "Other")))
689    
690  ;; A non-standard keyboard layout may miss some key locations of the  ;; A non-standard keyboard layout may miss some key locations of the
691  ;; standard layout while having additional key locations not in the  ;; standard layout while having additional key locations not in the
692  ;; standard layout.  This alist maps those additional key locations to  ;; standard layout.  This alist maps those additional key locations to
# Line 894  The format of KBD-LAYOUT is the same as Line 900  The format of KBD-LAYOUT is the same as
900  The variable `quail-keyboard-layout-type' holds the currently selected  The variable `quail-keyboard-layout-type' holds the currently selected
901  keyboard type."  keyboard type."
902    (interactive    (interactive
903     (list (completing-read "Keyboard type (default, current choise): "     (list (completing-read "Keyboard type (default, current choice): "
904                            quail-keyboard-layout-alist                            quail-keyboard-layout-alist
905                            nil t)))                            nil t)))
906    (or (and keyboard-type (> (length keyboard-type) 0))    (or (and keyboard-type (> (length keyboard-type) 0))
# Line 1906  or in a newly created frame (if the sele Line 1912  or in a newly created frame (if the sele
1912      (let ((default-enable-multibyte-characters enable-multibyte-characters))      (let ((default-enable-multibyte-characters enable-multibyte-characters))
1913        (or (buffer-live-p quail-guidance-buf)        (or (buffer-live-p quail-guidance-buf)
1914            (setq quail-guidance-buf (generate-new-buffer " *Quail-guidance*"))))            (setq quail-guidance-buf (generate-new-buffer " *Quail-guidance*"))))
1915      (let ((name (quail-name))      (let ((package quail-current-package))
           (title (quail-title)))  
1916        (with-current-buffer quail-guidance-buf        (with-current-buffer quail-guidance-buf
1917          ;; To show the title of Quail package.          ;; To show the title of Quail package.
1918          (setq current-input-method name          (setq quail-current-package package
1919                current-input-method-title title)                current-input-method (quail-name)
1920                  current-input-method-title (quail-title))
1921          (erase-buffer)          (erase-buffer)
1922          (or (overlayp quail-overlay)          (or (overlayp quail-overlay)
1923              (progn              (progn
# Line 2124  are shown (at most to the depth specifie Line 2130  are shown (at most to the depth specifie
2130            ;; shown.  We just scroll it appropriately.            ;; shown.  We just scroll it appropriately.
2131            (if (pos-visible-in-window-p (point-max) win)            (if (pos-visible-in-window-p (point-max) win)
2132                (set-window-start win (point-min))                (set-window-start win (point-min))
2133              (let ((other-window-scroll-buffer quail-completion-buf))              (let ((other-window-scroll-buffer quail-completion-buf)
2134                      ;; This nil binding is necessary to surely scroll
2135                      ;; quail-completion-buf.
2136                      (minibuffer-scroll-window nil))
2137                (scroll-other-window)))                (scroll-other-window)))
2138          (setq quail-current-key key)          (setq quail-current-key key)
2139          (erase-buffer)          (erase-buffer)
# Line 2395  should be made by `quail-build-decode-ma Line 2404  should be made by `quail-build-decode-ma
2404    
2405  (define-button-type 'quail-keyboard-layout-button  (define-button-type 'quail-keyboard-layout-button
2406    :supertype 'help-xref    :supertype 'help-xref
2407    'help-function '(lambda (layout)    'help-function '(lambda (layout)
2408                      (help-setup-xref `(quail-keyboard-layout-button ,layout) nil)                      (help-setup-xref `(quail-keyboard-layout-button ,layout) nil)
2409                      (quail-show-keyboard-layout layout))                      (quail-show-keyboard-layout layout))
2410    'help-echo (purecopy "mouse-2, RET: show keyboard layout"))    'help-echo (purecopy "mouse-2, RET: show keyboard layout"))
# Line 2511  KEY BINDINGS FOR CONVERSION Line 2520  KEY BINDINGS FOR CONVERSION
2520        (setq quail-current-package nil)        (setq quail-current-package nil)
2521        ;; Resize the help window again, now that it has all its contents.        ;; Resize the help window again, now that it has all its contents.
2522        (save-selected-window        (save-selected-window
2523          (select-window (get-buffer-window (current-buffer)))          (select-window (get-buffer-window (current-buffer) t))
2524          (run-hooks 'temp-buffer-show-hook)))))          (run-hooks 'temp-buffer-show-hook)))))
2525    
2526  (defun quail-help-insert-keymap-description (keymap &optional header)  (defun quail-help-insert-keymap-description (keymap &optional header)

Legend:
Removed from v.1.119  
changed lines
  Added in v.1.119.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26