[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb db930f6 163/350: Compiler-inspired fixes, and remo
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb db930f6 163/350: Compiler-inspired fixes, and removal of old-code references |
Date: |
Mon, 14 Aug 2017 11:46:28 -0400 (EDT) |
branch: externals/ebdb
commit db930f6407e0776c908f5df57fac39b99ddd80df
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Compiler-inspired fixes, and removal of old-code references
Mostly just fixing compiler warnings, but also removing last
references to xfields, etc. ebdb-vm.el is the only file that still
uses non-existant functions.
---
ebdb-com.el | 4 ++--
ebdb-mua.el | 15 +++++++--------
ebdb-org.el | 9 +++++----
ebdb.el | 45 ++++++++++-----------------------------------
4 files changed, 24 insertions(+), 49 deletions(-)
diff --git a/ebdb-com.el b/ebdb-com.el
index 9117844..5ed44f8 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -1412,7 +1412,7 @@ which is probably more suited for your needs."
(defmacro ebdb-compare-records (cmpval label compare)
"Builds a lambda comparison function that takes one argument, RECORD.
RECORD is returned if (COMPARE VALUE CMPVAL) is t, where VALUE
-is the value of xfield LABEL of RECORD."
+is the value of field LABEL of RECORD."
`(lambda (record)
(let ((val (ebdb-record-field record ,label)))
(if (and val (funcall ,compare val ,cmpval))
@@ -1888,7 +1888,7 @@ not necessarily. FMT is the optional formatter to use."
;;;###autoload
(defun ebdb (style regexp &optional fmt)
"Display all records in the EBDB matching REGEXP
-in either the name(s), organization, address, phone, mail, or xfields."
+in any field."
(interactive (list (ebdb-search-style)
(ebdb-search-read 'all)
(ebdb-formatter-prefix)))
diff --git a/ebdb-mua.el b/ebdb-mua.el
index 7ea6539..a3f23f7 100644
--- a/ebdb-mua.el
+++ b/ebdb-mua.el
@@ -71,7 +71,7 @@ This may take the values:
all-fields Read the field to edit using a completion table
that includes all fields currently known to EBDB.
-Any other symbol is interpreted as the label of an xfield."
+Any other symbol is interpreted as the name of a field class."
:group 'ebdb-mua
:type '(symbol :tag "Field to annotate"))
@@ -86,7 +86,7 @@ This may take the values:
all-fields Read the field to edit using a completion table
that includes all fields currently known to EBDB.
-Any other symbol is interpreted as the label of an xfield."
+Any other symbol is interpreted as the name of a field class."
:group 'ebdb-mua
:type '(symbol :tag "Field to edit"))
@@ -433,7 +433,7 @@ However, if the value of HEADER also matches an element of
`ebdb-auto-notes-ignore-headers' no annotation is generated.
The annotation will be added to FIELD of the respective record.
-FIELD defaults to `ebdb-default-xfield'.
+FIELD defaults to `ebdb-default-user-field'.
STRING defines a replacement for the match of REGEXP in the value of HEADER.
It may contain \\& or \\N specials used by `replace-match'.
@@ -484,9 +484,9 @@ will be re-evaluated."
(list :tag "Replacement list"
(regexp :tag "Regexp to match on header value")
(choice :tag "Record field"
- (const notes :tag "xfields")
+ (const notes :tag "Notes")
(const organization :tag "Organization")
- (symbol :tag "Other"))
+ (symbol :tag "Other field class"))
(choice :tag "Regexp match"
(string :tag "Replacement string")
(integer :tag "Subexpression match")
@@ -1399,7 +1399,7 @@ For use as an element of `ebdb-notice-record-hook'."
replace (nth 2 string) ; perhaps nil
string (nth 1 string))
;; else it's simple (REGEXP . STRING)
- (setq field ebdb-default-xfield
+ (setq field ebdb-default-user-field
replace nil))
(push (list (car elt) field string replace) elt-e))
(push (append (list mua from-to header) (nreverse elt-e))
expanded)))
@@ -1478,8 +1478,7 @@ of these MUAs. Also, the MUA Summary format string must
use
"In the MUA Summary buffer mark messages matching a EBDB record.
ADDRESS typically refers to the value of the From header of a message.
If ADDRESS matches a record in EBDB return a mark, \" \" otherwise.
-The mark itself is the value of the xfield `ebdb-mua-summary-mark-field'
-if this xfield is in the poster's record, and `ebdb-mua-summary-mark'
otherwise."
+The mark itself is the value of `ebdb-mua-summary-mark'."
(if (not ebdb-mua-summary-mark)
"" ; for consistency
;; ADDRESS is analyzed as in `ebdb-get-address-components'.
diff --git a/ebdb-org.el b/ebdb-org.el
index 68645d4..ea7697a 100644
--- a/ebdb-org.el
+++ b/ebdb-org.el
@@ -63,8 +63,9 @@
(ebdb-record-uuid
(ebdb-prompt-for-record (ebdb-records)))))
:store 'ebdb-org-store-link
:export 'ebdb-org-export)
- (org-add-link-type "ebdb" #'ebdb-org-open #'ebdb-org-export)
- (add-hook 'org-store-link-functions 'ebdb-org-store-link))
+ (with-no-warnings ;; I know it's obsolete.
+ (org-add-link-type "ebdb" #'ebdb-org-open #'ebdb-org-export)
+ (add-hook 'org-store-link-functions 'ebdb-org-store-link)))
;; TODO: Put a custom keymap on the links (or else expand
;; `ebdb-org-open') so that users can choose what to do with the
@@ -94,7 +95,7 @@
(`("tags" ,key) (ebdb-search (ebdb-records) `((ebdb-org-field-tags
,key))))
(`(,(and field (guard (child-of-class-p (intern-soft field)
'ebdb-field))) ,key)
(ebdb-search (ebdb-records) `((,(intern-soft field) ,key))))
- (`(,other ,key) (error "Unknown field search prefix: %s" other)))))
+ (`(,other _) (error "Unknown field search prefix: %s" other)))))
(if records
(ebdb-display-records records nil nil nil (ebdb-popup-window))
(message "No records found"))))
@@ -144,7 +145,7 @@ potential tags for completion.")
(when obj (ebdb-string obj)))))
(cl-call-next-method field (plist-put slots :tags val))))
-(cl-defmethod ebdb-search-read ((class (subclass ebdb-org-field-tags)))
+(cl-defmethod ebdb-search-read ((_class (subclass ebdb-org-field-tags)))
(let ((crm-separator (cadr (assq 'ebdb-org-field-tags
ebdb-separator-alist))))
(completing-read-multiple
"Search for tags: "
diff --git a/ebdb.el b/ebdb.el
index 14fe17b..f748f99 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -1511,7 +1511,7 @@ first one."
(ebdb-field-anniv-diary-entry anniv record))))
(cl-defmethod ebdb-delete-field ((anniv ebdb-field-anniversary)
- &optional record unload)
+ &optional record _unload)
(when (and ebdb-use-diary
record)
(setq
@@ -1950,7 +1950,7 @@ 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.")
-(cl-defmethod ebdb-record-field-slot-query ((class (subclass ebdb-record))
+(cl-defmethod ebdb-record-field-slot-query ((_class (subclass ebdb-record))
&optional query alist)
(let ((alist (append
'((notes . ebdb-field-notes)
@@ -2614,7 +2614,7 @@ appropriate person record."
(field ebdb-field-role))
(ebdb-gethash (slot-value field 'record-uuid) 'uuid))
-(defmethod ebdb-record-add-org-role ((record ebdb-record-person)
+(cl-defmethod ebdb-record-add-org-role ((record ebdb-record-person)
(org ebdb-record-organization)
&optional mail fields)
"Convenience function for creating a role relationship between RECORD and
ORG.
@@ -4189,31 +4189,6 @@ Set and store it if necessary."
(slot-value (ebdb-record-cache record) 'sortkey)
(downcase (ebdb-string (slot-value record 'name)))))
-;; The values of xfields are normally strings. The following function
-;; comes handy if we want to treat these values as symbols.
-;; (defun ebdb-record-xfield-intern (record label)
-;; "For RECORD return interned value of xfield LABEL.
-;; Return nil if xfield LABEL does not exist."
-;; (let ((value (ebdb-record-xfield record label)))
-;; ;; If VALUE is not a string, return whatever it is.
-;; (if (stringp value) (intern value) value)))
-
-;; (defun ebdb-record-xfield-string (record label)
-;; "For RECORD return value of xfield LABEL as string.
-;; Return nil if xfield LABEL does not exist."
-;; (let ((value (ebdb-record-xfield record label)))
-;; (if (string-or-null-p value)
-;; value
-;; (let ((print-escape-newlines t))
-;; (prin1-to-string value)))))
-
-;; (defsubst ebdb-record-xfield-split (record label)
-;; "For RECORD return value of xfield LABEL split as a list.
-;; Splitting is based on `ebdb-separator-alist'."
-;; (let ((val (ebdb-record-xfield record label)))
-;; (cond ((stringp val) (ebdb-split label val))
-;; (val (error "Cannot split `%s'" val)))))
-
(cl-defgeneric ebdb-record-field (record field)
"For RECORD return the value of FIELD.
@@ -4535,8 +4510,8 @@ This is a generic function that dispatches on the value of
" "
"\n"))))
-(cl-defmethod ebdb-records-cite-mail :around ((style (eql list))
- (records list)
+(cl-defmethod ebdb-records-cite-mail :around ((_style (eql list))
+ (_records list)
&context (major-mode org-mode))
(let ((list (cl-call-next-method)))
(mapconcat (lambda (elt)
@@ -4552,16 +4527,16 @@ This is a generic function that dispatches on the value
of
(ebdb-string (car pair))))
records))
-(cl-defmethod ebdb-records-cite-mail :around ((style (eql list))
- (records list)
+(cl-defmethod ebdb-records-cite-mail :around ((_style (eql list))
+ (_records list)
&context (major-mode html-mode))
(let ((list (cl-call-next-method)))
(mapconcat (lambda (l)
(format "<li>%s</li>" l))
list "\n")))
-(cl-defmethod ebdb-records-cite-mail :around ((style (eql inline))
- (records list))
+(cl-defmethod ebdb-records-cite-mail :around ((_style (eql inline))
+ (_records list))
(let ((list (cl-call-next-method)))
(mapconcat #'identity list " ")))
@@ -4723,7 +4698,7 @@ values, by default the search is not handed to the name
field itself."
(cl-defmethod ebdb-record-search ((record ebdb-record-organization)
(_type (eql organization))
(regexp string))
- (ebdb-record-search record ebdb-field-name regexp))
+ (ebdb-record-search record 'ebdb-field-name regexp))
(cl-defmethod ebdb-record-search ((record ebdb-record)
(cls (subclass ebdb-field-user))
- [elpa] externals/ebdb d9b4865 146/350: More tweaks to snarfing process, (continued)
- [elpa] externals/ebdb d9b4865 146/350: More tweaks to snarfing process, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b635b4e 155/350: First stab at article snarfing, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 6c267e9 159/350: Fix pop-up mouse menus in EBDB buffers, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 55b3f82 160/350: Fixup with fix popup menus, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb abdb8cd 158/350: Update copyright years to 2017, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 5fdf286 166/350: Feeding incorrect args to ebdb-snarf, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 9b6c88d 167/350: Fix incorrect variable name, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb dd13813 171/350: Bah, fixups to a19ff0a, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb f1448f4 174/350: Remove this empty file, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 6479c87 173/350: Remove unused code, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb db930f6 163/350: Compiler-inspired fixes, and removal of old-code references,
Eric Abrahamsen <=
- [elpa] externals/ebdb 281c61e 154/350: Don't ((lambda ()), Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 4cce4c8 096/350: Simplify role field adoption process, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 0910ddd 105/350: Change default of ebdb-default-user-field, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b495e29 083/350: Omnibus changes to display and redisplay, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 29bf304 101/350: Rework MUA window popups, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 81e23c3 134/350: Simplify record mail citing, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b661aac 124/350: First generalized version of snarfing, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb aae57ff 139/350: Ensure that extra name field instances go in 'aka slot, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 057c4c0 144/350: Have ebdb-snarf accept optional records argument, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 8d81a19 132/350: Add EBDB record citation, Eric Abrahamsen, 2017/08/14