Mercurial > emacs
comparison lisp/wid-edit.el @ 91433:84e557581b9e
(widget-string-complete): Use assoc-string rather than assoc-ignore-case.
(widget-key-sequence-read-event): Use characterp rather than char-valid-p.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 02 Feb 2008 04:18:45 +0000 |
parents | 606f2d163a64 |
children | bd5e4ff73402 |
comparison
equal
deleted
inserted
replaced
91432:649ddfa757be | 91433:84e557581b9e |
---|---|
3041 (cond ((eq completion t) | 3041 (cond ((eq completion t) |
3042 (when completion-ignore-case | 3042 (when completion-ignore-case |
3043 ;; Replace field with completion in case its case is different. | 3043 ;; Replace field with completion in case its case is different. |
3044 (delete-region (widget-field-start widget) | 3044 (delete-region (widget-field-start widget) |
3045 (widget-field-end widget)) | 3045 (widget-field-end widget)) |
3046 (insert-and-inherit (car (assoc-ignore-case prefix alist)))) | 3046 (insert-and-inherit (car (assoc-string prefix alist t)))) |
3047 (message "Only match")) | 3047 (message "Only match")) |
3048 ((null completion) | 3048 ((null completion) |
3049 (error "No match")) | 3049 (error "No match")) |
3050 ((not (eq t (compare-strings prefix nil nil completion nil nil | 3050 ((not (eq t (compare-strings prefix nil nil completion nil nil |
3051 completion-ignore-case))) | 3051 completion-ignore-case))) |
3300 (and (<= ?a (downcase ev)) | 3300 (and (<= ?a (downcase ev)) |
3301 (< (downcase ev) (+ ?a -10 (min 36 read-quoted-char-radix)))))) | 3301 (< (downcase ev) (+ ?a -10 (min 36 read-quoted-char-radix)))))) |
3302 (setq unread-command-events (cons ev unread-command-events) | 3302 (setq unread-command-events (cons ev unread-command-events) |
3303 ev (read-quoted-char (format "Enter code (radix %d)" read-quoted-char-radix)) | 3303 ev (read-quoted-char (format "Enter code (radix %d)" read-quoted-char-radix)) |
3304 tr nil) | 3304 tr nil) |
3305 (if (and (integerp ev) (not (char-valid-p ev))) | 3305 (if (and (integerp ev) (not (characterp ev))) |
3306 (insert (char-to-string ev)))) ;; throw invalid char error | 3306 (insert (char-to-string ev)))) ;; throw invalid char error |
3307 (setq ev (key-description (list ev))) | 3307 (setq ev (key-description (list ev))) |
3308 (when (arrayp tr) | 3308 (when (arrayp tr) |
3309 (setq tr (key-description (list (aref tr 0)))) | 3309 (setq tr (key-description (list (aref tr 0)))) |
3310 (if (y-or-n-p (format "Key %s is translated to %s -- use %s? " ev tr tr)) | 3310 (if (y-or-n-p (format "Key %s is translated to %s -- use %s? " ev tr tr)) |