Mercurial > emacs
changeset 108421:b8e814363b3d
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Sat, 20 Feb 2010 13:10:32 +0000 |
parents | c82e39ab7a78 (current diff) 79d3f11c8368 (diff) |
children | 9976fba4d65d |
files | |
diffstat | 6 files changed, 166 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Feb 19 15:29:56 2010 +0000 +++ b/lisp/ChangeLog Sat Feb 20 13:10:32 2010 +0000 @@ -1,3 +1,23 @@ +2010-02-20 Eli Zaretskii <eliz@gnu.org> + + * subr.el (remove-yank-excluded-properties): Explain in a comment + why `category' property is removed. + +2010-02-19 Chong Yidong <cyd@stupidchicken.com> + + * isearch.el (isearch-update-post-hook, isearch-update): Revert + 2010-02-17 change. + +2010-02-19 Ulf Jasper <ulf.jasper@web.de> + + * calendar/icalendar.el (icalendar--convert-ordinary-to-ical) + (icalendar--convert-weekly-to-ical) + (icalendar--convert-yearly-to-ical) + (icalendar--convert-block-to-ical) + (icalendar--convert-cyclic-to-ical) + (icalendar--convert-anniversary-to-ical): Take care of time + specifications where hour has 1-digit only (Bug#5549). + 2010-02-19 Nick Roberts <nickrob@snap.net.nz> * progmodes/gdb-ui.el (gdb-assembler-handler): Accommodate change
--- a/lisp/calendar/icalendar.el Fri Feb 19 15:29:56 2010 +0000 +++ b/lisp/calendar/icalendar.el Sat Feb 20 13:10:32 2010 +0000 @@ -1175,9 +1175,9 @@ (if (string-match (concat nonmarker "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)\\s-*" ; date - "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" ; start time + "\\(\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" ; start time "\\(" - "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" ; end time + "-\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" ; end time "\\)?" "\\s-*\\(.*?\\) ?$") entry-main) @@ -1271,10 +1271,10 @@ entries. ENTRY-MAIN is the first line of the diary entry." (if (and (string-match (concat nonmarker "\\([a-z]+\\)\\s-+" - "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)" + "\\(\\([0-9][0-9]?:[0-9][0-9]\\)" "\\([ap]m\\)?" - "\\(-0?" - "\\([1-9][0-9]?:[0-9][0-9]\\)" + "\\(-" + "\\([0-9][0-9]?:[0-9][0-9]\\)" "\\([ap]m\\)?\\)?" "\\)?" "\\s-*\\(.*?\\) ?$") @@ -1353,12 +1353,12 @@ entries. ENTRY-MAIN is the first line of the diary entry." (if (string-match (concat nonmarker (if (eq (icalendar--date-style) 'european) - "0?\\([1-9]+[0-9]?\\)\\s-+\\([a-z]+\\)\\s-+" - "\\([a-z]+\\)\\s-+0?\\([1-9]+[0-9]?\\)\\s-+") + "\\([0-9]+[0-9]?\\)\\s-+\\([a-z]+\\)\\s-+" + "\\([a-z]+\\)\\s-+\\([0-9]+[0-9]?\\)\\s-+") "\\*?\\s-*" - "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" "\\(" - "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "-\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" "\\)?" "\\s-*\\([^0-9]+.*?\\) ?$" ; must not match years ) @@ -1461,9 +1461,9 @@ (if (string-match (concat nonmarker "%%(diary-block \\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)" " +\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*" - "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" "\\(" - "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "-\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" "\\)?" "\\s-*\\(.*?\\) ?$") entry-main) @@ -1569,9 +1569,9 @@ (if (string-match (concat nonmarker "%%(diary-cyclic \\([^ ]+\\) +" "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*" - "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" "\\(" - "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "-\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" "\\)?" "\\s-*\\(.*?\\) ?$") entry-main) @@ -1642,9 +1642,9 @@ entries. ENTRY-MAIN is the first line of the diary entry." (if (string-match (concat nonmarker "%%(diary-anniversary \\([^)]+\\))\\s-*" - "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" "\\(" - "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "-\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" "\\)?" "\\s-*\\(.*?\\) ?$") entry-main)
--- a/lisp/isearch.el Fri Feb 19 15:29:56 2010 +0000 +++ b/lisp/isearch.el Sat Feb 20 13:10:32 2010 +0000 @@ -156,9 +156,6 @@ (defvar isearch-mode-hook nil "Function(s) to call after starting up an incremental search.") -(defvar isearch-update-post-hook nil - "Function(s) to call after isearch has found matches in the buffer.") - (defvar isearch-mode-end-hook nil "Function(s) to call after terminating an incremental search. When these functions are called, `isearch-mode-end-hook-quit' @@ -871,8 +868,7 @@ (isearch-lazy-highlight-new-loop)) ;; We must prevent the point moving to the end of composition when a ;; part of the composition has just been searched. - (setq disable-point-adjustment t) - (run-hooks 'isearch-update-post-hook)) + (setq disable-point-adjustment t)) (defun isearch-done (&optional nopush edit) "Exit Isearch mode.
--- a/lisp/subr.el Fri Feb 19 15:29:56 2010 +0000 +++ b/lisp/subr.el Sat Feb 20 13:10:32 2010 +0000 @@ -2442,7 +2442,11 @@ "Remove `yank-excluded-properties' between START and END positions. Replaces `category' properties with their defined properties." (let ((inhibit-read-only t)) - ;; Replace any `category' property with the properties it stands for. + ;; Replace any `category' property with the properties it stands + ;; for. This is to remove `mouse-face' properties that are placed + ;; on categories in *Help* buffers' buttons. See + ;; http://lists.gnu.org/archive/html/emacs-devel/2002-04/msg00648.html + ;; for the details. (unless (memq yank-excluded-properties '(t nil)) (save-excursion (goto-char start)
--- a/test/ChangeLog Fri Feb 19 15:29:56 2010 +0000 +++ b/test/ChangeLog Sat Feb 20 13:10:32 2010 +0000 @@ -1,3 +1,16 @@ +2010-02-19 Ulf Jasper <ulf.jasper@web.de> + + * icalendar-testsuite.el + (icalendar-testsuite--run-function-tests): Added new tests. + (icalendar-testsuite--test-diarytime-to-isotime): Added another + testcase. + (icalendar-testsuite--test-convert-ordinary-to-ical): New. + (icalendar-testsuite--test-convert-weekly-to-ical): New. + (icalendar-testsuite--test-convert-yearly-to-ical): New. + (icalendar-testsuite--test-convert-block-to-ical): New. + (icalendar-testsuite--test-convert-cyclic-to-ical): New. + (icalendar-testsuite--test-convert-anniversary-to-ical): New. + 2010-01-18 Juanma Barranquero <lekktu@gmail.com> * cedet/semantic-tests.el (semanticdb-test-gnu-global)
--- a/test/icalendar-testsuite.el Fri Feb 19 15:29:56 2010 +0000 +++ b/test/icalendar-testsuite.el Sat Feb 20 13:10:32 2010 +0000 @@ -52,6 +52,12 @@ (icalendar-testsuite--test-datestring-to-isodate) (icalendar-testsuite--test-datetime-to-diary-date) (icalendar-testsuite--test-diarytime-to-isotime) + (icalendar-testsuite--test-convert-ordinary-to-ical) + (icalendar-testsuite--test-convert-weekly-to-ical) + (icalendar-testsuite--test-convert-yearly-to-ical) + (icalendar-testsuite--test-convert-block-to-ical) + (icalendar-testsuite--test-convert-cyclic-to-ical) + (icalendar-testsuite--test-convert-anniversary-to-ical) (icalendar-testsuite--test-calendar-style) (icalendar-testsuite--test-create-uid) (icalendar-testsuite--test-parse-vtimezone)) @@ -213,6 +219,12 @@ (defun icalendar-testsuite--test-diarytime-to-isotime () "Test method for `icalendar--diarytime-to-isotime'." + (assert (string= (icalendar--diarytime-to-isotime "01:15" "") + "T011500")) + (assert (string= (icalendar--diarytime-to-isotime "1:15" "") + "T011500")) + (assert (string= (icalendar--diarytime-to-isotime "0:01" "") + "T000100")) (assert (string= (icalendar--diarytime-to-isotime "0100" "") "T010000")) (assert (string= (icalendar--diarytime-to-isotime "0100" "am") @@ -236,6 +248,106 @@ (assert (string= (icalendar--diarytime-to-isotime "1259" "pm") "T125900"))) +(defun icalendar-testsuite--test-convert-ordinary-to-ical () + "Test method for `icalendar--convert-ordinary-to-ical'." + (let* ((calendar-date-style 'iso) + result) + ;; without time + (setq result (icalendar--convert-ordinary-to-ical "&?" "2010 2 15 subject")) + (assert (= 2 (length result))) + (assert (string= "\nDTSTART;VALUE=DATE:20100215\nDTEND;VALUE=DATE:20100216" + (car result))) + (assert (string= "subject" (cadr result))) + + ;; with time + (setq result (icalendar--convert-ordinary-to-ical + "&?" "&2010 2 15 12:34-23:45 s")) + (assert (= 2 (length result))) + (assert (string= (concat "\nDTSTART;VALUE=DATE-TIME:20100215T123400" + "\nDTEND;VALUE=DATE-TIME:20100215T234500") + (car result))) + (assert (string= "s" (cadr result))) + + ;; with time, again -- test bug#5549 + (setq result (icalendar--convert-ordinary-to-ical + "x?" "x2010 2 15 0:34-1:45 s")) + (assert (= 2 (length result))) + (assert (string= (concat "\nDTSTART;VALUE=DATE-TIME:20100215T003400" + "\nDTEND;VALUE=DATE-TIME:20100215T014500") + (car result))) + (assert (string= "s" (cadr result))))) + +(defun icalendar-testsuite--test-convert-weekly-to-ical () + "Test method for `icalendar--convert-weekly-to-ical'." + (let* ((calendar-date-style 'iso) + result + (calendar-day-name-array + ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" + "Saturday"])) + (setq result (icalendar--convert-weekly-to-ical "" "Monday 8:30 subject")) + (assert (= 2 (length result))) + (assert (string= (concat "\nDTSTART;VALUE=DATE-TIME:20050103T083000" + "\nDTEND;VALUE=DATE-TIME:20050103T093000" + "\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO") + (car result))) + (assert (string= "subject" (cadr result))))) + +(defun icalendar-testsuite--test-convert-yearly-to-ical () + "Test method for `icalendar--convert-yearly-to-ical'." + (let* ((calendar-date-style 'iso) + result + (calendar-month-name-array + ["January" "February" "March" "April" "May" "June" "July" "August" + "September" "October" "November" "December"])) + (setq result (icalendar--convert-yearly-to-ical "" "May 1 Tag der Arbeit")) + (assert (= 2 (length result))) + (assert (string= (concat + "\nDTSTART;VALUE=DATE:19000501" + "\nDTEND;VALUE=DATE:19000502" + "\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=5;BYMONTHDAY=1") + (car result))) + (assert (string= "Tag der Arbeit" (cadr result))))) + +(defun icalendar-testsuite--test-convert-block-to-ical () + "Test method for `icalendar--convert-block-to-ical'." + (let* ((calendar-date-style 'iso) + result) + (setq result (icalendar--convert-block-to-ical + "" "%%(diary-block 2004 7 19 2004 8 27) Sommerferien")) + (assert (= 2 (length result))) + (assert (string= (concat + "\nDTSTART;VALUE=DATE:20040719" + "\nDTEND;VALUE=DATE:20040828") + (car result))) + (assert (string= "Sommerferien" (cadr result))))) + +(defun icalendar-testsuite--test-convert-cyclic-to-ical () + "Test method for `icalendar--convert-cyclic-to-ical'." + (let* ((calendar-date-style 'iso) + result) + (setq result (icalendar--convert-block-to-ical + "" "%%(diary-block 2004 7 19 2004 8 27) Sommerferien")) + (assert (= 2 (length result))) + (assert (string= (concat + "\nDTSTART;VALUE=DATE:20040719" + "\nDTEND;VALUE=DATE:20040828") + (car result))) + (assert (string= "Sommerferien" (cadr result))))) + +(defun icalendar-testsuite--test-convert-anniversary-to-ical () + "Test method for `icalendar--convert-anniversary-to-ical'." + (let* ((calendar-date-style 'iso) + result) + (setq result (icalendar--convert-anniversary-to-ical + "" "%%(diary-anniversary 1964 6 30) g")) + (assert (= 2 (length result))) + (assert (string= (concat + "\nDTSTART;VALUE=DATE:19640630" + "\nDTEND;VALUE=DATE:19640701" + "\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=06;BYMONTHDAY=30") + (car result))) + (assert (string= "g" (cadr result))))) + (defun icalendar-testsuite--test-calendar-style () "Test method for `icalendar--date-style'." (dolist (calendar-date-style '(iso american european))