branch: externals/ebdb
commit ff3cfa4c9637fad477966cd9262891c058127ef1
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>

    ebdb-parse-i18n for Chinese phones should pass class arg through
    
    * ebdb-chn.el (ebdb-parse-i18n): Pass it through to make-instance,
      don't assume.
---
 ebdb-chn.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ebdb-chn.el b/ebdb-chn.el
index 6b777e1..e10c75e 100644
--- a/ebdb-chn.el
+++ b/ebdb-chn.el
@@ -41,7 +41,7 @@
         (format "X%d" extension)
        ""))))
 
-(cl-defmethod ebdb-parse-i18n ((_class (subclass ebdb-field-phone))
+(cl-defmethod ebdb-parse-i18n ((class (subclass ebdb-field-phone))
                               (str string)
                               (_cc (eql 86))
                               &optional slots)
@@ -61,7 +61,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 'ebdb-field-phone slots)))
+    (apply #'make-instance class slots)))
 
 ;; This isn't all of them, but it seems like a reasonable subset.  See
 ;; https://en.wikipedia.org/wiki/Chinese_compound_surname for a fuller

Reply via email to