comparison lisp/net/eudc.el @ 83397:693e794b57bf

Merged from miles@gnu.org--gnu-2005 (patch 149-151, 629-641) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-629 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-631 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-632 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-633 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-634 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-635 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-636 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-637 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-638 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-639 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-640 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-641 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-149 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-150 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-151 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-437
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 07 Nov 2005 14:56:19 +0000
parents 5f00d2caf8cf
children 067115a6e738 7beb78bc1f8e
comparison
equal deleted inserted replaced
83396:201f610eb492 83397:693e794b57bf
378 (defun eudc-select (choices beg end) 378 (defun eudc-select (choices beg end)
379 "Choose one from CHOICES using a completion. 379 "Choose one from CHOICES using a completion.
380 BEG and END delimit the text which is to be replaced." 380 BEG and END delimit the text which is to be replaced."
381 (let ((replacement)) 381 (let ((replacement))
382 (setq replacement 382 (setq replacement
383 (completing-read "Multiple matches found; choose one:" 383 (completing-read "Multiple matches found; choose one: "
384 (mapcar 'list choices))) 384 (mapcar 'list choices)))
385 (delete-region beg end) 385 (delete-region beg end)
386 (insert replacement))) 386 (insert replacement)))
387 387
388 (defun eudc-query (query &optional return-attributes no-translation) 388 (defun eudc-query (query &optional return-attributes no-translation)
921 (delete-region beg end) 921 (delete-region beg end)
922 (insert (car response-strings))) 922 (insert (car response-strings)))
923 ((eq eudc-multiple-match-handling-method 'select) 923 ((eq eudc-multiple-match-handling-method 'select)
924 (eudc-select response-strings beg end)) 924 (eudc-select response-strings beg end))
925 ((eq eudc-multiple-match-handling-method 'all) 925 ((eq eudc-multiple-match-handling-method 'all)
926 (delete-region beg end)
926 (insert (mapconcat 'identity response-strings ", "))) 927 (insert (mapconcat 'identity response-strings ", ")))
927 ((eq eudc-multiple-match-handling-method 'abort) 928 ((eq eudc-multiple-match-handling-method 'abort)
928 (error "There is more than one match for the query")))) 929 (error "There is more than one match for the query"))))
929 (or (and (equal eudc-server eudc-former-server) 930 (or (and (equal eudc-server eudc-former-server)
930 (equal eudc-protocol eudc-former-protocol)) 931 (equal eudc-protocol eudc-former-protocol))