Commits

sperber-guest  committed cfd91cf Merge

Correct #'define-key syntax, eliminate byte-compile warnings, quail.el

  • Participants
  • Parent commits f439666, 7412ddc

Comments (0)

Files changed (2)

+2010-09-03  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* quail.el:
+	* quail.el (quail-translation-keymap):
+	* quail.el (quail-simple-translation-keymap):
+	* quail.el (quail-set-keyboard-layout):
+	* quail.el (quail-update-current-translations):
+	* quail.el (frame-char-height): New.
+	* quail.el (quail-completion-list-translations):
+	* quail.el (quail-translation-help):
+	* quail.el (quail-update-leim-list-file):
+	Make the #'define-key syntax in this file conform to our
+	documentation; eliminate byte-compiler warnings, in the process
+	fixing at least two honest-to-goodness bugs.
+
 2010-02-21  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.31 released.
     (define-key map "\C-h" 'quail-translation-help)
 ;;; This interferes with handling of escape sequences on non-X terminals.
 ;;;    (define-key map "\e" '(keymap (t . quail-execute-non-quail-command)))
-    (define-key map [?\C-\ ] 'quail-select-current)
+    (define-key map [(control space)] 'quail-select-current)
     (define-key map [tab] 'quail-completion)
     (define-key map [delete] 'quail-backward-or-forward-delete-char)
     (define-key map [backspace] 'quail-delete-backward-char)
 	(define-key map (char-to-string meta-prefix-char) meta-map))
       (define-key map [escape] meta-map))
     (when (characterp meta-prefix-char)
-      (define-key map (vector meta-prefix-char t)
+      (define-key map (string meta-prefix-char ?t)
 	'quail-execute-non-quail-command))
     ;; At last, define default key binding.
     (set-keymap-default-binding map 'quail-execute-non-quail-command)
 	(define-key map (char-to-string meta-prefix-char) meta-map))
       (define-key map [escape] meta-map))
     (when (characterp meta-prefix-char)
-      (define-key map (vector meta-prefix-char t)
+      (define-key map (string meta-prefix-char ?t)
 	'quail-execute-non-quail-command))
     ;; At last, define default key binding.
     (set-keymap-default-binding map 'quail-execute-non-quail-command)
 function tells Quail system the layout of your keyboard so that what
 you type is correctly handled."
   (interactive
-   (let* ((completing-ignore-case t)
+   (let* ((completion-ignore-case t)
 	  (type (completing-read "Keyboard type: "
 				 quail-keyboard-layout-alist)))
      (list type)))
 	      (maxcol (- (window-width quail-guidance-win)
 			 quail-guidance-translations-starting-column))
 	      (block (nth 3 indices))
-	      col idx width trans num-items blocks)
+	      col idx width trans num-items)
 	  (if (< cur start)
 	      ;; We must calculate from the head.
 	      (setq start 0 block 0)
 
 ;; Guidance, Completion, and Help buffer handlers.
 
+(defun-when-void frame-char-height (&optional frame)
+  "Return the height in pixels of a line of text on FRAME.
+
+If FRAME is on a TTY console, return the integer 1."
+  (face-height 'default (or frame (selected-frame))))
+
 ;; Make a new one-line frame for Quail guidance buffer.
 (defun quail-make-guidance-frame (buf)
   (let* ((fparam (frame-parameters))
       (setq translations (cdr translations))
       ;; Insert every 10 elements with indices in a line.
       (let ((len (length translations))
-	    (i 0)
-	    num)
+	    (i 0))
 	(while (< i len)
 	  (when (zerop (% i 10))
 	    (when (>= i 10)
 	(set-buffer standard-output)
 	(let ((quail-current-package package))
 	  (princ "You are translating the key sequence ")
-	  (prin1 quail-current-key)
+	  (prin1 current-key)
 	  (princ" in Quail mode.\n")
 	  (quail-help-insert-keymap-description
 	   (quail-translation-keymap)
   (interactive "FDirectory of LEIM: ")
   (setq dirname (expand-file-name dirname))
   (let ((leim-list (expand-file-name leim-list-file-name dirname))
-	quail-dirs list-buf pkg-list pkg-buf pos)
+	quail-dirs list-buf pkg-list pos)
     (if (not (file-writable-p leim-list))
 	(error "Can't write to file \"%s\"" leim-list))
     (message "Updating %s ..." leim-list)