[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: appt.el fix: don't use prin1-to-string
From: |
Alan Shutko |
Subject: |
Re: appt.el fix: don't use prin1-to-string |
Date: |
Tue, 13 Aug 2002 20:26:43 -0400 |
User-agent: |
Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu) |
Richard Stallman <address@hidden> writes:
> I think the reason for using prin1-to-string in the first of these
> cases is to quote any doublequotes in the string itself.
> In the second case, not calling it seems to be correct.
That makes sense. Here's a new patch which just removes text
properties before printing it in the prompt, but avoids the
prin1-to-string in appt-make-list.
2002-08-13 Alan Shutko <address@hidden>
* calendar/appt.el (appt-delete): Remove properties before calling
prin1-to-string.
(appt-make-list): Remove prin1-to-string calls (and substrings
around them) since strings may have properties.
Index: lisp/calendar/appt.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/calendar/appt.el,v
retrieving revision 1.44
diff -u -r1.44 appt.el
--- lisp/calendar/appt.el 12 Aug 2002 17:21:06 -0000 1.44
+++ lisp/calendar/appt.el 14 Aug 2002 00:25:09 -0000
@@ -454,8 +454,13 @@
(let* ((tmp-msg-list appt-time-msg-list))
(while tmp-msg-list
(let* ((element (car tmp-msg-list))
- (prompt-string (concat "Delete "
- (prin1-to-string (car (cdr element)))
+ (entry (car (cdr element)))
+ (prompt-string (concat "Delete "
+ (prin1-to-string
+ (progn
+ (set-text-properties 0 (length entry)
+ nil entry)
+ entry))
" 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)
--
Alan Shutko <address@hidden> - In a variety of flavors!
The darn thing works better if you plug it in