diff options
| author | Pavel JanÃk | 2002-01-16 08:22:15 +0000 |
|---|---|---|
| committer | Pavel JanÃk | 2002-01-16 08:22:15 +0000 |
| commit | 530159655600f8b232ce723930d3fb3cdfcb3658 (patch) | |
| tree | 2b06c66406e6589de0ef96f6f580799838ad8d28 | |
| parent | 886a2a61db5c279c8ff1c05e724d284dbdfc0d16 (diff) | |
| download | emacs-530159655600f8b232ce723930d3fb3cdfcb3658.tar.gz emacs-530159655600f8b232ce723930d3fb3cdfcb3658.zip | |
New maintainer. Change author's address.
(eudc-pre-select-window-configuration, eudc-insertion-marker): Variables
removed.
(eudc-insert-selected): Function removed.
(eudc-select): Reimplemented.
(eudc-expand-inline): Delete the strings only after its expansion is chosen
not before.
| -rw-r--r-- | lisp/ChangeLog | 18 | ||||
| -rw-r--r-- | lisp/net/eudc.el | 51 |
2 files changed, 35 insertions, 34 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ddb737f5ae6..d8052855640 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,6 +1,22 @@ | |||
| 1 | 2002-01-16 Pavel Jan,Bm(Bk <Pavel@Janik.cz> | 1 | 2002-01-16 Pavel Jan,Bm(Bk <Pavel@Janik.cz> |
| 2 | 2 | ||
| 3 | * net/eudc-export.el: New maintainer. Change author's address. | 3 | * net/eudc.el: New maintainer. Change author's address. |
| 4 | (eudc-pre-select-window-configuration, eudc-insertion-marker): | ||
| 5 | Variables removed. | ||
| 6 | (eudc-insert-selected): Function removed. | ||
| 7 | (eudc-select): Reimplemented. | ||
| 8 | (eudc-expand-inline): Delete the strings only after its expansion | ||
| 9 | is chosen not before. | ||
| 10 | |||
| 11 | * net/eudcb-ph.el (eudc-ph-open-session): Remove XEmacs case. | ||
| 12 | Minor coding style fixes. | ||
| 13 | |||
| 14 | * net/eudcb-ldap.el: New maintainer. Change author's address. | ||
| 15 | (eudc-attribute-display-method-alist): Display mail with | ||
| 16 | eudc-display-mail. | ||
| 17 | |||
| 18 | * net/eudcb-bbdb.el, net/eudc-export.el, net/eudc-hotlist.el, | ||
| 19 | * net/eudc-vars.el: New maintainer. Change author's address. | ||
| 4 | 20 | ||
| 5 | * net/eudc-bob.el: New maintainer. Change author's address. | 21 | * net/eudc-bob.el: New maintainer. Change author's address. |
| 6 | (eudc-bob-mail-keymap): New keymap for e-mail addresses. | 22 | (eudc-bob-mail-keymap): New keymap for e-mail addresses. |
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index ba46daad44d..81caa04e45d 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | ;;; eudc.el --- Emacs Unified Directory Client | 1 | ;;; eudc.el --- Emacs Unified Directory Client |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Oscar Figueiredo <oscar@xemacs.org> | 5 | ;; Author: Oscar Figueiredo <oscar@cpe.fr> |
| 6 | ;; Maintainer: Oscar Figueiredo <oscar@xemacs.org> | 6 | ;; Maintainer: Pavel Janík <Pavel@Janik.cz> |
| 7 | ;; Keywords: comm | 7 | ;; Keywords: comm |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| @@ -74,9 +74,6 @@ | |||
| 74 | 74 | ||
| 75 | (defvar eudc-form-widget-list nil) | 75 | (defvar eudc-form-widget-list nil) |
| 76 | (defvar eudc-mode-map nil) | 76 | (defvar eudc-mode-map nil) |
| 77 | ;; Used by the selection insertion mechanism | ||
| 78 | (defvar eudc-pre-select-window-configuration nil) | ||
| 79 | (defvar eudc-insertion-marker nil) | ||
| 80 | 77 | ||
| 81 | ;; List of known servers | 78 | ;; List of known servers |
| 82 | ;; Alist of (SERVER . PROTOCOL) | 79 | ;; Alist of (SERVER . PROTOCOL) |
| @@ -375,26 +372,15 @@ The translation is done according to | |||
| 375 | list)) | 372 | list)) |
| 376 | list)) | 373 | list)) |
| 377 | 374 | ||
| 378 | (defun eudc-select (choices) | 375 | (defun eudc-select (choices beg end) |
| 379 | "Choose one from CHOICES using a completion buffer." | 376 | "Choose one from CHOICES using a completion. |
| 380 | (setq eudc-pre-select-window-configuration (current-window-configuration)) | 377 | BEG and END delimit the text which is to be replaced." |
| 381 | (setq eudc-insertion-marker (point-marker)) | 378 | (let ((replacement)) |
| 382 | (with-output-to-temp-buffer "*EUDC Completions*" | 379 | (setq replacement |
| 383 | (apply 'display-completion-list | 380 | (completing-read "Multiple matches found; choose one:" |
| 384 | choices | 381 | (mapcar 'list choices))) |
| 385 | (if eudc-xemacs-p | 382 | (delete-region beg end) |
| 386 | '(:activate-callback eudc-insert-selected))))) | 383 | (insert replacement))) |
| 387 | |||
| 388 | (defun eudc-insert-selected (event extent user) | ||
| 389 | "Insert a completion at the appropriate point." | ||
| 390 | (when eudc-insertion-marker | ||
| 391 | (set-buffer (marker-buffer eudc-insertion-marker)) | ||
| 392 | (goto-char eudc-insertion-marker) | ||
| 393 | (insert (extent-string extent))) | ||
| 394 | (if eudc-pre-select-window-configuration | ||
| 395 | (set-window-configuration eudc-pre-select-window-configuration)) | ||
| 396 | (setq eudc-pre-select-window-configuration nil | ||
| 397 | eudc-insertion-marker nil)) | ||
| 398 | 384 | ||
| 399 | (defun eudc-query (query &optional return-attributes no-translation) | 385 | (defun eudc-query (query &optional return-attributes no-translation) |
| 400 | "Query the current directory server with QUERY. | 386 | "Query the current directory server with QUERY. |
| @@ -824,8 +810,8 @@ The variable `eudc-inline-query-format' controls how to associate the | |||
| 824 | individual inline query words with directory attribute names. | 810 | individual inline query words with directory attribute names. |
| 825 | After querying the server for the given string, the expansion specified by | 811 | After querying the server for the given string, the expansion specified by |
| 826 | `eudc-inline-expansion-format' is inserted in the buffer at point. | 812 | `eudc-inline-expansion-format' is inserted in the buffer at point. |
| 827 | If REPLACE is non nil, then this expansion replaces the name in the buffer. | 813 | If REPLACE is non-nil, then this expansion replaces the name in the buffer. |
| 828 | `eudc-expansion-overwrites-query' being non nil inverts the meaning of REPLACE. | 814 | `eudc-expansion-overwrites-query' being non-nil inverts the meaning of REPLACE. |
| 829 | Multiple servers can be tried with the same query until one finds a match, | 815 | Multiple servers can be tried with the same query until one finds a match, |
| 830 | see `eudc-inline-expansion-servers'" | 816 | see `eudc-inline-expansion-servers'" |
| 831 | (interactive) | 817 | (interactive) |
| @@ -923,19 +909,19 @@ see `eudc-inline-expansion-servers'" | |||
| 923 | (if (or | 909 | (if (or |
| 924 | (and replace (not eudc-expansion-overwrites-query)) | 910 | (and replace (not eudc-expansion-overwrites-query)) |
| 925 | (and (not replace) eudc-expansion-overwrites-query)) | 911 | (and (not replace) eudc-expansion-overwrites-query)) |
| 926 | (delete-region beg end)) | 912 | (kill-ring-save beg end)) |
| 927 | (cond | 913 | (cond |
| 928 | ((or (= (length response-strings) 1) | 914 | ((or (= (length response-strings) 1) |
| 929 | (null eudc-multiple-match-handling-method) | 915 | (null eudc-multiple-match-handling-method) |
| 930 | (eq eudc-multiple-match-handling-method 'first)) | 916 | (eq eudc-multiple-match-handling-method 'first)) |
| 917 | (delete-region beg end) | ||
| 931 | (insert (car response-strings))) | 918 | (insert (car response-strings))) |
| 932 | ((eq eudc-multiple-match-handling-method 'select) | 919 | ((eq eudc-multiple-match-handling-method 'select) |
| 933 | (eudc-select response-strings)) | 920 | (eudc-select response-strings beg end)) |
| 934 | ((eq eudc-multiple-match-handling-method 'all) | 921 | ((eq eudc-multiple-match-handling-method 'all) |
| 935 | (insert (mapconcat 'identity response-strings ", "))) | 922 | (insert (mapconcat 'identity response-strings ", "))) |
| 936 | ((eq eudc-multiple-match-handling-method 'abort) | 923 | ((eq eudc-multiple-match-handling-method 'abort) |
| 937 | (error "There is more than one match for the query")) | 924 | (error "There is more than one match for the query")))) |
| 938 | )) | ||
| 939 | (or (and (equal eudc-server eudc-former-server) | 925 | (or (and (equal eudc-server eudc-former-server) |
| 940 | (equal eudc-protocol eudc-former-protocol)) | 926 | (equal eudc-protocol eudc-former-protocol)) |
| 941 | (eudc-set-server eudc-former-server eudc-former-protocol t))) | 927 | (eudc-set-server eudc-former-server eudc-former-protocol t))) |
| @@ -1115,7 +1101,6 @@ queries the server for the existing fields and displays a corresponding form." | |||
| 1115 | (goto-char pt) | 1101 | (goto-char pt) |
| 1116 | (error "No more records before point"))))) | 1102 | (error "No more records before point"))))) |
| 1117 | 1103 | ||
| 1118 | |||
| 1119 | ;;}}} | 1104 | ;;}}} |
| 1120 | 1105 | ||
| 1121 | ;;{{{ Menus an keymaps | 1106 | ;;{{{ Menus an keymaps |