[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 94b11b9 2/9: Various tweaks
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 94b11b9 2/9: Various tweaks |
Date: |
Wed, 18 Oct 2017 17:51:56 -0400 (EDT) |
branch: externals/ebdb
commit 94b11b917ce12961b3b551a85c3bf264f3d88291
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Various tweaks
Suggested by Stefan
* ebdb-com.el (ebdb-pop-up-window): Use pop-to-buffer-same-window.
* ebdb-gnus.el (ebdb/gnus-score): Docs.
* ebdb-migrate.el (ebdb-migrate-from-bbdb): Use
condition-case-unless-debug, also docs.
* ebdb.el (cl-print-object): Make sure 'file slot is bound.
(ebdb-load): mapc -- side effect only.
---
ebdb-com.el | 4 ++--
ebdb-gnus.el | 9 +++++----
ebdb-migrate.el | 5 ++---
ebdb.el | 31 ++++++++++++++++---------------
4 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/ebdb-com.el b/ebdb-com.el
index 93a5984..ca43364 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -1014,10 +1014,10 @@ buffer."
;; It's already visible, re-use it.
(or (null select)
(select-window buffer-window)))
- ((and (null split-window) (null size))
+ ((not (or split-window size))
;; Not splitting, but buffer isn't visible, just take up
;; the whole window.
- (set-window-buffer (selected-window) buf)
+ (pop-to-buffer-same-window buf)
(setq buffer-window (get-buffer-window buf t)))
(t
;; Otherwise split.
diff --git a/ebdb-gnus.el b/ebdb-gnus.el
index 144a6fc..5182c4d 100644
--- a/ebdb-gnus.el
+++ b/ebdb-gnus.el
@@ -102,10 +102,11 @@ record contains a gnus-score field."
;;;###autoload
(defun ebdb/gnus-score (group)
- "This returns a score alist for Gnus. A score pair will be made for
-every member of the mail field in records which also have a gnus-score
-field. This allows the EBDB to serve as a supplemental global score
-file, with the advantage that it can keep up with multiple and changing
+ "Return a score alist for Gnus.
+A score pair will be made for every member of the mail field in
+records which also have a `gnus-score' field. This allows the
+EBDB to serve as a supplemental global score file, with the
+advantage that it can keep up with multiple and changing
addresses better than the traditionally static global scorefile."
(list (list
(condition-case nil
diff --git a/ebdb-migrate.el b/ebdb-migrate.el
index 645422f..988ded4 100644
--- a/ebdb-migrate.el
+++ b/ebdb-migrate.el
@@ -397,7 +397,7 @@ BBDB sets the default of that option."
c-records duds)
(message "Migrating records...")
(dolist (r v-records)
- (condition-case err
+ (condition-case-unless-debug err
(let ((orgs (ebdb-vrecord-organization r))
(c-rec (ebdb-migrate-vector-to-class r))
org)
@@ -449,8 +449,7 @@ BBDB sets the default of that option."
(length c-records))))))
(defun ebdb-migrate-vector-to-class (v)
- "Migrate a single vector-style BBDB record to the EIEIO class
- style used in EBDB."
+ "Migrate a single vector-style BBDB record V to EBDB style EIEIO object."
;; In the vector version, vector elements were:
;; record: firstname lastname affix aka organization phone address mail
xfields
diff --git a/ebdb.el b/ebdb.el
index 60b2b3c..606da40 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -1031,8 +1031,8 @@ process."
(or (slot-value field 'object-name)
(ebdb-field-readable-name (eieio-object-class field))))
-;;; The obfuscated field type. This is a little goofy, but might come
-;;; in handy.
+;; The obfuscated field type. This is a little goofy, but might come
+;; in handy.
(defclass ebdb-field-obfuscated (ebdb-field)
nil
@@ -1042,8 +1042,8 @@ process."
displayed in the *EBDB* buffer. Use for mildly sensitive
information.")
-;;; The singleton field type. Records may only have one instance of
-;;; fields of this type. (Unrelated to `eieio-singleton'.)
+;; The singleton field type. Records may only have one instance of
+;; fields of this type. (Unrelated to `eieio-singleton'.)
;; There's a method of `ebdb-record-insert-field' for this class down
;; under the definition of `ebdb-record'.
@@ -1054,16 +1054,16 @@ process."
"A field class mixin that ensures a record can only have one
instance of that field class.")
-;;; User-defined fields. There are two kinds. The first is
-;;; `ebdb-field-user', which provides no information about labels or
-;;; slots, but simply gives us the right to live in the "fields" slot
-;;; of records. It must be subclassed to be useful.
+;; User-defined fields. There are two kinds. The first is
+;; `ebdb-field-user', which provides no information about labels or
+;; slots, but simply gives us the right to live in the "fields" slot
+;; of records. It must be subclassed to be useful.
-;;; The second is the `ebdb-field-user-simple', which subclasses
-;;; `ebdb-field-user' and `ebdb-field-labeled'. This class should
-;;; *not* be subclassed; it's the class that collects all the basic
-;;; label-plus-value fields that users might want to add. Instances
-;;; have no particular behavior, they're just key-value pairs.
+;; The second is the `ebdb-field-user-simple', which subclasses
+;; `ebdb-field-user' and `ebdb-field-labeled'. This class should
+;; *not* be subclassed; it's the class that collects all the basic
+;; label-plus-value fields that users might want to add. Instances
+;; have no particular behavior, they're just key-value pairs.
(defclass ebdb-field-user (ebdb-field)
nil
@@ -3952,7 +3952,8 @@ process.")
(cl-defmethod cl-print-object ((db ebdb-db) stream)
(princ (format "#<%S %s %d records>"
(eieio-object-class-name db)
- (slot-value db 'file)
+ (when (slot-boundp db 'file)
+ (slot-value db 'file))
(length (slot-value db 'records)))
stream))
@@ -4857,7 +4858,7 @@ important work is done by the `ebdb-db-load' method."
(message "%s is currently disabled." (ebdb-string s))
;; Remove this database's records from
;; `ebdb-record-tracker'.
- (mapcar #'delete-instance (slot-value s 'records))
+ (mapc #'delete-instance (slot-value s 'records))
(sit-for 2)))
(if (and
(null ebdb-record-tracker)
- [elpa] externals/ebdb updated (b0029d3 -> aac31a3), Eric Abrahamsen, 2017/10/18
- [elpa] externals/ebdb e8c956d 1/9: Adjust database checks when loading, Eric Abrahamsen, 2017/10/18
- [elpa] externals/ebdb 64dbf86 5/9: Bah, commited a bit of (erroneous) test code, Eric Abrahamsen, 2017/10/18
- [elpa] externals/ebdb 94b11b9 2/9: Various tweaks,
Eric Abrahamsen <=
- [elpa] externals/ebdb c6aef3b 3/9: Fix parsing of address countries during migration, Eric Abrahamsen, 2017/10/18
- [elpa] externals/ebdb 9acc6d4 4/9: Provide more control over faces in *EBDB* buffers, Eric Abrahamsen, 2017/10/18
- [elpa] externals/ebdb dcb1fcc 6/9: Turns out ebdb-fmt-collect-fields could have been a lot simpler, Eric Abrahamsen, 2017/10/18
- [elpa] externals/ebdb 864c1f3 7/9: Give formatters a post-format-function slot, Eric Abrahamsen, 2017/10/18
- [elpa] externals/ebdb aac31a3 9/9: Add browse-url action for domain fields, Eric Abrahamsen, 2017/10/18
- [elpa] externals/ebdb 1ebd9eb 8/9: Fix function call, Eric Abrahamsen, 2017/10/18