diff options
| author | Pavel Janík | 2002-01-16 08:16:01 +0000 |
|---|---|---|
| committer | Pavel Janík | 2002-01-16 08:16:01 +0000 |
| commit | 886a2a61db5c279c8ff1c05e724d284dbdfc0d16 (patch) | |
| tree | f5c63318d85e1273c72657c434f5a9641551ab64 | |
| parent | ee9a44abfd227b91ed7ef80c54f6e9c61aed0e86 (diff) | |
| download | emacs-886a2a61db5c279c8ff1c05e724d284dbdfc0d16.tar.gz emacs-886a2a61db5c279c8ff1c05e724d284dbdfc0d16.zip | |
(eudc-ph-open-session): Remove XEmacs case.
Minor coding style fixes.
| -rw-r--r-- | lisp/net/eudcb-ph.el | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/lisp/net/eudcb-ph.el b/lisp/net/eudcb-ph.el index a3c8f80177f..68d03979f48 100644 --- a/lisp/net/eudcb-ph.el +++ b/lisp/net/eudcb-ph.el | |||
| @@ -24,14 +24,14 @@ | |||
| 24 | ;; Boston, MA 02111-1307, USA. | 24 | ;; Boston, MA 02111-1307, USA. |
| 25 | 25 | ||
| 26 | ;;; Commentary: | 26 | ;;; Commentary: |
| 27 | |||
| 27 | ;; This library provides specific CCSO PH/QI protocol support for the | 28 | ;; This library provides specific CCSO PH/QI protocol support for the |
| 28 | ;; Emacs Unified Directory Client package | 29 | ;; Emacs Unified Directory Client package. |
| 29 | 30 | ||
| 30 | ;;; Code: | 31 | ;;; Code: |
| 31 | 32 | ||
| 32 | (require 'eudc) | 33 | (require 'eudc) |
| 33 | 34 | ||
| 34 | |||
| 35 | ;;{{{ Internal cooking | 35 | ;;{{{ Internal cooking |
| 36 | 36 | ||
| 37 | (eudc-protocol-set 'eudc-bbdb-conversion-alist 'eudc-ph-bbdb-conversion-alist 'ph) | 37 | (eudc-protocol-set 'eudc-bbdb-conversion-alist 'eudc-ph-bbdb-conversion-alist 'ph) |
| @@ -45,9 +45,6 @@ | |||
| 45 | (defconst eudc-ph-default-server-port 105 | 45 | (defconst eudc-ph-default-server-port 105 |
| 46 | "Default TCP port for CCSO PH/QI directory services.") | 46 | "Default TCP port for CCSO PH/QI directory services.") |
| 47 | 47 | ||
| 48 | |||
| 49 | |||
| 50 | |||
| 51 | (defun eudc-ph-query-internal (query &optional return-fields) | 48 | (defun eudc-ph-query-internal (query &optional return-fields) |
| 52 | "Query the PH/QI server with QUERY. | 49 | "Query the PH/QI server with QUERY. |
| 53 | QUERY can be a string NAME or a list made of strings NAME | 50 | QUERY can be a string NAME or a list made of strings NAME |
| @@ -86,7 +83,6 @@ are returned" | |||
| 86 | (eudc-ph-parse-query-result) | 83 | (eudc-ph-parse-query-result) |
| 87 | (mapcar 'eudc-caar (eudc-ph-parse-query-result)))) | 84 | (mapcar 'eudc-caar (eudc-ph-parse-query-result)))) |
| 88 | 85 | ||
| 89 | |||
| 90 | (defun eudc-ph-parse-query-result (&optional fields) | 86 | (defun eudc-ph-parse-query-result (&optional fields) |
| 91 | "Return a list of alists of key/values from in `eudc-ph-process-buffer'. | 87 | "Return a list of alists of key/values from in `eudc-ph-process-buffer'. |
| 92 | Fields not in FIELDS are discarded." | 88 | Fields not in FIELDS are discarded." |
| @@ -140,11 +136,9 @@ Fields not in FIELDS are discarded." | |||
| 140 | (setq record (if (not (eq 'list eudc-duplicate-attribute-handling-method)) | 136 | (setq record (if (not (eq 'list eudc-duplicate-attribute-handling-method)) |
| 141 | (eudc-filter-duplicate-attributes record) | 137 | (eudc-filter-duplicate-attributes record) |
| 142 | (list record))) | 138 | (list record))) |
| 143 | (setq records (append record records)))) | 139 | (setq records (append record records))))) |
| 144 | ) | ||
| 145 | (message "Done") | 140 | (message "Done") |
| 146 | records) | 141 | records)) |
| 147 | ) | ||
| 148 | 142 | ||
| 149 | (defun eudc-ph-do-request (request) | 143 | (defun eudc-ph-do-request (request) |
| 150 | "Send REQUEST to the server. | 144 | "Send REQUEST to the server. |
| @@ -192,15 +186,12 @@ SERVER is either a string naming the server or a list (NAME PORT)." | |||
| 192 | (process-kill-without-query process) | 186 | (process-kill-without-query process) |
| 193 | process))) | 187 | process))) |
| 194 | 188 | ||
| 195 | |||
| 196 | (defun eudc-ph-close-session (process) | 189 | (defun eudc-ph-close-session (process) |
| 197 | (save-excursion | 190 | (save-excursion |
| 198 | (set-buffer (process-buffer process)) | 191 | (set-buffer (process-buffer process)) |
| 199 | (eudc-ph-send-command process "quit") | 192 | (eudc-ph-send-command process "quit") |
| 200 | (eudc-ph-read-response process) | 193 | (eudc-ph-read-response process) |
| 201 | (if (fboundp 'add-async-timeout) | 194 | (run-at-time 2 nil 'delete-process process))) |
| 202 | (add-async-timeout 10 'delete-process process) | ||
| 203 | (run-at-time 2 nil 'delete-process process)))) | ||
| 204 | 195 | ||
| 205 | (defun eudc-ph-send-command (process command) | 196 | (defun eudc-ph-send-command (process command) |
| 206 | (goto-char (point-max)) | 197 | (goto-char (point-max)) |
| @@ -249,7 +240,6 @@ depending on RETURN-RESPONSE." | |||
| 249 | 240 | ||
| 250 | ;;}}} | 241 | ;;}}} |
| 251 | 242 | ||
| 252 | |||
| 253 | (eudc-register-protocol 'ph) | 243 | (eudc-register-protocol 'ph) |
| 254 | 244 | ||
| 255 | (provide 'eudcb-ph) | 245 | (provide 'eudcb-ph) |