diff options
| author | Juanma Barranquero | 2008-11-30 01:01:18 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2008-11-30 01:01:18 +0000 |
| commit | 64ba814f12fea7884d6cc2c9e58f63b12b7d79f5 (patch) | |
| tree | 8209080c6587ae2e5d5c7b17563a4791b7e94862 | |
| parent | 0aec90c95b73d821a311a811163695d57f33ef05 (diff) | |
| download | emacs-64ba814f12fea7884d6cc2c9e58f63b12b7d79f5.tar.gz emacs-64ba814f12fea7884d6cc2c9e58f63b12b7d79f5.zip | |
* calendar/diary-lib.el (diary-cyclic): Doc fix.
(diary-remind-message, diary-number-of-entries)
(diary-include-other-diary-files, diary-mark-included-diary-files)
(diary-view-entries, diary-date, diary-block, diary-insert-entry-1)
(diary-font-lock-keywords-1): Reflow docstrings.
(diary-add-to-list, calendar-mark-1, diary-entry-time, diary-make-date)
(diary-anniversary, diary-date-display-form): Fix typos in docstrings.
* emacs-lisp/timer.el (timer-duration-words): Fix typo in docstring.
(timer-duration): Use `string-match-p'.
| -rw-r--r-- | lisp/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/calendar/diary-lib.el | 103 | ||||
| -rw-r--r-- | lisp/emacs-lisp/timer.el | 6 |
3 files changed, 67 insertions, 55 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2a63e8e12a2..2c6c789b67b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2008-11-30 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * calendar/diary-lib.el (diary-cyclic): Doc fix. | ||
| 4 | (diary-remind-message, diary-number-of-entries) | ||
| 5 | (diary-include-other-diary-files, diary-mark-included-diary-files) | ||
| 6 | (diary-view-entries, diary-date, diary-block, diary-insert-entry-1) | ||
| 7 | (diary-font-lock-keywords-1): Reflow docstrings. | ||
| 8 | (diary-add-to-list, calendar-mark-1, diary-entry-time, diary-make-date) | ||
| 9 | (diary-anniversary, diary-date-display-form): Fix typos in docstrings. | ||
| 10 | |||
| 11 | * emacs-lisp/timer.el (timer-duration-words): Fix typo in docstring. | ||
| 12 | (timer-duration): Use `string-match-p'. | ||
| 13 | |||
| 1 | 2008-11-29 Chong Yidong <cyd@stupidchicken.com> | 14 | 2008-11-29 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 15 | ||
| 3 | * complete.el (PC-do-complete-and-exit): Use | 16 | * complete.el (PC-do-complete-and-exit): Use |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index d88144559ea..55a018eebab 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -286,8 +286,8 @@ with no recognizable time after those with times." | |||
| 286 | "Pseudo-pattern giving form of reminder messages in the fancy diary display. | 286 | "Pseudo-pattern giving form of reminder messages in the fancy diary display. |
| 287 | 287 | ||
| 288 | Used by the function `diary-remind', a pseudo-pattern is a list of | 288 | Used by the function `diary-remind', a pseudo-pattern is a list of |
| 289 | expressions that can involve the keywords `days' (a number), `date' (a list of | 289 | expressions that can involve the keywords `days' (a number), `date' |
| 290 | month, day, year), and `diary-entry' (a string)." | 290 | \(a list of month, day, year), and `diary-entry' (a string)." |
| 291 | :type 'sexp | 291 | :type 'sexp |
| 292 | :group 'diary) | 292 | :group 'diary) |
| 293 | 293 | ||
| @@ -430,21 +430,20 @@ just visiting the `diary-file'), and SYMBOL's value is to be changed." | |||
| 430 | 430 | ||
| 431 | (defcustom diary-number-of-entries 1 | 431 | (defcustom diary-number-of-entries 1 |
| 432 | "Specifies how many days of diary entries are to be displayed initially. | 432 | "Specifies how many days of diary entries are to be displayed initially. |
| 433 | This variable affects the diary display when the command \\[diary] is used, | 433 | This variable affects the diary display when the command \\[diary] is |
| 434 | or if the value of the variable `calendar-view-diary-initially-flag' is non-nil. | 434 | used, or if the value of the variable `calendar-view-diary-initially-flag' |
| 435 | For example, if the default value 1 is used, then only the current day's diary | 435 | is non-nil. For example, if the default value 1 is used, then only the |
| 436 | entries will be displayed. If the value 2 is used, then both the current | 436 | current day's diary entries will be displayed. If the value 2 is used, |
| 437 | day's and the next day's entries will be displayed. | 437 | then both the current day's and the next day's entries will be displayed. |
| 438 | 438 | ||
| 439 | The value can also be a vector such as [0 2 2 2 2 4 1]; this value | 439 | The value can also be a vector such as [0 2 2 2 2 4 1]; this value says |
| 440 | says to display no diary entries on Sunday, the entries for | 440 | to display no diary entries on Sunday, the entries for the current date |
| 441 | the current date and the day after on Monday through Thursday, | 441 | and the day after on Monday through Thursday, Friday through Monday's |
| 442 | Friday through Monday's entries on Friday, and only Saturday's | 442 | entries on Friday, and only Saturday's entries on Saturday. |
| 443 | entries on Saturday. | ||
| 444 | 443 | ||
| 445 | This variable does not affect the diary display with the `d' command | 444 | This variable does not affect the diary display with the `d' command |
| 446 | from the calendar; in that case, the prefix argument controls the | 445 | from the calendar; in that case, the prefix argument controls the number |
| 447 | number of days of diary entries displayed." | 446 | of days of diary entries displayed." |
| 448 | :type '(choice (integer :tag "Entries") | 447 | :type '(choice (integer :tag "Entries") |
| 449 | (vector :value [0 0 0 0 0 0 0] | 448 | (vector :value [0 0 0 0 0 0 0] |
| 450 | (integer :tag "Sunday") | 449 | (integer :tag "Sunday") |
| @@ -485,8 +484,8 @@ does nothing. This function is suitable for execution in a `.emacs' file." | |||
| 485 | ;;;###cal-autoload | 484 | ;;;###cal-autoload |
| 486 | (defun diary-view-entries (&optional arg) | 485 | (defun diary-view-entries (&optional arg) |
| 487 | "Prepare and display a buffer with diary entries. | 486 | "Prepare and display a buffer with diary entries. |
| 488 | Searches the file named in `diary-file' for entries that | 487 | Searches the file named in `diary-file' for entries that match |
| 489 | match ARG days starting with the date indicated by the cursor position | 488 | ARG days starting with the date indicated by the cursor position |
| 490 | in the displayed three-month calendar." | 489 | in the displayed three-month calendar." |
| 491 | (interactive "p") | 490 | (interactive "p") |
| 492 | (diary-check-diary-file) | 491 | (diary-check-diary-file) |
| @@ -587,13 +586,13 @@ The function takes a string argument and must return a string.") | |||
| 587 | (defun diary-add-to-list (date string specifier &optional marker | 586 | (defun diary-add-to-list (date string specifier &optional marker |
| 588 | globcolor literal) | 587 | globcolor literal) |
| 589 | "Add an entry to `diary-entries-list'. | 588 | "Add an entry to `diary-entries-list'. |
| 590 | Do nothing if DATE or STRING is nil. DATE is the (MONTH DAY | 589 | Do nothing if DATE or STRING are nil. DATE is the (MONTH DAY |
| 591 | YEAR) for which the entry applies; STRING is the text of the | 590 | YEAR) for which the entry applies; STRING is the text of the |
| 592 | entry as it will appear in the diary (i.e. with any format | 591 | entry as it will appear in the diary (i.e. with any format |
| 593 | strings such as \"%d\" expanded); SPECIFIER is the date part of | 592 | strings such as \"%d\" expanded); SPECIFIER is the date part of |
| 594 | the entry as it appears in the diary-file; LITERAL is the entry | 593 | the entry as it appears in the diary-file; LITERAL is the entry |
| 595 | as it appears in the diary-file (i.e. before expansion). If | 594 | as it appears in the diary-file (i.e. before expansion). |
| 596 | LITERAL is nil, it is taken to be the same as STRING. | 595 | If LITERAL is nil, it is taken to be the same as STRING. |
| 597 | 596 | ||
| 598 | The entry is added to the list as (DATE STRING SPECIFIER LOCATOR | 597 | The entry is added to the list as (DATE STRING SPECIFIER LOCATOR |
| 599 | GLOBCOLOR), where LOCATOR has the form (MARKER FILENAME LITERAL), | 598 | GLOBCOLOR), where LOCATOR has the form (MARKER FILENAME LITERAL), |
| @@ -822,8 +821,8 @@ it enables you to use shared diary files together with your own. | |||
| 822 | The files included are specified in the `diary-file' by lines of this form: | 821 | The files included are specified in the `diary-file' by lines of this form: |
| 823 | #include \"filename\" | 822 | #include \"filename\" |
| 824 | This is recursive; that is, #include directives in diary files thus included | 823 | This is recursive; that is, #include directives in diary files thus included |
| 825 | are obeyed. You can change the `#include' to some other string by | 824 | are obeyed. You can change the `#include' to some other string by changing |
| 826 | changing the variable `diary-include-string'." | 825 | the variable `diary-include-string'." |
| 827 | (goto-char (point-min)) | 826 | (goto-char (point-min)) |
| 828 | (while (re-search-forward | 827 | (while (re-search-forward |
| 829 | (format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string)) | 828 | (format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string)) |
| @@ -1384,8 +1383,8 @@ you to use shared diary files together with your own. The files included are | |||
| 1384 | specified in the `diary-file' by lines of this form: | 1383 | specified in the `diary-file' by lines of this form: |
| 1385 | #include \"filename\" | 1384 | #include \"filename\" |
| 1386 | This is recursive; that is, #include directives in diary files thus included | 1385 | This is recursive; that is, #include directives in diary files thus included |
| 1387 | are obeyed. You can change the `#include' to some other string by | 1386 | are obeyed. You can change the `#include' to some other string by changing |
| 1388 | changing the variable `diary-include-string'." | 1387 | the variable `diary-include-string'." |
| 1389 | (goto-char (point-min)) | 1388 | (goto-char (point-min)) |
| 1390 | (while (re-search-forward | 1389 | (while (re-search-forward |
| 1391 | (format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string)) | 1390 | (format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string)) |
| @@ -1501,7 +1500,7 @@ Optional argument COLOR is passed to `calendar-mark-visible-date' as MARK." | |||
| 1501 | (defun calendar-mark-1 (month day year fromabs toabs &optional color) | 1500 | (defun calendar-mark-1 (month day year fromabs toabs &optional color) |
| 1502 | "Mark dates in the calendar conforming to MONTH DAY YEAR of some system. | 1501 | "Mark dates in the calendar conforming to MONTH DAY YEAR of some system. |
| 1503 | The function FROMABS converts absolute dates to the appropriate date system. | 1502 | The function FROMABS converts absolute dates to the appropriate date system. |
| 1504 | The function TOABDS carries out the inverse operation. Optional argument | 1503 | The function TOABS carries out the inverse operation. Optional argument |
| 1505 | COLOR is passed to `calendar-mark-visible-date' as MARK." | 1504 | COLOR is passed to `calendar-mark-visible-date' as MARK." |
| 1506 | (save-excursion | 1505 | (save-excursion |
| 1507 | (set-buffer calendar-buffer) | 1506 | (set-buffer calendar-buffer) |
| @@ -1536,7 +1535,7 @@ For example, returns 1325 for 1:25pm. | |||
| 1536 | 1535 | ||
| 1537 | Returns `diary-unknown-time' (default value -9999) if no time is recognized. | 1536 | Returns `diary-unknown-time' (default value -9999) if no time is recognized. |
| 1538 | The recognized forms are XXXX, X:XX, or XX:XX (military time), and XXam, | 1537 | The recognized forms are XXXX, X:XX, or XX:XX (military time), and XXam, |
| 1539 | XXAM, XXpm, XXPM, XX:XXam, XX:XXAM XX:XXpm, or XX:XXPM. A period (.) can | 1538 | XXAM, XXpm, XXPM, XX:XXam, XX:XXAM, XX:XXpm, or XX:XXPM. A period (.) can |
| 1540 | be used instead of a colon (:) to separate the hour and minute parts." | 1539 | be used instead of a colon (:) to separate the hour and minute parts." |
| 1541 | (let (case-fold-search) | 1540 | (let (case-fold-search) |
| 1542 | (cond ((string-match ; military time | 1541 | (cond ((string-match ; military time |
| @@ -1739,7 +1738,7 @@ best if they are non-marking." | |||
| 1739 | "Convert A B C into the internal calendar date form. | 1738 | "Convert A B C into the internal calendar date form. |
| 1740 | The expected order of the inputs depends on `calendar-date-style', | 1739 | The expected order of the inputs depends on `calendar-date-style', |
| 1741 | e.g. in the European case, A = day, B = month, C = year. Returns | 1740 | e.g. in the European case, A = day, B = month, C = year. Returns |
| 1742 | a list\(MONTH DAY YEAR), i.e. the American style, which is the | 1741 | a list (MONTH DAY YEAR), i.e. the American style, which is the |
| 1743 | form used internally by the calendar and diary." | 1742 | form used internally by the calendar and diary." |
| 1744 | (cond ((eq calendar-date-style 'iso) ; YMD | 1743 | (cond ((eq calendar-date-style 'iso) ; YMD |
| 1745 | (list b c a)) | 1744 | (list b c a)) |
| @@ -1756,13 +1755,13 @@ form used internally by the calendar and diary." | |||
| 1756 | ;; To be called from diary-sexp-entry, where DATE, ENTRY are bound. | 1755 | ;; To be called from diary-sexp-entry, where DATE, ENTRY are bound. |
| 1757 | (defun diary-date (month day year &optional mark) | 1756 | (defun diary-date (month day year &optional mark) |
| 1758 | "Specific date(s) diary entry. | 1757 | "Specific date(s) diary entry. |
| 1759 | Entry applies if date is MONTH, DAY, YEAR. Each parameter can be | 1758 | Entry applies if date is MONTH, DAY, YEAR. Each parameter can be a |
| 1760 | a list of integers, `t' (meaning all values), or an integer. The | 1759 | list of integers, `t' (meaning all values), or an integer. The order |
| 1761 | order of the input parameters changes according to `calendar-date-style' | 1760 | of the input parameters changes according to `calendar-date-style' |
| 1762 | \(e.g. to DAY MONTH YEAR in the European style). | 1761 | \(e.g. to DAY MONTH YEAR in the European style). |
| 1763 | 1762 | ||
| 1764 | An optional parameter MARK specifies a face or single-character string to | 1763 | An optional parameter MARK specifies a face or single-character string |
| 1765 | use when highlighting the day in the calendar." | 1764 | to use when highlighting the day in the calendar." |
| 1766 | (let* ((ddate (diary-make-date month day year)) | 1765 | (let* ((ddate (diary-make-date month day year)) |
| 1767 | (dd (calendar-extract-day ddate)) | 1766 | (dd (calendar-extract-day ddate)) |
| 1768 | (mm (calendar-extract-month ddate)) | 1767 | (mm (calendar-extract-month ddate)) |
| @@ -1785,12 +1784,12 @@ use when highlighting the day in the calendar." | |||
| 1785 | ;; To be called from diary-sexp-entry, where DATE, ENTRY are bound. | 1784 | ;; To be called from diary-sexp-entry, where DATE, ENTRY are bound. |
| 1786 | (defun diary-block (m1 d1 y1 m2 d2 y2 &optional mark) | 1785 | (defun diary-block (m1 d1 y1 m2 d2 y2 &optional mark) |
| 1787 | "Block diary entry. | 1786 | "Block diary entry. |
| 1788 | Entry applies if date is between, or on one of, two dates. The | 1787 | Entry applies if date is between, or on one of, two dates. The order |
| 1789 | order of the input parameters changes according to | 1788 | of the input parameters changes according to `calendar-date-style' |
| 1790 | `calendar-date-style' (e.g. to D1, M1, Y1, D2, M2, Y2 in the European style). | 1789 | \(e.g. to D1, M1, Y1, D2, M2, Y2 in the European style). |
| 1791 | 1790 | ||
| 1792 | An optional parameter MARK specifies a face or single-character string to | 1791 | An optional parameter MARK specifies a face or single-character string |
| 1793 | use when highlighting the day in the calendar." | 1792 | to use when highlighting the day in the calendar." |
| 1794 | (let ((date1 (calendar-absolute-from-gregorian | 1793 | (let ((date1 (calendar-absolute-from-gregorian |
| 1795 | (diary-make-date m1 d1 y1))) | 1794 | (diary-make-date m1 d1 y1))) |
| 1796 | (date2 (calendar-absolute-from-gregorian | 1795 | (date2 (calendar-absolute-from-gregorian |
| @@ -1879,11 +1878,11 @@ Entry applies if date is the anniversary of MONTH, DAY, YEAR. | |||
| 1879 | The order of the input parameters changes according to | 1878 | The order of the input parameters changes according to |
| 1880 | `calendar-date-style' (e.g. to DAY MONTH YEAR in the European style). | 1879 | `calendar-date-style' (e.g. to DAY MONTH YEAR in the European style). |
| 1881 | 1880 | ||
| 1882 | The diary entry can contain `%d' or `%d%s'; the %d will be | 1881 | The diary entry can contain `%d' or `%d%s'; the %d will be replaced |
| 1883 | replaced by the number of years since the MONTH, DAY, YEAR, and the | 1882 | by the number of years since the MONTH, DAY, YEAR, and the %s will |
| 1884 | %s will be replaced by the ordinal ending of that number (that | 1883 | be replaced by the ordinal ending of that number (that is, `st', |
| 1885 | is, `st', `nd', `rd' or `th', as appropriate. The anniversary of | 1884 | `nd', `rd' or `th', as appropriate). The anniversary of February 29 |
| 1886 | February 29 is considered to be March 1 in non-leap years. | 1885 | is considered to be March 1 in non-leap years. |
| 1887 | 1886 | ||
| 1888 | An optional parameter MARK specifies a face or single-character | 1887 | An optional parameter MARK specifies a face or single-character |
| 1889 | string to use when highlighting the day in the calendar." | 1888 | string to use when highlighting the day in the calendar." |
| @@ -1904,10 +1903,10 @@ string to use when highlighting the day in the calendar." | |||
| 1904 | "Cycle diary entry--entry applies every N days starting at MONTH, DAY, YEAR. | 1903 | "Cycle diary entry--entry applies every N days starting at MONTH, DAY, YEAR. |
| 1905 | The order of the input parameters changes according to | 1904 | The order of the input parameters changes according to |
| 1906 | `calendar-date-style' (e.g. to N DAY MONTH YEAR in the European | 1905 | `calendar-date-style' (e.g. to N DAY MONTH YEAR in the European |
| 1907 | style). ENTRY can contain `%d' or `%d%s'; the %d will be | 1906 | style). The entry can contain `%d' or `%d%s'; the %d will be |
| 1908 | replaced by the number of repetitions since the MONTH DAY YEAR, | 1907 | replaced by the number of repetitions since the MONTH DAY YEAR, |
| 1909 | and %s by the ordinal ending of that number (that is, `st', `nd', | 1908 | and %s by the ordinal ending of that number (that is, `st', `nd', |
| 1910 | `rd' or `th', as appropriate. | 1909 | `rd' or `th', as appropriate). |
| 1911 | 1910 | ||
| 1912 | An optional parameter MARK specifies a face or single-character | 1911 | An optional parameter MARK specifies a face or single-character |
| 1913 | string to use when highlighting the day in the calendar." | 1912 | string to use when highlighting the day in the calendar." |
| @@ -2022,7 +2021,7 @@ Prefix argument ARG makes the entry nonmarking." | |||
| 2022 | 'diary-insert-weekly-entry "23.1") | 2021 | 'diary-insert-weekly-entry "23.1") |
| 2023 | 2022 | ||
| 2024 | (defun diary-date-display-form (&optional type) | 2023 | (defun diary-date-display-form (&optional type) |
| 2025 | "Return value for `calendar-date-display-form' using `calendar-date-style.' | 2024 | "Return value for `calendar-date-display-form' using `calendar-date-style'. |
| 2026 | Optional symbol TYPE is either `monthly' or `yearly'." | 2025 | Optional symbol TYPE is either `monthly' or `yearly'." |
| 2027 | (cond ((eq type 'monthly) (cond ((eq calendar-date-style 'iso) | 2026 | (cond ((eq type 'monthly) (cond ((eq calendar-date-style 'iso) |
| 2028 | '((format "*-*-%.2d" | 2027 | '((format "*-*-%.2d" |
| @@ -2048,11 +2047,11 @@ Optional symbol TYPE is either `monthly' or `yearly'." | |||
| 2048 | 2047 | ||
| 2049 | (defun diary-insert-entry-1 (&optional type nomark months symbol absfunc) | 2048 | (defun diary-insert-entry-1 (&optional type nomark months symbol absfunc) |
| 2050 | "Subroutine to insert a diary entry related to the date at point. | 2049 | "Subroutine to insert a diary entry related to the date at point. |
| 2051 | TYPE is the type of entry (`monthly' or `yearly'). NOMARK | 2050 | TYPE is the type of entry (`monthly' or `yearly'). NOMARK non-nil |
| 2052 | non-nil means make the entry non-marking. Array MONTHS is used | 2051 | means make the entry non-marking. Array MONTHS is used in place |
| 2053 | in place of `calendar-month-name-array'. String SYMBOL marks the | 2052 | of `calendar-month-name-array'. String SYMBOL marks the type of |
| 2054 | type of diary entry. Function ABSFUNC converts absolute dates to | 2053 | diary entry. Function ABSFUNC converts absolute dates to dates of |
| 2055 | dates of the appropriate type." | 2054 | the appropriate type." |
| 2056 | (let ((calendar-date-display-form (if type | 2055 | (let ((calendar-date-display-form (if type |
| 2057 | (diary-date-display-form type) | 2056 | (diary-date-display-form type) |
| 2058 | calendar-date-display-form)) | 2057 | calendar-date-display-form)) |
| @@ -2218,8 +2217,8 @@ names." | |||
| 2218 | (defmacro diary-font-lock-keywords-1 (markfunc listfunc feature months symbol) | 2217 | (defmacro diary-font-lock-keywords-1 (markfunc listfunc feature months symbol) |
| 2219 | "Subroutine of the function `diary-font-lock-keywords'. | 2218 | "Subroutine of the function `diary-font-lock-keywords'. |
| 2220 | If MARKFUNC is a member of `diary-nongregorian-marking-hook', or | 2219 | If MARKFUNC is a member of `diary-nongregorian-marking-hook', or |
| 2221 | LISTFUNC of `diary-nongregorian-listing-hook', then require FEATURE | 2220 | LISTFUNC of `diary-nongregorian-listing-hook', then require FEATURE and |
| 2222 | and return a font-lock pattern matching array of MONTHS and marking SYMBOL." | 2221 | return a font-lock pattern matching array of MONTHS and marking SYMBOL." |
| 2223 | `(when (or (memq ',markfunc diary-nongregorian-marking-hook) | 2222 | `(when (or (memq ',markfunc diary-nongregorian-marking-hook) |
| 2224 | (memq ',listfunc diary-nongregorian-listing-hook)) | 2223 | (memq ',listfunc diary-nongregorian-listing-hook)) |
| 2225 | (require ',feature) | 2224 | (require ',feature) |
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 9f5f72d81fe..03d41936248 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el | |||
| @@ -487,7 +487,7 @@ The argument should be a value previously returned by `with-timeout-suspend'." | |||
| 487 | (dolist (elt timer-spec-list) | 487 | (dolist (elt timer-spec-list) |
| 488 | (let ((timer (car elt)) | 488 | (let ((timer (car elt)) |
| 489 | (delay (cadr elt))) | 489 | (delay (cadr elt))) |
| 490 | (timer-set-time timer (time-add (current-time) delay)) | 490 | (timer-set-time timer (time-add (current-time) delay)) |
| 491 | (timer-activate timer)))) | 491 | (timer-activate timer)))) |
| 492 | 492 | ||
| 493 | (defun y-or-n-p-with-timeout (prompt seconds default-value) | 493 | (defun y-or-n-p-with-timeout (prompt seconds default-value) |
| @@ -512,7 +512,7 @@ If the user does not answer after SECONDS seconds, return DEFAULT-VALUE." | |||
| 512 | (cons "month" (* 30 24 60 60)) ; Approximation | 512 | (cons "month" (* 30 24 60 60)) ; Approximation |
| 513 | (cons "year" (* 365.25 24 60 60)) ; Approximation | 513 | (cons "year" (* 365.25 24 60 60)) ; Approximation |
| 514 | ) | 514 | ) |
| 515 | "Alist mapping temporal words to durations in seconds") | 515 | "Alist mapping temporal words to durations in seconds.") |
| 516 | 516 | ||
| 517 | (defun timer-duration (string) | 517 | (defun timer-duration (string) |
| 518 | "Return number of seconds specified by STRING, or nil if parsing fails." | 518 | "Return number of seconds specified by STRING, or nil if parsing fails." |
| @@ -534,7 +534,7 @@ If the user does not answer after SECONDS seconds, return DEFAULT-VALUE." | |||
| 534 | start (length string))))) | 534 | start (length string))))) |
| 535 | (if (= start (length string)) | 535 | (if (= start (length string)) |
| 536 | secs | 536 | secs |
| 537 | (if (string-match "\\`[0-9.]+\\'" string) | 537 | (if (string-match-p "\\`[0-9.]+\\'" string) |
| 538 | (string-to-number string))))) | 538 | (string-to-number string))))) |
| 539 | 539 | ||
| 540 | (provide 'timer) | 540 | (provide 'timer) |