branch: externals/vcard commit a50b9e43950f26f28d27ac68d5ac14b7fb79e97d Author: Noah Friedman <fried...@splode.com> Commit: Noah Friedman <fried...@splode.com>
(vcard-format-lines): Handle case where 2nd column has more lines than first column. --- vcard.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vcard.el b/vcard.el index 3c902009f5..0d13bb4f4a 100644 --- a/vcard.el +++ b/vcard.el @@ -7,7 +7,7 @@ ;; Keywords: extensions ;; Created: 1997-09-27 -;; $Id: vcard.el,v 1.3 1997/10/15 07:10:25 friedman Exp $ +;; $Id: vcard.el,v 1.4 1998/02/10 11:02:00 friedman Exp $ ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -229,10 +229,16 @@ presentation buffer." (l lines)) (while tel (setcar l (format col-template (car l) (car tel))) + ;; If we stripped away too many nil slots from l, add empty strings + ;; back in so setcar above will work on next iteration. + (and (cdr tel) + (null (cdr l)) + (setcdr l (cons "" nil))) (setq l (cdr l)) (setq tel (cdr tel))) lines)) + (defun vcard-format-get-name (vcard-data) (let ((name (vcard-format-ref "fn" vcard-data)) (email (or (vcard-format-ref '("email" "internet") vcard-data)