[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vcard 5f5af1f780 07/13: (vcard-parse-string): Bind case
From: |
Stefan Monnier |
Subject: |
[elpa] externals/vcard 5f5af1f780 07/13: (vcard-parse-string): Bind case-fold-search to t. |
Date: |
Tue, 12 Jul 2022 00:17:02 -0400 (EDT) |
branch: externals/vcard
commit 5f5af1f780654aba6b8e3689921995a28a74f077
Author: Noah Friedman <friedman@splode.com>
Commit: Noah Friedman <friedman@splode.com>
(vcard-parse-string): Bind case-fold-search to t.
Downcase key for comparison purposes.
---
vcard.el | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/vcard.el b/vcard.el
index 58662c6c92..74ff63497d 100644
--- a/vcard.el
+++ b/vcard.el
@@ -1,13 +1,13 @@
;;; vcard.el --- vcard parsing and display routines
-;; Copyright (C) 1997 Noah S. Friedman
+;; Copyright (C) 1997, 1999 Noah S. Friedman
;; Author: Noah Friedman <friedman@splode.com>
;; Maintainer: friedman@splode.com
;; Keywords: extensions
;; Created: 1997-09-27
-;; $Id: vcard.el,v 1.6 1998/07/21 20:35:40 friedman Exp $
+;; $Id: vcard.el,v 1.7 1999/10/25 05:49:12 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
@@ -29,6 +29,11 @@
;; The display routines here are just an example. The primitives in the
;; first section can be used to construct other vcard formatters.
+;; The vcard 2.1 format is defined by the versit consortium.
+;; See http://www.imc.org/pdi/vcard-21.ps
+;; RFC 2426 defines the vcard 3.0 format.
+;; See ftp://ftp.rfc-editor.org/in-notes/rfc2426.txt
+
;;; Code:
(defvar vcard-standard-filters '(vcard-filter-html)
@@ -63,7 +68,8 @@ If supplied to this function an alist of the form
would be returned."
(save-match-data
- (let ((raw-pos 0)
+ (let ((case-fold-search t)
+ (raw-pos 0)
(vcard-data nil)
key data)
(string-match "^[ \t]*begin:[ \t]*vcard[ \t]*[\r\n]+" raw raw-pos)
@@ -72,7 +78,7 @@ would be returned."
(string-match
"^[ \t]*\\([^:]+\\):[ \t]*\\(.*\\)[ \t]*[\n\r]+"
raw raw-pos))
- (setq key (vcard-matching-substring 1 raw))
+ (setq key (downcase (vcard-matching-substring 1 raw)))
(setq data (vcard-matching-substring 2 raw))
(setq raw-pos (match-end 0))
(cond
@@ -147,7 +153,8 @@ keys."
;; If any key is not present in an alist, the key and value pair will be
;; inserted into the parent alist.
(defun vcard-set-alist-slot (alist key-list value)
- (let* ((key (car key-list))
+ (let* ((orig-key-list key-list)
+ (key (car key-list))
(elt (assoc key alist)))
(setq key-list (cdr key-list))
(cond ((and (cdr elt) key-list)
@@ -157,7 +164,7 @@ keys."
(elt (setcdr elt value))
(t
(let ((new))
- (setq key-list (nreverse (cons key key-list)))
+ (setq key-list (reverse orig-key-list))
(while key-list
(if new
(setq new (cons (car key-list) (cons new nil)))
- [elpa] externals/vcard ec3986a43a 03/13: *** empty log message ***, (continued)
- [elpa] externals/vcard ec3986a43a 03/13: *** empty log message ***, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard f5df1907bb 02/13: *** empty log message ***, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard ef82e79ac7 01/13: *** empty log message ***, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard d0ec40a5c6 08/13: Complete rewrite., Stefan Monnier, 2022/07/12
- [elpa] externals/vcard a50b9e4395 04/13: (vcard-format-lines): Handle case where 2nd column has more lines than, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard 4bf38d79fc 05/13: (vcard-parse-string): Handle "key:field" type entries, i.e. no whitespace, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard 0200b96343 13/13: Adjust package to the new `vcard.el` file, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard 49301aa94d 12/13: Merge branch 'vcard-friedman' into externals/vcard, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard 6283103cc6 11/13: (vcard-hexstring-to-ascii): New macro., Stefan Monnier, 2022/07/12
- [elpa] externals/vcard 1399f2b8cb 06/13: (vcard-format-box): Return empty string if no data to present; don't, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard 5f5af1f780 07/13: (vcard-parse-string): Bind case-fold-search to t.,
Stefan Monnier <=
- [elpa] externals/vcard a3e60e2883 09/13: (vcard-parse-region-value): Do not use `new-marker';, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard c1fa6a26be 10/13: (vcard-char-to-int): New defalias., Stefan Monnier, 2022/07/12