diff options
| author | Pavel Janík | 2002-01-06 15:08:06 +0000 |
|---|---|---|
| committer | Pavel Janík | 2002-01-06 15:08:06 +0000 |
| commit | aed3fbc3874448cbc20d0d0b884174ace026564e (patch) | |
| tree | 8c7054699925fbae8239e9ccaeed1d22f372401b | |
| parent | 82d72d650c92b33282cfb7de0f40df8a8b8eedb6 (diff) | |
| download | emacs-aed3fbc3874448cbc20d0d0b884174ace026564e.tar.gz emacs-aed3fbc3874448cbc20d0d0b884174ace026564e.zip | |
Remove unnecessary whitespaces.
| -rw-r--r-- | lisp/net/eudc-bob.el | 9 | ||||
| -rw-r--r-- | lisp/net/eudc-export.el | 14 | ||||
| -rw-r--r-- | lisp/net/eudc-hotlist.el | 14 | ||||
| -rw-r--r-- | lisp/net/eudcb-bbdb.el | 6 | ||||
| -rw-r--r-- | lisp/net/eudcb-ldap.el | 64 | ||||
| -rw-r--r-- | lisp/net/eudcb-ph.el | 20 |
6 files changed, 63 insertions, 64 deletions
diff --git a/lisp/net/eudc-bob.el b/lisp/net/eudc-bob.el index 822a6e7db1e..a005e7f4523 100644 --- a/lisp/net/eudc-bob.el +++ b/lisp/net/eudc-bob.el | |||
| @@ -56,14 +56,14 @@ | |||
| 56 | ["Toggle inline display" eudc-bob-toggle-inline-display | 56 | ["Toggle inline display" eudc-bob-toggle-inline-display |
| 57 | (eudc-bob-can-display-inline-images)] | 57 | (eudc-bob-can-display-inline-images)] |
| 58 | ,@(cdr (cdr eudc-bob-generic-menu)))) | 58 | ,@(cdr (cdr eudc-bob-generic-menu)))) |
| 59 | 59 | ||
| 60 | (defconst eudc-bob-sound-menu | 60 | (defconst eudc-bob-sound-menu |
| 61 | `("EUDC Sound Menu" | 61 | `("EUDC Sound Menu" |
| 62 | ["---" nil nil] | 62 | ["---" nil nil] |
| 63 | ["Play sound" eudc-bob-play-sound-at-point | 63 | ["Play sound" eudc-bob-play-sound-at-point |
| 64 | (fboundp 'play-sound)] | 64 | (fboundp 'play-sound)] |
| 65 | ,@(cdr (cdr eudc-bob-generic-menu)))) | 65 | ,@(cdr (cdr eudc-bob-generic-menu)))) |
| 66 | 66 | ||
| 67 | (defun eudc-jump-to-event (event) | 67 | (defun eudc-jump-to-event (event) |
| 68 | "Jump to the window and point where EVENT occurred." | 68 | "Jump to the window and point where EVENT occurred." |
| 69 | (if eudc-xemacs-p | 69 | (if eudc-xemacs-p |
| @@ -270,7 +270,7 @@ display a button." | |||
| 270 | (defun eudc-bob-menu () | 270 | (defun eudc-bob-menu () |
| 271 | "Retrieve the menu attached to a binary object." | 271 | "Retrieve the menu attached to a binary object." |
| 272 | (eudc-bob-get-overlay-prop 'menu)) | 272 | (eudc-bob-get-overlay-prop 'menu)) |
| 273 | 273 | ||
| 274 | (defun eudc-bob-popup-menu (event) | 274 | (defun eudc-bob-popup-menu (event) |
| 275 | "Pop-up a menu of EUDC multimedia commands." | 275 | "Pop-up a menu of EUDC multimedia commands." |
| 276 | (interactive "@e") | 276 | (interactive "@e") |
| @@ -321,7 +321,6 @@ display a button." | |||
| 321 | (set-keymap-parent eudc-bob-image-keymap eudc-bob-generic-keymap) | 321 | (set-keymap-parent eudc-bob-image-keymap eudc-bob-generic-keymap) |
| 322 | (set-keymap-parent eudc-bob-sound-keymap eudc-bob-generic-keymap) | 322 | (set-keymap-parent eudc-bob-sound-keymap eudc-bob-generic-keymap) |
| 323 | 323 | ||
| 324 | |||
| 325 | (if eudc-emacs-p | 324 | (if eudc-emacs-p |
| 326 | (progn | 325 | (progn |
| 327 | (easy-menu-define eudc-bob-generic-menu | 326 | (easy-menu-define eudc-bob-generic-menu |
| @@ -362,5 +361,5 @@ display a button." | |||
| 362 | (defun eudc-display-jpeg-as-button (data) | 361 | (defun eudc-display-jpeg-as-button (data) |
| 363 | "Display a button for the JPEG DATA." | 362 | "Display a button for the JPEG DATA." |
| 364 | (eudc-bob-display-jpeg data nil)) | 363 | (eudc-bob-display-jpeg data nil)) |
| 365 | 364 | ||
| 366 | ;;; eudc-bob.el ends here | 365 | ;;; eudc-bob.el ends here |
diff --git a/lisp/net/eudc-export.el b/lisp/net/eudc-export.el index 8d6ff308eae..25823fcb22f 100644 --- a/lisp/net/eudc-export.el +++ b/lisp/net/eudc-export.el | |||
| @@ -44,7 +44,7 @@ symbol and VALUE is the corresponding value for the record. | |||
| 44 | If SILENT is non-nil then the created BBDB record is not displayed." | 44 | If SILENT is non-nil then the created BBDB record is not displayed." |
| 45 | ;; This function runs in a special context where lisp symbols corresponding | 45 | ;; This function runs in a special context where lisp symbols corresponding |
| 46 | ;; to field names in record are bound to the corresponding values | 46 | ;; to field names in record are bound to the corresponding values |
| 47 | (eval | 47 | (eval |
| 48 | `(let* (,@(mapcar '(lambda (c) | 48 | `(let* (,@(mapcar '(lambda (c) |
| 49 | (list (car c) (if (listp (cdr c)) | 49 | (list (car c) (if (listp (cdr c)) |
| 50 | (list 'quote (cdr c)) | 50 | (list 'quote (cdr c)) |
| @@ -86,8 +86,8 @@ If SILENT is non-nil then the created BBDB record is not displayed." | |||
| 86 | (cons (car mapping) value)))) | 86 | (cons (car mapping) value)))) |
| 87 | conversion-alist))) | 87 | conversion-alist))) |
| 88 | (setq bbdb-notes (delq nil bbdb-notes)) | 88 | (setq bbdb-notes (delq nil bbdb-notes)) |
| 89 | (setq bbdb-record (bbdb-create-internal bbdb-name | 89 | (setq bbdb-record (bbdb-create-internal bbdb-name |
| 90 | bbdb-company | 90 | bbdb-company |
| 91 | bbdb-net | 91 | bbdb-net |
| 92 | bbdb-address | 92 | bbdb-address |
| 93 | bbdb-phones | 93 | bbdb-phones |
| @@ -98,7 +98,7 @@ If SILENT is non-nil then the created BBDB record is not displayed." | |||
| 98 | (defun eudc-parse-spec (spec record recurse) | 98 | (defun eudc-parse-spec (spec record recurse) |
| 99 | "Parse the conversion SPEC using RECORD. | 99 | "Parse the conversion SPEC using RECORD. |
| 100 | If RECURSE is non-nil then SPEC may be a list of atomic specs." | 100 | If RECURSE is non-nil then SPEC may be a list of atomic specs." |
| 101 | (cond | 101 | (cond |
| 102 | ((or (stringp spec) | 102 | ((or (stringp spec) |
| 103 | (symbolp spec) | 103 | (symbolp spec) |
| 104 | (and (listp spec) | 104 | (and (listp spec) |
| @@ -149,7 +149,7 @@ LOCATION is used as the address location for bbdb." | |||
| 149 | zip (string-to-number (match-string 1 last1)))) | 149 | zip (string-to-number (match-string 1 last1)))) |
| 150 | (t | 150 | (t |
| 151 | (error "Cannot parse the address")))) | 151 | (error "Cannot parse the address")))) |
| 152 | (vector location | 152 | (vector location |
| 153 | (or (nth 0 addr-components) "") | 153 | (or (nth 0 addr-components) "") |
| 154 | (or (nth 1 addr-components) "") | 154 | (or (nth 1 addr-components) "") |
| 155 | (or (nth 2 addr-components) "") | 155 | (or (nth 2 addr-components) "") |
| @@ -162,7 +162,7 @@ LOCATION is used as the address location for bbdb." | |||
| 162 | PHONE is either a string supposedly containing a phone number or | 162 | PHONE is either a string supposedly containing a phone number or |
| 163 | a list of such strings which are concatenated. | 163 | a list of such strings which are concatenated. |
| 164 | LOCATION is used as the phone location for BBDB." | 164 | LOCATION is used as the phone location for BBDB." |
| 165 | (cond | 165 | (cond |
| 166 | ((stringp phone) | 166 | ((stringp phone) |
| 167 | (let (phone-list) | 167 | (let (phone-list) |
| 168 | (condition-case err | 168 | (condition-case err |
| @@ -180,7 +180,7 @@ LOCATION is used as the phone location for BBDB." | |||
| 180 | (vector location (mapconcat 'identity phone ", "))) | 180 | (vector location (mapconcat 'identity phone ", "))) |
| 181 | (t | 181 | (t |
| 182 | (error "Invalid phone specification")))) | 182 | (error "Invalid phone specification")))) |
| 183 | 183 | ||
| 184 | (defun eudc-batch-export-records-to-bbdb () | 184 | (defun eudc-batch-export-records-to-bbdb () |
| 185 | "Insert all the records returned by a directory query into BBDB." | 185 | "Insert all the records returned by a directory query into BBDB." |
| 186 | (interactive) | 186 | (interactive) |
diff --git a/lisp/net/eudc-hotlist.el b/lisp/net/eudc-hotlist.el index 2496a28e633..7853b3878c6 100644 --- a/lisp/net/eudc-hotlist.el +++ b/lisp/net/eudc-hotlist.el | |||
| @@ -67,7 +67,7 @@ These are the special commands of this mode: | |||
| 67 | (switch-to-buffer (get-buffer-create "*EUDC Servers*")) | 67 | (switch-to-buffer (get-buffer-create "*EUDC Servers*")) |
| 68 | (setq buffer-read-only nil) | 68 | (setq buffer-read-only nil) |
| 69 | (erase-buffer) | 69 | (erase-buffer) |
| 70 | (mapcar (function | 70 | (mapcar (function |
| 71 | (lambda (entry) | 71 | (lambda (entry) |
| 72 | (setq proto-col (max (length (car entry)) proto-col)))) | 72 | (setq proto-col (max (length (car entry)) proto-col)))) |
| 73 | eudc-server-hotlist) | 73 | eudc-server-hotlist) |
| @@ -113,7 +113,7 @@ These are the special commands of this mode: | |||
| 113 | (let ((buffer-read-only nil)) | 113 | (let ((buffer-read-only nil)) |
| 114 | (save-excursion | 114 | (save-excursion |
| 115 | (beginning-of-line) | 115 | (beginning-of-line) |
| 116 | (if (and (>= (point) eudc-hotlist-list-beginning) | 116 | (if (and (>= (point) eudc-hotlist-list-beginning) |
| 117 | (looking-at "^\\([-.a-zA-Z:0-9]+\\)[ \t]+\\([a-zA-Z]+\\)")) | 117 | (looking-at "^\\([-.a-zA-Z:0-9]+\\)[ \t]+\\([a-zA-Z]+\\)")) |
| 118 | (kill-line 1) | 118 | (kill-line 1) |
| 119 | (error "No server on this line"))))) | 119 | (error "No server on this line"))))) |
| @@ -131,7 +131,7 @@ These are the special commands of this mode: | |||
| 131 | hotlist)) | 131 | hotlist)) |
| 132 | (forward-line 1)) | 132 | (forward-line 1)) |
| 133 | (if (not (looking-at "^[ \t]*$")) | 133 | (if (not (looking-at "^[ \t]*$")) |
| 134 | (error "Malformed entry in hotlist, discarding edits")) | 134 | (error "Malformed entry in hotlist, discarding edits")) |
| 135 | (setq eudc-server-hotlist (nreverse hotlist)) | 135 | (setq eudc-server-hotlist (nreverse hotlist)) |
| 136 | (eudc-install-menu) | 136 | (eudc-install-menu) |
| 137 | (eudc-save-options) | 137 | (eudc-save-options) |
| @@ -150,7 +150,7 @@ These are the special commands of this mode: | |||
| 150 | (eudc-set-server (match-string 1) (intern (match-string 2))) | 150 | (eudc-set-server (match-string 1) (intern (match-string 2))) |
| 151 | (message "Current directory server is %s (%s)" eudc-server eudc-protocol)) | 151 | (message "Current directory server is %s (%s)" eudc-server eudc-protocol)) |
| 152 | (error "No server on this line")))) | 152 | (error "No server on this line")))) |
| 153 | 153 | ||
| 154 | (defun eudc-hotlist-transpose-servers () | 154 | (defun eudc-hotlist-transpose-servers () |
| 155 | "Swap the order of the server with the previous one in the list." | 155 | "Swap the order of the server with the previous one in the list." |
| 156 | (interactive) | 156 | (interactive) |
| @@ -161,13 +161,13 @@ These are the special commands of this mode: | |||
| 161 | (beginning-of-line) | 161 | (beginning-of-line) |
| 162 | (if (and (>= (point) eudc-hotlist-list-beginning) | 162 | (if (and (>= (point) eudc-hotlist-list-beginning) |
| 163 | (looking-at "^\\([-.a-zA-Z:0-9]+\\)[ \t]+\\([a-zA-Z]+\\)") | 163 | (looking-at "^\\([-.a-zA-Z:0-9]+\\)[ \t]+\\([a-zA-Z]+\\)") |
| 164 | (progn | 164 | (progn |
| 165 | (forward-line -1) | 165 | (forward-line -1) |
| 166 | (looking-at "^\\([-.a-zA-Z:0-9]+\\)[ \t]+\\([a-zA-Z]+\\)"))) | 166 | (looking-at "^\\([-.a-zA-Z:0-9]+\\)[ \t]+\\([a-zA-Z]+\\)"))) |
| 167 | (progn | 167 | (progn |
| 168 | (forward-line 1) | 168 | (forward-line 1) |
| 169 | (transpose-lines 1)))))) | 169 | (transpose-lines 1)))))) |
| 170 | 170 | ||
| 171 | (setq eudc-hotlist-mode-map | 171 | (setq eudc-hotlist-mode-map |
| 172 | (let ((map (make-sparse-keymap))) | 172 | (let ((map (make-sparse-keymap))) |
| 173 | (define-key map "a" 'eudc-hotlist-add-server) | 173 | (define-key map "a" 'eudc-hotlist-add-server) |
| @@ -189,7 +189,7 @@ These are the special commands of this mode: | |||
| 189 | ["Exit without Saving" kill-this-buffer t])) | 189 | ["Exit without Saving" kill-this-buffer t])) |
| 190 | 190 | ||
| 191 | (if eudc-emacs-p | 191 | (if eudc-emacs-p |
| 192 | (easy-menu-define eudc-hotlist-emacs-menu | 192 | (easy-menu-define eudc-hotlist-emacs-menu |
| 193 | eudc-hotlist-mode-map | 193 | eudc-hotlist-mode-map |
| 194 | "" | 194 | "" |
| 195 | eudc-hotlist-menu)) | 195 | eudc-hotlist-menu)) |
diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el index a7441c2c295..258f9518659 100644 --- a/lisp/net/eudcb-bbdb.el +++ b/lisp/net/eudcb-bbdb.el | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | ;; Boston, MA 02111-1307, USA. | 24 | ;; Boston, MA 02111-1307, USA. |
| 25 | 25 | ||
| 26 | ;;; Commentary: | 26 | ;;; Commentary: |
| 27 | ;; This library provides an interface to use BBDB as a backend of | 27 | ;; This library provides an interface to use BBDB as a backend of |
| 28 | ;; the Emacs Unified Directory Client. | 28 | ;; the Emacs Unified Directory Client. |
| 29 | 29 | ||
| 30 | ;;; Code: | 30 | ;;; Code: |
| @@ -214,7 +214,7 @@ RETURN-ATTRS is a list of attributes to return, defaulting to | |||
| 214 | records))))) | 214 | records))))) |
| 215 | result)) | 215 | result)) |
| 216 | 216 | ||
| 217 | ;;}}} | 217 | ;;}}} |
| 218 | 218 | ||
| 219 | ;;{{{ High-level interfaces (interactive functions) | 219 | ;;{{{ High-level interfaces (interactive functions) |
| 220 | 220 | ||
| @@ -224,7 +224,7 @@ RETURN-ATTRS is a list of attributes to return, defaulting to | |||
| 224 | (eudc-set-server dummy 'bbdb) | 224 | (eudc-set-server dummy 'bbdb) |
| 225 | (message "BBDB server selected")) | 225 | (message "BBDB server selected")) |
| 226 | 226 | ||
| 227 | ;;;}}} | 227 | ;;}}} |
| 228 | 228 | ||
| 229 | 229 | ||
| 230 | (eudc-register-protocol 'bbdb) | 230 | (eudc-register-protocol 'bbdb) |
diff --git a/lisp/net/eudcb-ldap.el b/lisp/net/eudcb-ldap.el index 9d66f3cadae..661841ba5b6 100644 --- a/lisp/net/eudcb-ldap.el +++ b/lisp/net/eudcb-ldap.el | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | ;; Boston, MA 02111-1307, USA. | 24 | ;; Boston, MA 02111-1307, USA. |
| 25 | 25 | ||
| 26 | ;;; Commentary: | 26 | ;;; Commentary: |
| 27 | ;; This library provides specific LDAP protocol support for the | 27 | ;; This library provides specific LDAP protocol support for the |
| 28 | ;; Emacs Unified Directory Client package | 28 | ;; Emacs Unified Directory Client package |
| 29 | 29 | ||
| 30 | ;;; Installation: | 30 | ;;; Installation: |
| @@ -53,31 +53,31 @@ | |||
| 53 | (phone . telephonenumber)) | 53 | (phone . telephonenumber)) |
| 54 | "Alist mapping EUDC attribute names to LDAP names.") | 54 | "Alist mapping EUDC attribute names to LDAP names.") |
| 55 | 55 | ||
| 56 | (eudc-protocol-set 'eudc-query-function 'eudc-ldap-simple-query-internal | 56 | (eudc-protocol-set 'eudc-query-function 'eudc-ldap-simple-query-internal |
| 57 | 'ldap) | 57 | 'ldap) |
| 58 | (eudc-protocol-set 'eudc-list-attributes-function 'eudc-ldap-get-field-list | 58 | (eudc-protocol-set 'eudc-list-attributes-function 'eudc-ldap-get-field-list |
| 59 | 'ldap) | 59 | 'ldap) |
| 60 | (eudc-protocol-set 'eudc-protocol-attributes-translation-alist | 60 | (eudc-protocol-set 'eudc-protocol-attributes-translation-alist |
| 61 | 'eudc-ldap-attributes-translation-alist 'ldap) | 61 | 'eudc-ldap-attributes-translation-alist 'ldap) |
| 62 | (eudc-protocol-set 'eudc-bbdb-conversion-alist | 62 | (eudc-protocol-set 'eudc-bbdb-conversion-alist |
| 63 | 'eudc-ldap-bbdb-conversion-alist | 63 | 'eudc-ldap-bbdb-conversion-alist |
| 64 | 'ldap) | 64 | 'ldap) |
| 65 | (eudc-protocol-set 'eudc-protocol-has-default-query-attributes nil 'ldap) | 65 | (eudc-protocol-set 'eudc-protocol-has-default-query-attributes nil 'ldap) |
| 66 | (eudc-protocol-set 'eudc-attribute-display-method-alist | 66 | (eudc-protocol-set 'eudc-attribute-display-method-alist |
| 67 | '(("jpegphoto" . eudc-display-jpeg-inline) | 67 | '(("jpegphoto" . eudc-display-jpeg-inline) |
| 68 | ("labeledurl" . eudc-display-url) | 68 | ("labeledurl" . eudc-display-url) |
| 69 | ("audio" . eudc-display-sound) | 69 | ("audio" . eudc-display-sound) |
| 70 | ("labeleduri" . eudc-display-url) | 70 | ("labeleduri" . eudc-display-url) |
| 71 | ("url" . eudc-display-url)) | 71 | ("url" . eudc-display-url)) |
| 72 | 'ldap) | 72 | 'ldap) |
| 73 | (eudc-protocol-set 'eudc-switch-to-server-hook | 73 | (eudc-protocol-set 'eudc-switch-to-server-hook |
| 74 | '(eudc-ldap-check-base) | 74 | '(eudc-ldap-check-base) |
| 75 | 'ldap) | 75 | 'ldap) |
| 76 | 76 | ||
| 77 | (defun eudc-ldap-cleanup-record-simple (record) | 77 | (defun eudc-ldap-cleanup-record-simple (record) |
| 78 | "Do some cleanup in a RECORD to make it suitable for EUDC." | 78 | "Do some cleanup in a RECORD to make it suitable for EUDC." |
| 79 | (mapcar | 79 | (mapcar |
| 80 | (function | 80 | (function |
| 81 | (lambda (field) | 81 | (lambda (field) |
| 82 | (cons (intern (car field)) | 82 | (cons (intern (car field)) |
| 83 | (if (cdr (cdr field)) | 83 | (if (cdr (cdr field)) |
| @@ -92,8 +92,8 @@ | |||
| 92 | ;; Make the record a cons-cell instead of a list if the it's single-valued | 92 | ;; Make the record a cons-cell instead of a list if the it's single-valued |
| 93 | ;; Filter the $ character in addresses into \n if not done by the LDAP lib | 93 | ;; Filter the $ character in addresses into \n if not done by the LDAP lib |
| 94 | (defun eudc-ldap-cleanup-record-filtering-addresses (record) | 94 | (defun eudc-ldap-cleanup-record-filtering-addresses (record) |
| 95 | (mapcar | 95 | (mapcar |
| 96 | (function | 96 | (function |
| 97 | (lambda (field) | 97 | (lambda (field) |
| 98 | (let ((name (intern (car field))) | 98 | (let ((name (intern (car field))) |
| 99 | (value (cdr field))) | 99 | (value (cdr field))) |
| @@ -107,9 +107,9 @@ | |||
| 107 | 107 | ||
| 108 | (defun eudc-ldap-simple-query-internal (query &optional return-attrs) | 108 | (defun eudc-ldap-simple-query-internal (query &optional return-attrs) |
| 109 | "Query the LDAP server with QUERY. | 109 | "Query the LDAP server with QUERY. |
| 110 | QUERY is a list of cons cells (ATTR . VALUE) where ATTRs should be valid | 110 | QUERY is a list of cons cells (ATTR . VALUE) where ATTRs should be valid |
| 111 | LDAP attribute names. | 111 | LDAP attribute names. |
| 112 | RETURN-ATTRS is a list of attributes to return, defaulting to | 112 | RETURN-ATTRS is a list of attributes to return, defaulting to |
| 113 | `eudc-default-return-attributes'." | 113 | `eudc-default-return-attributes'." |
| 114 | (let ((result (ldap-search (eudc-ldap-format-query-as-rfc1558 query) | 114 | (let ((result (ldap-search (eudc-ldap-format-query-as-rfc1558 query) |
| 115 | eudc-server | 115 | eudc-server |
| @@ -118,7 +118,7 @@ RETURN-ATTRS is a list of attributes to return, defaulting to | |||
| 118 | final-result) | 118 | final-result) |
| 119 | (if (or (not (boundp 'ldap-ignore-attribute-codings)) | 119 | (if (or (not (boundp 'ldap-ignore-attribute-codings)) |
| 120 | ldap-ignore-attribute-codings) | 120 | ldap-ignore-attribute-codings) |
| 121 | (setq result | 121 | (setq result |
| 122 | (mapcar 'eudc-ldap-cleanup-record-filtering-addresses result)) | 122 | (mapcar 'eudc-ldap-cleanup-record-filtering-addresses result)) |
| 123 | (setq result (mapcar 'eudc-ldap-cleanup-record-simple result))) | 123 | (setq result (mapcar 'eudc-ldap-cleanup-record-simple result))) |
| 124 | 124 | ||
| @@ -128,9 +128,9 @@ RETURN-ATTRS is a list of attributes to return, defaulting to | |||
| 128 | (setq result (eudc-filter-partial-records result return-attrs))) | 128 | (setq result (eudc-filter-partial-records result return-attrs))) |
| 129 | ;; Apply eudc-duplicate-attribute-handling-method | 129 | ;; Apply eudc-duplicate-attribute-handling-method |
| 130 | (if (not (eq 'list eudc-duplicate-attribute-handling-method)) | 130 | (if (not (eq 'list eudc-duplicate-attribute-handling-method)) |
| 131 | (mapcar | 131 | (mapcar |
| 132 | (function (lambda (record) | 132 | (function (lambda (record) |
| 133 | (setq final-result | 133 | (setq final-result |
| 134 | (append (eudc-filter-duplicate-attributes record) | 134 | (append (eudc-filter-duplicate-attributes record) |
| 135 | final-result)))) | 135 | final-result)))) |
| 136 | result)) | 136 | result)) |
| @@ -143,12 +143,12 @@ attribute names are returned. Default to `person'" | |||
| 143 | (interactive) | 143 | (interactive) |
| 144 | (or eudc-server | 144 | (or eudc-server |
| 145 | (call-interactively 'eudc-set-server)) | 145 | (call-interactively 'eudc-set-server)) |
| 146 | (let ((ldap-host-parameters-alist | 146 | (let ((ldap-host-parameters-alist |
| 147 | (list (cons eudc-server | 147 | (list (cons eudc-server |
| 148 | '(scope subtree sizelimit 1))))) | 148 | '(scope subtree sizelimit 1))))) |
| 149 | (mapcar 'eudc-ldap-cleanup-record | 149 | (mapcar 'eudc-ldap-cleanup-record |
| 150 | (ldap-search | 150 | (ldap-search |
| 151 | (eudc-ldap-format-query-as-rfc1558 | 151 | (eudc-ldap-format-query-as-rfc1558 |
| 152 | (list (cons "objectclass" | 152 | (list (cons "objectclass" |
| 153 | (or objectclass | 153 | (or objectclass |
| 154 | "person")))) | 154 | "person")))) |
| @@ -156,13 +156,13 @@ attribute names are returned. Default to `person'" | |||
| 156 | 156 | ||
| 157 | (defun eudc-ldap-escape-query-special-chars (string) | 157 | (defun eudc-ldap-escape-query-special-chars (string) |
| 158 | "Value is STRING with characters forbidden in LDAP queries escaped." | 158 | "Value is STRING with characters forbidden in LDAP queries escaped." |
| 159 | ;; Note that * should also be escaped but in most situations I suppose | 159 | ;; Note that * should also be escaped but in most situations I suppose |
| 160 | ;; the user doesn't want this | 160 | ;; the user doesn't want this |
| 161 | (eudc-replace-in-string | 161 | (eudc-replace-in-string |
| 162 | (eudc-replace-in-string | 162 | (eudc-replace-in-string |
| 163 | (eudc-replace-in-string | 163 | (eudc-replace-in-string |
| 164 | (eudc-replace-in-string | 164 | (eudc-replace-in-string |
| 165 | string | 165 | string |
| 166 | "\\\\" "\\5c") | 166 | "\\\\" "\\5c") |
| 167 | "(" "\\28") | 167 | "(" "\\28") |
| 168 | ")" "\\29") | 168 | ")" "\\29") |
| @@ -170,16 +170,16 @@ attribute names are returned. Default to `person'" | |||
| 170 | 170 | ||
| 171 | (defun eudc-ldap-format-query-as-rfc1558 (query) | 171 | (defun eudc-ldap-format-query-as-rfc1558 (query) |
| 172 | "Format the EUDC QUERY list as a RFC1558 LDAP search filter." | 172 | "Format the EUDC QUERY list as a RFC1558 LDAP search filter." |
| 173 | (format "(&%s)" | 173 | (format "(&%s)" |
| 174 | (apply 'concat | 174 | (apply 'concat |
| 175 | (mapcar '(lambda (item) | 175 | (mapcar '(lambda (item) |
| 176 | (format "(%s=%s)" | 176 | (format "(%s=%s)" |
| 177 | (car item) | 177 | (car item) |
| 178 | (eudc-ldap-escape-query-special-chars (cdr item)))) | 178 | (eudc-ldap-escape-query-special-chars (cdr item)))) |
| 179 | query)))) | 179 | query)))) |
| 180 | 180 | ||
| 181 | 181 | ||
| 182 | ;;}}} | 182 | ;;}}} |
| 183 | 183 | ||
| 184 | ;;{{{ High-level interfaces (interactive functions) | 184 | ;;{{{ High-level interfaces (interactive functions) |
| 185 | 185 | ||
| @@ -196,11 +196,11 @@ attribute names are returned. Default to `person'" | |||
| 196 | ;; If the server is not in ldap-host-parameters-alist we add it for the | 196 | ;; If the server is not in ldap-host-parameters-alist we add it for the |
| 197 | ;; user | 197 | ;; user |
| 198 | (if (null (assoc eudc-server ldap-host-parameters-alist)) | 198 | (if (null (assoc eudc-server ldap-host-parameters-alist)) |
| 199 | (setq ldap-host-parameters-alist | 199 | (setq ldap-host-parameters-alist |
| 200 | (cons (list eudc-server) ldap-host-parameters-alist))) | 200 | (cons (list eudc-server) ldap-host-parameters-alist))) |
| 201 | (customize-variable 'ldap-host-parameters-alist))) | 201 | (customize-variable 'ldap-host-parameters-alist))) |
| 202 | 202 | ||
| 203 | ;;;}}} | 203 | ;;}}} |
| 204 | 204 | ||
| 205 | 205 | ||
| 206 | (eudc-register-protocol 'ldap) | 206 | (eudc-register-protocol 'ldap) |
diff --git a/lisp/net/eudcb-ph.el b/lisp/net/eudcb-ph.el index 5466aaa1493..0f783ce31fb 100644 --- a/lisp/net/eudcb-ph.el +++ b/lisp/net/eudcb-ph.el | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | ;; Boston, MA 02111-1307, USA. | 24 | ;; Boston, MA 02111-1307, USA. |
| 25 | 25 | ||
| 26 | ;;; Commentary: | 26 | ;;; Commentary: |
| 27 | ;; This library provides specific CCSO PH/QI protocol support for the | 27 | ;; This library provides specific CCSO PH/QI protocol support for the |
| 28 | ;; Emacs Unified Directory Client package | 28 | ;; Emacs Unified Directory Client package |
| 29 | 29 | ||
| 30 | ;;; Code: | 30 | ;;; Code: |
| @@ -50,8 +50,8 @@ | |||
| 50 | 50 | ||
| 51 | (defun eudc-ph-query-internal (query &optional return-fields) | 51 | (defun eudc-ph-query-internal (query &optional return-fields) |
| 52 | "Query the PH/QI server with QUERY. | 52 | "Query the PH/QI server with QUERY. |
| 53 | QUERY can be a string NAME or a list made of strings NAME | 53 | QUERY can be a string NAME or a list made of strings NAME |
| 54 | and/or cons cells (KEY . VALUE) where KEYs should be valid | 54 | and/or cons cells (KEY . VALUE) where KEYs should be valid |
| 55 | CCSO database keys. NAME is equivalent to (DEFAULT . NAME), | 55 | CCSO database keys. NAME is equivalent to (DEFAULT . NAME), |
| 56 | where DEFAULT is the default key of the database. | 56 | where DEFAULT is the default key of the database. |
| 57 | RETURN-FIELDS is a list of database fields to return, | 57 | RETURN-FIELDS is a list of database fields to return, |
| @@ -61,7 +61,7 @@ defaulting to `eudc-default-return-attributes'." | |||
| 61 | (setq return-fields eudc-default-return-attributes)) | 61 | (setq return-fields eudc-default-return-attributes)) |
| 62 | (if (eq 'all return-fields) | 62 | (if (eq 'all return-fields) |
| 63 | (setq return-fields '(all))) | 63 | (setq return-fields '(all))) |
| 64 | (setq request | 64 | (setq request |
| 65 | (concat "query " | 65 | (concat "query " |
| 66 | (if (stringp query) | 66 | (if (stringp query) |
| 67 | query | 67 | query |
| @@ -88,9 +88,9 @@ are returned" | |||
| 88 | 88 | ||
| 89 | 89 | ||
| 90 | (defun eudc-ph-parse-query-result (&optional fields) | 90 | (defun eudc-ph-parse-query-result (&optional fields) |
| 91 | "Return a list of alists of key/values from in `eudc-ph-process-buffer'. | 91 | "Return a list of alists of key/values from in `eudc-ph-process-buffer'. |
| 92 | Fields not in FIELDS are discarded." | 92 | Fields not in FIELDS are discarded." |
| 93 | (let (record | 93 | (let (record |
| 94 | records | 94 | records |
| 95 | line-regexp | 95 | line-regexp |
| 96 | current-key | 96 | current-key |
| @@ -122,7 +122,7 @@ Fields not in FIELDS are discarded." | |||
| 122 | (intern (match-string 2))) | 122 | (intern (match-string 2))) |
| 123 | value (match-string 3)) | 123 | value (match-string 3)) |
| 124 | (if (and current-key | 124 | (if (and current-key |
| 125 | (eq key current-key)) | 125 | (eq key current-key)) |
| 126 | (setq key nil) | 126 | (setq key nil) |
| 127 | (setq current-key key)) | 127 | (setq current-key key)) |
| 128 | (if (or (null fields) | 128 | (if (or (null fields) |
| @@ -156,7 +156,7 @@ Wait for response and return the buffer containing it." | |||
| 156 | (message "Contacting server...") | 156 | (message "Contacting server...") |
| 157 | (setq process (eudc-ph-open-session)) | 157 | (setq process (eudc-ph-open-session)) |
| 158 | (if process | 158 | (if process |
| 159 | (save-excursion | 159 | (save-excursion |
| 160 | (set-buffer (setq buffer (process-buffer process))) | 160 | (set-buffer (setq buffer (process-buffer process))) |
| 161 | (eudc-ph-send-command process request) | 161 | (eudc-ph-send-command process request) |
| 162 | (message "Request sent, waiting for reply...") | 162 | (message "Request sent, waiting for reply...") |
| @@ -164,7 +164,7 @@ Wait for response and return the buffer containing it." | |||
| 164 | (if process | 164 | (if process |
| 165 | (eudc-ph-close-session process))) | 165 | (eudc-ph-close-session process))) |
| 166 | buffer)) | 166 | buffer)) |
| 167 | 167 | ||
| 168 | (defun eudc-ph-open-session (&optional server) | 168 | (defun eudc-ph-open-session (&optional server) |
| 169 | "Open a connection to the given CCSO/QI SERVER. | 169 | "Open a connection to the given CCSO/QI SERVER. |
| 170 | SERVER is either a string naming the server or a list (NAME PORT)." | 170 | SERVER is either a string naming the server or a list (NAME PORT)." |
| @@ -232,7 +232,7 @@ depending on RETURN-RESPONSE." | |||
| 232 | (buffer-substring (point) match-end) | 232 | (buffer-substring (point) match-end) |
| 233 | return-code)))) | 233 | return-code)))) |
| 234 | 234 | ||
| 235 | ;;}}} | 235 | ;;}}} |
| 236 | 236 | ||
| 237 | ;;{{{ High-level interfaces (interactive functions) | 237 | ;;{{{ High-level interfaces (interactive functions) |
| 238 | 238 | ||