]> code.delx.au - gnu-emacs/blobdiff - lisp/net/eudc-vars.el
Improve eudc-inline-query-format's default value
[gnu-emacs] / lisp / net / eudc-vars.el
index 97c103fdfcbddfeb9484a5a7923a4efca26d184a..06f63ebc8e1818ba17aced7a200a67329fff14a8 100644 (file)
@@ -1,18 +1,18 @@
-;;; eudc-vars.el --- Emacs Unified Directory Client
+;;; eudc-vars.el --- Emacs Unified Directory Client -*- coding: utf-8 -*-
 
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2014 Free Software Foundation, Inc.
 
 ;; Author: Oscar Figueiredo <oscar@cpe.fr>
-;; Maintainer: Pavel Janík <Pavel@Janik.cz>
+;; Maintainer: Pavel Janík <Pavel@Janik.cz>
 ;; Keywords: comm
+;; Package: eudc
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,9 +20,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
   :group 'comm)
 
 (defcustom eudc-server nil
-  "*The name or IP address of the directory server.
+  "The name or IP address of the directory server.
 A port number may be specified by appending a colon and a
 number to the name of the server.  Use `localhost' if the directory
-server resides on your computer (BBDB backend)."
+server resides on your computer (BBDB backend).
+
+To specify multiple servers, customize eudc-server-hotlist
+instead."
   :type  '(choice (string :tag "Server") (const :tag "None" nil))
   :group 'eudc)
 
@@ -51,13 +52,33 @@ server resides on your computer (BBDB backend)."
 ;; Not to be mistaken with `eudc-supported-protocols'
 (defvar eudc-known-protocols '(bbdb ph ldap))
 
+(defcustom eudc-server-hotlist nil
+"Directory servers to query.
+This is an alist of the form (SERVER . PROTOCOL).  SERVER is the
+host name or URI of the server, PROTOCOL is a symbol representing
+the EUDC backend with which to access the server.
+
+The BBDB backend ignores SERVER; `localhost' can be used as a
+placeholder string."
+  :tag   "Directory Servers to Query"
+  :type  `(repeat (cons :tag "Directory Server"
+                       (string :tag "Server Host Name or URI")
+                       (choice :tag "Protocol"
+                               :menu-tag "Protocol"
+                               ,@(mapcar (lambda (s)
+                                           (list 'const
+                                                 ':tag (symbol-name s) s))
+                                         eudc-known-protocols)
+                               (const :tag "None" nil))))
+  :group 'eudc)
+
 (defvar eudc-supported-protocols nil
   "Protocols currently supported by EUDC.
 This variable is updated when protocol-specific libraries
 are loaded, *do not change manually*.")
 
 (defcustom eudc-protocol nil
-  "*The directory protocol to use to query the server.
+  "The directory protocol to use to query the server.
 Supported protocols are specified by `eudc-supported-protocols'."
   :type  `(choice :menu-tag "Protocol"
                  ,@(mapcar (lambda (s)
@@ -68,13 +89,13 @@ Supported protocols are specified by `eudc-supported-protocols'."
 
 
 (defcustom eudc-strict-return-matches t
-  "*Ignore or allow entries not containing all requested return attributes.
+  "Ignore or allow entries not containing all requested return attributes.
 If non-nil, such entries are ignored."
   :type  'boolean
   :group 'eudc)
 
 (defcustom eudc-default-return-attributes nil
-  "*A list of default attributes to extract from directory entries.
+  "A list of default attributes to extract from directory entries.
 If set to the symbol `all', return all attributes.
 A value of nil means return the default attributes as configured in the
 server."
@@ -88,7 +109,7 @@ server."
   :group 'eudc)
 
 (defcustom eudc-multiple-match-handling-method 'select
-  "*What to do when multiple entries match an inline expansion query.
+  "What to do when multiple entries match an inline expansion query.
 Possible values are:
 `first' (equivalent to nil) which means keep the first match only,
 `select' pop-up a selection buffer,
@@ -108,7 +129,7 @@ Possible values are:
   :group 'eudc)
 
 (defcustom eudc-duplicate-attribute-handling-method '((email . duplicate))
-  "*A method to handle entries containing duplicate attributes.
+  "A method to handle entries containing duplicate attributes.
 This is either an alist (ATTR . METHOD) or a symbol METHOD.
 The alist form of the variable associates a method to an individual attribute,
 the second form specifies a method applicable to all attributes.
@@ -135,9 +156,10 @@ different values."
                                       (const :menu-tag "Duplicate" duplicate)))))
   :group 'eudc)
 
-(defcustom eudc-inline-query-format '((name)
+(defcustom eudc-inline-query-format '((email)
+                                     (firstname)
                                      (firstname name))
-  "*Format of an inline expansion query.
+  "Format of an inline expansion query.
 This is a list of FORMATs.  A FORMAT is itself a list of one or more
 EUDC attribute names.  A FORMAT applies if it contains as many attributes as
 there are individual words in the inline query string.
@@ -165,12 +187,12 @@ must be set in a protocol/server-local fashion, see `eudc-server-set' and
   :group 'eudc)
 
 (defcustom eudc-expansion-overwrites-query t
-  "*If non-nil, expanding a query overwrites the query string."
+  "If non-nil, expanding a query overwrites the query string."
   :type  'boolean
   :group 'eudc)
 
 (defcustom eudc-inline-expansion-format '("%s" email)
-  "*A list specifying the format of the expansion of inline queries.
+  "A list specifying the format of the expansion of inline queries.
 This variable controls what `eudc-expand-inline' actually inserts in
 the buffer.  First element is a string passed to `format'.  Remaining
 elements are symbols indicating attribute names; the corresponding values
@@ -190,7 +212,7 @@ are passed as additional arguments to `format'."
   :group 'eudc)
 
 (defcustom eudc-inline-expansion-servers 'server-then-hotlist
-  "*Which servers to contact for the expansion of inline queries.
+  "Which servers to contact for the expansion of inline queries.
 Possible values are:
   `current-server': the EUDC current server.
   `hotlist': the servers of the hotlist in the order they appear,
@@ -204,7 +226,7 @@ Possible values are:
   :group 'eudc)
 
 (defcustom eudc-max-servers-to-query nil
-  "*Maximum number of servers to query for an inline expansion.
+  "Maximum number of servers to query for an inline expansion.
 If nil, query all servers available from `eudc-inline-expansion-servers'."
   :tag "Max Number of Servers to Query"
   :type '(choice :tag "Max. Servers"
@@ -219,7 +241,7 @@ If nil, query all servers available from `eudc-inline-expansion-servers'."
   :group 'eudc)
 
 (defcustom eudc-query-form-attributes '(name firstname email phone)
-  "*A list of attributes presented in the query form."
+  "A list of attributes presented in the query form."
   :tag   "Attributes in Query Forms"
   :type  '(repeat
           (choice
@@ -250,7 +272,7 @@ If nil, query all servers available from `eudc-inline-expansion-servers'."
                                             (telephonenumber . "Phone")
                                             (uniqueidentifier . "ID")
                                             (objectclass . "Object Class"))
-  "*Alist of user-defined names for directory attributes.
+  "Alist of user-defined names for directory attributes.
 These names are used as prompt strings in query/response forms
 instead of the raw directory attribute names.
 Prompt strings for attributes that are not listed here
@@ -263,14 +285,14 @@ at `_' characters and capitalizing the individual words."
   :group 'eudc)
 
 (defcustom eudc-use-raw-directory-names nil
-  "*If non-nil, use attributes names as defined in the directory.
+  "If non-nil, use attributes names as defined in the directory.
 Otherwise, directory query/response forms display the user attribute
 names defined in `eudc-user-attribute-names-alist'."
   :type  'boolean
   :group 'eudc)
 
 (defcustom eudc-attribute-display-method-alist nil
-  "*An alist specifying methods to display attribute values.
+  "An alist specifying methods to display attribute values.
 Each member of the list is of the form (NAME . FUNC) where NAME is a lowercased
 string naming a directory attribute (translated according to
 `eudc-user-attribute-names-alist' if `eudc-use-raw-directory-names' is
@@ -284,7 +306,7 @@ attribute values for display."
 
 (defcustom eudc-external-viewers '(("ImageMagick" "display" "-")
                                   ("ShowAudio" "showaudio"))
-  "*A list of viewer program specifications.
+  "A list of viewer program specifications.
 Viewers are programs which can be piped a directory attribute value for
 display or arbitrary processing.  Each specification is a list whose
 first element is a string naming the viewer.  The second element is the
@@ -301,12 +323,12 @@ arguments that should be passed to the program."
   :group 'eudc)
 
 (defcustom eudc-options-file "~/.eudc-options"
-  "*A file where the `servers' hotlist is stored."
+  "A file where the `servers' hotlist is stored."
   :type '(file :Tag "File Name:")
   :group 'eudc)
 
 (defcustom eudc-mode-hook nil
-  "*Normal hook run on entry to EUDC mode."
+  "Normal hook run on entry to EUDC mode."
   :type '(repeat (sexp :tag "Hook definition"))
   :group 'eudc)
 
@@ -324,7 +346,7 @@ arguments that should be passed to the program."
     (address . (eudc-bbdbify-address address "Address"))
     (phone . ((eudc-bbdbify-phone phone "Phone")
              (eudc-bbdbify-phone office_phone "Office Phone"))))
-  "*A mapping from BBDB to PH/QI fields.
+  "A mapping from BBDB to PH/QI fields.
 This is a list of cons cells (BBDB-FIELD . SPEC-OR-LIST) where
 BBDB-FIELD is the name of a field that must be defined in your BBDB
 environment (standard field names are `name', `company', `net', `phone',
@@ -359,7 +381,7 @@ BBDB fields.  SPECs are sexps which are evaluated:
     (net . mail)
     (address . (eudc-bbdbify-address postaladdress "Address"))
     (phone . ((eudc-bbdbify-phone telephonenumber "Phone"))))
-  "*A mapping from BBDB to LDAP attributes.
+  "A mapping from BBDB to LDAP attributes.
 This is a list of cons cells (BBDB-FIELD . SPEC-OR-LIST) where
 BBDB-FIELD is the name of a field that must be defined in your BBDB
 environment (standard field names are `name', `company', `net', `phone',
@@ -407,5 +429,4 @@ Otherwise records must match queries exactly."
 
 (provide 'eudc-vars)
 
-;;; arch-tag: 80050575-b838-4246-8ebc-b2d7c5a2e482
 ;;; eudc-vars.el ends here