[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 455dc91: Fix ebdb-parse methods to return slots, not objec
From: |
Eric Abrahamsen |
Subject: |
[elpa] master 455dc91: Fix ebdb-parse methods to return slots, not objects, bump to 1.3 |
Date: |
Thu, 15 Aug 2019 19:56:18 -0400 (EDT) |
branch: master
commit 455dc91899165955575716675009c9b16b6e3b09
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Fix ebdb-parse methods to return slots, not objects, bump to 1.3
* packages/ebdb-i18n-chn/ebdb-i18n-chn.el (ebdb-parse-i18n): The base
methods were confused: ebdb-parse should only alter the slots argument
and pass it back up the calling chain, not return an object directly.
---
packages/ebdb-i18n-chn/ebdb-i18n-chn.el | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/packages/ebdb-i18n-chn/ebdb-i18n-chn.el
b/packages/ebdb-i18n-chn/ebdb-i18n-chn.el
index f6a26ce..b336564 100644
--- a/packages/ebdb-i18n-chn/ebdb-i18n-chn.el
+++ b/packages/ebdb-i18n-chn/ebdb-i18n-chn.el
@@ -4,7 +4,7 @@
;; Author: Eric Abrahamsen <address@hidden>
;; Maintainer: Eric Abrahamsen <address@hidden>
-;; Version: 1.2
+;; Version: 1.3
;; Package-Requires: ((pyim "1.6.0") (ebdb "0.2"))
;; This program is free software; you can redistribute it and/or modify
@@ -68,7 +68,7 @@
(when (string-match "X\\([0-9]+\\)\\'" num-str)
(setq slots (plist-put slots :extension
(string-to-number (match-string 1 num-str)))))
- (apply #'make-instance class slots)))
+ slots))
(cl-defmethod ebdb-string-i18n ((adr ebdb-field-address)
(_cc (eql chn)))
@@ -104,10 +104,8 @@
given-names (match-string 2 string))
(setq surname (substring string 0 1)
given-names (substring string 1)))
-
- (make-instance class
- :surname surname
- :given-names (list given-names))))
+ (list :surname surname :given-names (list given-names)
+ :suffix nil)))
(cl-defmethod ebdb-string-i18n ((field ebdb-field-name-complex)
(_script (eql han)))
@@ -124,13 +122,12 @@ the record cache."
(record ebdb-record)
add-or-del)
"Add or remove a hash for a Chinese-character name.
-
This function is called by both the `ebdb-init-field-i18n' and
`ebdb-delete-field-i18n' methods. It checks if the name is in
Chinese characters, and if it is, converts it into pinyin, and
either adds or removes a hash entry for the record under that
name. It also adds the pinyin to the record's name cache, so
-searchs via pinyin will find the record."
+searches via pinyin will find the record."
;; We use `pyim-hanzi2pinyin-simple' because it's cheaper, and
;; because checking for multiple character pronunciations isn't
;; really helpful in people's names.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] master 455dc91: Fix ebdb-parse methods to return slots, not objects, bump to 1.3,
Eric Abrahamsen <=