branch: externals/ebdb commit 8f34ce1879fedb462d2f17f93942906cad02c3dc Author: Eric Abrahamsen <e...@ericabrahamsen.net> Commit: Eric Abrahamsen <e...@ericabrahamsen.net>
Docstrings fixes to pacify compiler Thanks to Arash Esbati for the patches. --- ebdb-com.el | 40 ++++++++++++++++++++-------------------- ebdb-format.el | 12 ++++++------ ebdb-i18n-basic.el | 3 +++ ebdb-mua.el | 22 +++++++++++----------- ebdb-snarf.el | 7 +++---- ebdb.el | 28 ++++++++++++++-------------- 6 files changed, 57 insertions(+), 55 deletions(-) diff --git a/ebdb-com.el b/ebdb-com.el index 717f8291d7..a91b79b89b 100644 --- a/ebdb-com.el +++ b/ebdb-com.el @@ -1,6 +1,6 @@ ;;; ebdb-com.el --- User-level commands of EBDB -*- lexical-binding: t; -*- -;; Copyright (C) 2016-2022 Free Software Foundation, Inc. +;; Copyright (C) 2016-2023 Free Software Foundation, Inc. ;; Author: Eric Abrahamsen <e...@ericabrahamsen.net> ;; Keywords: convenience, mail @@ -60,7 +60,7 @@ (defcustom ebdb-dedicated-window nil "Make *EBDB* window a dedicated window. -Allowed values include nil (not dedicated) 'ebdb (weakly dedicated) +Allowed values include nil (not dedicated) \\='ebdb (weakly dedicated) and t (strongly dedicated)." :type '(choice (const :tag "EBDB window not dedicated" nil) (const :tag "EBDB window weakly dedicated" ebdb) @@ -449,10 +449,10 @@ position-marker mark)." (defcustom ebdb-default-multiline-include nil "A list of field types to include in multiline display. Valid list values include all field class names (ebdb-field-*), -as well as the shortcuts 'mail, 'phone, 'address, 'notes, 'tags, -and 'role, and the special shortcuts 'mail-primary, -'mail-defunct, 'mail-not-defunct, 'role-defunct, and -'role-not-defunct. +as well as the shortcuts \\='mail, \\='phone, \\='address, \\='notes, \\='tags, +and \\='role, and the special shortcuts \\='mail-primary, +\\='mail-defunct, \\='mail-not-defunct, \\='role-defunct, and +\\='role-not-defunct. If this option is set, *only* fields listed here will be displayed. Also see `ebdb-default-multiline-exclude'." @@ -465,10 +465,10 @@ displayed. Also see `ebdb-default-multiline-exclude'." mail-defunct role-defunct) "A list of field types to exclude in multiline display. Valid list values include all field class names (ebdb-field-*), -as well as the shortcuts 'mail, 'phone, 'address, 'notes, 'tags, -and 'role, and the special shortcuts 'mail-primary, -'mail-defunct, 'mail-not-defunct, 'role-defunct, and -'role-not-defunct. +as well as the shortcuts \\='mail, \\='phone, \\='address, \\='notes, \\='tags, +and \\='role, and the special shortcuts \\='mail-primary, +\\='mail-defunct, \\='mail-not-defunct, \\='role-defunct, and +\\='role-not-defunct. If `ebdb-default-multiline-include' is set, this option will be ignored." @@ -482,10 +482,10 @@ ignored." displayed on one line. Valid list values include all field class names (ebdb-field-*), -as well as the shortcuts 'mail, 'phone, 'address, 'notes, 'tags, -and 'role, and the special shortcuts 'mail-primary, -'mail-defunct, 'mail-not-defunct, 'role-defunct, and -'role-not-defunct." +as well as the shortcuts \\='mail, \\='phone, \\='address, \\='notes, \\='tags, +and \\='role, and the special shortcuts \\='mail-primary, +\\='mail-defunct, \\='mail-not-defunct, \\='role-defunct, and +\\='role-not-defunct." :type 'list :group 'ebdb-record-display) @@ -496,10 +496,10 @@ and 'role, and the special shortcuts 'mail-primary, field class will be displayed. Valid list values include all field class names (ebdb-field-*), -as well as the shortcuts 'mail, 'phone, 'address, 'notes, 'tags, -and 'role, and the special shortcuts 'mail-primary, -'mail-defunct, 'mail-not-defunct, 'role-defunct, and -'role-not-defunct." +as well as the shortcuts \\='mail, \\='phone, \\='address, \\='notes, \\='tags, +and \\='role, and the special shortcuts \\='mail-primary, +\\='mail-defunct, \\='mail-not-defunct, \\='role-defunct, and +\\='role-not-defunct." :type 'list :group 'ebdb-record-display) @@ -610,7 +610,7 @@ choice: that formatter should be selected explicitly." (field ebdb-field) _style (_record ebdb-record)) - "Put the 'ebdb-field text property on FIELD. The value of the + "Put the \\='ebdb-field text property on FIELD. The value of the property is the field instance itself." (let ((str (cl-call-next-method))) ;; If the field fails to produce a string, or produces an empty @@ -784,7 +784,7 @@ record that actually owns the field." "Turn FIELD-ALIST into a string. The FIELD-ALIST structure is that returned by `ebdb-fmt-collect-fields'. It is an alist with three keys: -'class, 'style, and 'inst. +\\='class, \\='style, and \\='inst. This function passes the class and field instances to FMT, which formats them appropriately, and concatenates them into a diff --git a/ebdb-format.el b/ebdb-format.el index 8562d68fd1..e64bc2d656 100644 --- a/ebdb-format.el +++ b/ebdb-format.el @@ -1,6 +1,6 @@ ;;; ebdb-format.el --- Formatting/exporting EBDB records -*- lexical-binding: t; -*- -;; Copyright (C) 2016-2022 Free Software Foundation, Inc. +;; Copyright (C) 2016-2023 Free Software Foundation, Inc. ;; Author: Eric Abrahamsen <e...@ericabrahamsen.net> @@ -209,8 +209,8 @@ possibly with text properties attached.") (cl-defgeneric ebdb-fmt-field-label (fmt field-or-class style &optional record) "Format a field label, using formatter FMT. FIELD-OR-CLASS is a field class or a field instance, and STYLE is -a symbol indicating a style of some sort, such as 'compact or -'expanded.") +a symbol indicating a style of some sort, such as \\='compact or +\\='expanded.") ;;; Basic method implementations @@ -351,7 +351,7 @@ combined into a single string." field-list) "Sort FIELD-LIST using sort order from FMT. First sorts all fields with `ebdb-field-compare', then sorts -again by the order of each field's class symbol in the 'sort +again by the order of each field's class symbol in the \\='sort slot of FMT." (let* ((sort-order (slot-value fmt 'sort)) (catchall (or (seq-position sort-order "_") @@ -380,8 +380,8 @@ This method assumes that fields in FIELD-LIST have already been grouped by field class. The return value is a list of alists. Each alist has three keys: -'class, holding a class symbol, 'style, holding either the symbol -`collapse' or the symbol `normal', and 'inst, a list of all the +\\='class, holding a class symbol, \\='style, holding either the symbol +`collapse' or the symbol `normal', and \\='inst, a list of all the instances in this bundle. The `combine' style works by putting multiple instances in a single alist." (let (outlist f acc) diff --git a/ebdb-i18n-basic.el b/ebdb-i18n-basic.el index 7c4d9d5cbb..42c7d89f2e 100644 --- a/ebdb-i18n-basic.el +++ b/ebdb-i18n-basic.el @@ -118,6 +118,9 @@ number, and any remaining as an extension." (args-out-of-range nil)) slots)) +;; Defined in `ebdb.el' +(defvar ebdb-default-phone-country) + (cl-defmethod ebdb-string-i18n ((phone ebdb-field-phone) (_cc (eql 1))) (with-slots (area-code number extension) phone diff --git a/ebdb-mua.el b/ebdb-mua.el index 6ade65c61d..98318dacd4 100644 --- a/ebdb-mua.el +++ b/ebdb-mua.el @@ -1,6 +1,6 @@ ;;; ebdb-mua.el --- Mail user agent interaction for EBDB -*- lexical-binding: t; -*- -;; Copyright (C) 2016-2022 Free Software Foundation, Inc. +;; Copyright (C) 2016-2023 Free Software Foundation, Inc. ;; Author: Eric Abrahamsen <e...@ericabrahamsen.net> @@ -178,8 +178,8 @@ also consider the email addresses in the remaining headers." The format of this alist is ((HEADER-TYPE . REGEXP) ...) -Where HEADER-TYPE is one of the symbols 'sender, 'recipients, -'any (meaning 'sender or 'recipients), or 'subject. +Where HEADER-TYPE is one of the symbols \\='sender, \\='recipients, +\\='any (meaning \\='sender or \\='recipients), or \\='subject. For example, if ((sender . \"@.*\\.maximegalon\\.edu\") @@ -201,8 +201,8 @@ See also `ebdb-ignore-header-alist', which has the opposite effect." The format of this alist is ((HEADER-TYPE . REGEXP) ... ) -Where HEADER-TYPE is one of the symbols 'sender, 'recipients', -'any (meaning 'sender or 'recipients), or 'subject. +Where HEADER-TYPE is one of the symbols \\='sender, \\='recipients, +\\='any (meaning \\='sender or \\='recipients), or \\='subject. For example, if ((sender . \"mailer-daemon\") @@ -225,8 +225,8 @@ See also `ebdb-accept-header-alist', which has the opposite effect." (concat "\\<" (regexp-quote (match-string 1 user-mail-address)) "\\>")) "A regular expression matching your mail addresses. This option can be directly set to a regexp. It can also be the -symbol 'message, in which case the value of -`message-alternative-emails' will be used, or the symbol 'self, +symbol \\='message, in which case the value of +`message-alternative-emails' will be used, or the symbol \\='self, in which case the value will be constructed from the mail addresses of the record pointed to by option `ebdb-record-self'. Several EBDB commands extract either the sender or the @@ -287,7 +287,7 @@ Reads mail addresses to permanently ignore from the option (defun ebdb-get-user-mail-address-re () "Get or set the value of variable `ebdb-user-mail-address-re'. -If it's a symbol, check if it's one of 'self or 'message, and set +If it's a symbol, check if it's one of \\='self or \\='message, and set accordingly." (cond ((stringp ebdb-user-mail-address-re) ebdb-user-mail-address-re) @@ -421,14 +421,14 @@ existing EBDB record or to a record EBDB has created for the mail address. Run with two arguments: the record, and one of the symbols -'sender or 'recipient. It is up to the hook function to +\\='sender or \\='recipient. It is up to the hook function to determine which MUA is used and to act appropriately." :type 'hook) (cl-defgeneric ebdb-notice-record (record type) "Inform RECORD that it's been \"noticed\". -TYPE is one of the symbols 'sender or 'recipient, indicating +TYPE is one of the symbols \\='sender or \\='recipient, indicating RECORD's location in the message headers.") (cl-defmethod ebdb-notice-record ((rec ebdb-record) type) @@ -1172,7 +1172,7 @@ found in that header. When ALL is non-nil, behave as if This command is meant for manually updating records when `ebdb-mua-auto-update-p' is nil: it behaves as if that option -were set to 'query. The rules of `ebdb-select-message' still +were set to \\='query. The rules of `ebdb-select-message' still apply, however." (interactive) ;; Temporarily copy and paste from `ebdb-mua-display-records', diff --git a/ebdb-snarf.el b/ebdb-snarf.el index 1c25df8758..0b39d61ff5 100644 --- a/ebdb-snarf.el +++ b/ebdb-snarf.el @@ -1,6 +1,6 @@ ;;; ebdb-snarf.el --- Creating or displaying records based on free-form pieces of text -*- lexical-binding: t; -*- -;; Copyright (C) 2016-2022 Free Software Foundation, Inc. +;; Copyright (C) 2016-2023 Free Software Foundation, Inc. ;; Author: Eric Abrahamsen <e...@ericabrahamsen.net> ;; Keywords: mail @@ -187,9 +187,8 @@ nil." (name (save-excursion (when (re-search-backward name-re - (if (bolp) - (line-beginning-position 0) - (point-at-bol)) + (line-beginning-position + (when (bolp) 0)) t) ;; If something goes wrong with the ;; name, don't worry about it. diff --git a/ebdb.el b/ebdb.el index 983453f1bc..5956250934 100644 --- a/ebdb.el +++ b/ebdb.el @@ -1,6 +1,6 @@ ;;; ebdb.el --- Contact management package -*- lexical-binding: t; -*- -;; Copyright (C) 2016-2022 Free Software Foundation, Inc. +;; Copyright (C) 2016-2023 Free Software Foundation, Inc. ;; Version: 0.8.18 ;; Package-Requires: ((emacs "25.1") (seq "2.15")) @@ -1199,15 +1199,15 @@ RECORD has taken place. It is up to the class of FIELD to decide what, if anything, to do about this. TYPE is a further indicator of how RECORD was noticed: in normal -MUAs it is one of the symbols 'sender or 'recipient.") +MUAs it is one of the symbols \\='sender or \\='recipient.") (cl-defmethod ebdb-notice-field ((_field ebdb-field) &optional _type _record) "Ask FIELD of RECORD to react to RECORD being \"noticed\". When the user receives an email from or cc'd to RECORD, that record will call `ebdb-notice' on all its fields, and give them a -chance to react somehow. TYPE is one of the symbols 'sender or -'recipient, indicating which message header the record was found +chance to react somehow. TYPE is one of the symbols \\='sender or +\\='recipient, indicating which message header the record was found in." nil) @@ -1257,12 +1257,12 @@ in." "Prompt for a label for a new object of class CLASS. OBJ is used as as a default, and the results are stored in SLOTS. -All subclasses of `ebdb-field-labeled' should have a 'label-list +All subclasses of `ebdb-field-labeled' should have a \\='label-list slot pointing to a var holding known labels for that class. This method checks that the label is known, and asks for confirmation if it isn't. -This method also signals the 'ebdb-empty error if the user gives +This method also signals the \\='ebdb-empty error if the user gives an empty string as a label, which allows interruption of the read process." ;; FIXME: Now that labels are read after the main class, this should @@ -3056,8 +3056,8 @@ RECORD is responsible for parsing it correctly.") (cl-defmethod initialize-instance ((record ebdb-record) &optional slots) "Initialize RECORD. -Adds a cache to the cache slot, and ensures the 'timestamp and -'creation-date slots are filled." +Adds a cache to the cache slot, and ensures the \\='timestamp and +\\='creation-date slots are filled." ;; This is the very first thing that happens to a record after it is ;; created (whether manually or loaded). (let ((cache (make-ebdb-record-cache))) @@ -3123,8 +3123,8 @@ acceptable fields. Each list element is a cons of the form (SLOT . FIELDCLASS), meaning that RECORD-CLASS can accept fields of class FIELDCLASS in SLOT. -If QUERY is non-nil, it should be a cons of either '(SLOT . nil), -or '(nil . FIELDCLASS). The \"nil\" is the value to query for: +If QUERY is non-nil, it should be a cons of either \\='(SLOT . nil), +or \\='(nil . FIELDCLASS). The \"nil\" is the value to query for: either \"which slot can accept this field class\", or \"which fieldclass is appropriate for this slot\". The return value in either case is a cons with both slot and fieldclass filled in.") @@ -4875,7 +4875,7 @@ addresses. Sort mails by descending priority.") However, if both the first name and last name are constituents of the address as in john....@some.host, and `ebdb-mail-avoid-redundancy' is non-nil, then the address is used -as is. If `ebdb-mail-avoid-redundancy' is 'mail-only the name is +as is. If `ebdb-mail-avoid-redundancy' is \\='mail-only the name is never included. MAIL may be a mail address to be used for RECORD. If MAIL is nil use RECORD's primary mail address. If MAIL is the symbol `prompt', prompt the user for a mail address @@ -5172,7 +5172,7 @@ same meaning as in `completing-read'." (defsubst ebdb-add-job (spec record string) "Internal function: Evaluate SPEC for RECORD and STRING. If SPEC is a function call it with args RECORD and STRING. Return value. -If SPEC is a regexp, return 'query unless SPEC matches STRING. +If SPEC is a regexp, return \\='query unless SPEC matches STRING. Otherwise return SPEC. Used with variable `ebdb-add-name' and friends." (cond ((functionp spec) @@ -5183,7 +5183,7 @@ Used with variable `ebdb-add-name' and friends." (defsubst ebdb-eval-spec (spec prompt) "Internal function: Evaluate SPEC using PROMPT. -Return t if either SPEC equals t, or SPEC equals 'query and `ebdb-silent' +Return t if either SPEC equals t, or SPEC equals \\='query and `ebdb-silent' is non-nil or `y-or-no-p' returns t using PROMPT. Used with return values of `ebdb-add-job'." (or (eq spec t) @@ -5715,7 +5715,7 @@ inserting it." (cl-defgeneric ebdb-records-cite (style records) "Return mode-appropriate mail strings for RECORDS. -STYLE is a symbol, one of 'inline or 'list. This is interpreted +STYLE is a symbol, one of \\='inline or \\='list. This is interpreted differently by different major modes; the default looks like \"Firstname Lastname <em...@address.com>\".