/[emacs]/emacs/lisp/net/eudc.el
ViewVC logotype

Diff of /emacs/lisp/net/eudc.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by pj, Wed Jan 16 08:21:29 2002 UTC revision 1.6.4.1 by miles, Fri Apr 4 06:20:30 2003 UTC
# Line 38  Line 38 
38  ;;    The main entry points of EUDC are:  ;;    The main entry points of EUDC are:
39  ;;      `eudc-query-form': Query a directory server from a query form  ;;      `eudc-query-form': Query a directory server from a query form
40  ;;      `eudc-expand-inline': Query a directory server for the e-mail address  ;;      `eudc-expand-inline': Query a directory server for the e-mail address
41  ;;                            of the name before cursor and insert it in the  ;;                            of the name before cursor and insert it in the
42  ;;                            buffer  ;;                            buffer
43  ;;      `eudc-get-phone': Get a phone number from a directory server  ;;      `eudc-get-phone': Get a phone number from a directory server
44  ;;      `eudc-get-email': Get an e-mail address from a directory server  ;;      `eudc-get-email': Get an e-mail address from a directory server
# Line 134  Line 134 
134  (defun eudc-plist-get (plist prop &optional default)  (defun eudc-plist-get (plist prop &optional default)
135    "Extract a value from a property list.    "Extract a value from a property list.
136  PLIST is a property list, which is a list of the form  PLIST is a property list, which is a list of the form
137  (PROP1 VALUE1 PROP2 VALUE2...).  This function returns the value  \(PROP1 VALUE1 PROP2 VALUE2...).  This function returns the value
138  corresponding to the given PROP, or DEFAULT if PROP is not  corresponding to the given PROP, or DEFAULT if PROP is not
139  one of the properties on the list."  one of the properties on the list."
140    (if (eudc-plist-member plist prop)    (if (eudc-plist-member plist prop)
# Line 207  Value is the new string." Line 207  Value is the new string."
207  (defun eudc-default-set (var val)  (defun eudc-default-set (var val)
208    "Set the EUDC default value of VAR to VAL.    "Set the EUDC default value of VAR to VAL.
209  The current binding of VAR is not changed."  The current binding of VAR is not changed."
210    (put var 'eudc-locals    (put var 'eudc-locals
211         (plist-put (get var 'eudc-locals) 'default val))         (plist-put (get var 'eudc-locals) 'default val))
212    (add-to-list 'eudc-local-vars var))    (add-to-list 'eudc-local-vars var))
213    
# Line 221  The current binding of VAR is changed on Line 221  The current binding of VAR is changed on
221           (protocol-locals (eudc-plist-get eudc-locals 'protocol)))           (protocol-locals (eudc-plist-get eudc-locals 'protocol)))
222      (setq protocol-locals (plist-put protocol-locals (or protocol      (setq protocol-locals (plist-put protocol-locals (or protocol
223                                                           eudc-protocol) val))                                                           eudc-protocol) val))
224      (setq eudc-locals      (setq eudc-locals
225            (plist-put eudc-locals 'protocol protocol-locals))            (plist-put eudc-locals 'protocol protocol-locals))
226      (put var 'eudc-locals eudc-locals)      (put var 'eudc-locals eudc-locals)
227      (add-to-list 'eudc-local-vars var)      (add-to-list 'eudc-local-vars var)
# Line 293  SERVER defaults to `eudc-server'" Line 293  SERVER defaults to `eudc-server'"
293                    (eudc-plist-member eudc-locals 'server)))                    (eudc-plist-member eudc-locals 'server)))
294          'unbound          'unbound
295        (setq server-locals (eudc-plist-get eudc-locals 'server))        (setq server-locals (eudc-plist-get eudc-locals 'server))
296        (eudc-lax-plist-get server-locals        (eudc-lax-plist-get server-locals
297                            (or server                            (or server
298                                eudc-server) 'unbound))))                                eudc-server) 'unbound))))
299    
# Line 789  If none try N - 1 and so forth." Line 789  If none try N - 1 and so forth."
789    (let (formats)    (let (formats)
790      (while (and (null formats)      (while (and (null formats)
791                  (> n 0))                  (> n 0))
792        (setq formats        (setq formats
793              (delq nil              (delq nil
794                    (mapcar '(lambda (format)                    (mapcar '(lambda (format)
795                               (if (= n                               (if (= n
# Line 1103  queries the server for the existing fiel Line 1103  queries the server for the existing fiel
1103    
1104  ;;}}}  ;;}}}
1105    
1106  ;;{{{      Menus an keymaps  ;;{{{      Menus and keymaps
1107    
1108  (require 'easymenu)  (require 'easymenu)
1109    
# Line 1185  queries the server for the existing fiel Line 1185  queries the server for the existing fiel
1185      (add-submenu '("Tools") (eudc-menu)))      (add-submenu '("Tools") (eudc-menu)))
1186     (eudc-emacs-p     (eudc-emacs-p
1187      (cond      (cond
1188         ((fboundp 'easy-menu-create-menu)
1189          (define-key
1190            global-map
1191            [menu-bar tools directory-search]
1192            (cons "Directory Search"
1193                  (easy-menu-create-menu "Directory Search" (cdr (eudc-menu))))))
1194       ((fboundp 'easy-menu-add-item)       ((fboundp 'easy-menu-add-item)
1195        (let ((menu (eudc-menu)))        (let ((menu (eudc-menu)))
1196          (easy-menu-add-item nil '("tools") (easy-menu-create-menu (car menu)          (easy-menu-add-item nil '("tools") (easy-menu-create-menu (car menu)

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.6.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26