[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commit-womb] addressbook vcard.el
From: |
Xavier Maillard |
Subject: |
[commit-womb] addressbook vcard.el |
Date: |
Tue, 08 May 2007 19:18:42 +0000 |
CVSROOT: /sources/womb
Module name: addressbook
Changes by: Xavier Maillard <zeDek> 07/05/08 19:18:42
Modified files:
. : vcard.el
Log message:
Add vcard-parse-file function.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/addressbook/vcard.el?cvsroot=womb&r1=1.1.1.1&r2=1.2
Patches:
Index: vcard.el
===================================================================
RCS file: /sources/womb/addressbook/vcard.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- vcard.el 4 May 2007 22:20:04 -0000 1.1.1.1
+++ vcard.el 8 May 2007 19:18:42 -0000 1.2
@@ -8,7 +8,7 @@
;; Keywords: vcard, mail, news
;; Created: 1997-09-27
-;; $Id: vcard.el,v 1.1.1.1 2007/05/04 22:20:04 jemarch Exp $
+;; $Id: vcard.el,v 1.2 2007/05/08 19:18:42 zeDek 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
@@ -274,6 +274,17 @@
(goto-char (point-max))
result))
+(defun vcard-parse-file (filename)
+ "Parse FILENAME as a vCard object and return it.
+Parsing occurs with `vcard-parse-region'."
+ (let ((result nil))
+ (with-temp-buffer
+ (insert-file filename)
+ (setq result (vcard-parse-region (point-min) (point-max))))
+ (if result
+ result
+ (error "FILENAME parsing error !"))))
+
;;; Functions for retrieving property or value information from parsed
;;; vcard attributes.
- [commit-womb] addressbook vcard.el,
Xavier Maillard <=