changeset 46909:eb47511f3556

(appt-delete): Use substring-no-properties. (appt-make-list): Don't use prin1-to-string; use the string unchanged.
author Richard M. Stallman <rms@gnu.org>
date Thu, 15 Aug 2002 20:18:42 +0000
parents 70c39fa2253e
children 53d5a958853a
files lisp/calendar/appt.el
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/appt.el	Thu Aug 15 20:15:20 2002 +0000
+++ b/lisp/calendar/appt.el	Thu Aug 15 20:18:42 2002 +0000
@@ -455,7 +455,12 @@
     (while tmp-msg-list
       (let* ((element (car tmp-msg-list))
              (prompt-string (concat "Delete " 
-                                    (prin1-to-string (car (cdr element))) 
+				    ;; We want to quote any doublequotes
+				    ;; in the string, as well as put
+				    ;; doublequotes around it.
+                                    (prin1-to-string
+				     (substring-no-properties
+				      (car (cdr element)) 0)) 
                                     " from list? "))
              (test-input (y-or-n-p prompt-string)))
         (setq tmp-msg-list (cdr tmp-msg-list))
@@ -512,9 +517,7 @@
 	      (while (and entry-list 
 			  (calendar-date-equal 
 			   (calendar-current-date) (car (car entry-list))))
-		(let ((time-string (substring (prin1-to-string 
-					       (cadr (car entry-list))) 1 -1)))
-
+		(let ((time-string (cadr (car entry-list))))
 		  (while (string-match
 			  "\\([0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?\\).*"
 			  time-string)