diff options
| author | Paul Eggert | 2016-05-08 12:46:00 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-05-08 12:46:22 -0700 |
| commit | e2f785991d0c696fbb2bc2f331f888d979b8da82 (patch) | |
| tree | ba345e8547f4542bfe9bbb9ef311405bd519cd97 /test | |
| parent | 2eb6817ba971184cc109f8530f4b3b38f65650ea (diff) | |
| download | emacs-e2f785991d0c696fbb2bc2f331f888d979b8da82.tar.gz emacs-e2f785991d0c696fbb2bc2f331f888d979b8da82.zip | |
Simplify now that float-time etc. are built-in
This was prompted by warnings about calls to now-obsolete functions.
* lisp/calendar/time-date.el (encode-time-value):
Use setq rather than a recursive call, to avoid a warning
about calling this obsolete function.
* lisp/calendar/time-date.el (encode-time-value)
(with-decoded-time-value, time-to-seconds, time-to-number-of-days):
* lisp/erc/erc.el (erc-emacs-time-to-erc-time):
* lisp/net/rcirc.el (rcirc-float-time):
* lisp/org/org-compat.el (org-float-time):
Simplify now that time-add and float-time are now built-in.
* lisp/calendar/time-date.el (time-add, time-subtract, time-less-p):
* lisp/net/newst-backend.el (time-add):
* lisp/org/org.el (time-subtract):
Remove backward-compatibility definitions; they are now built-in.
* lisp/calendar/timeclock.el (timeclock-time-to-seconds)
(timeclock-seconds-to-time):
* lisp/net/rcirc.el (rcirc-float-time):
* lisp/org/org-compat.el (org-float-time):
Now obsolete, since callers can just use float-time and
seconds-to-time. All uses changed.
* lisp/emacs-lisp/ert.el (ert-results-pop-to-timings):
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
* lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
* lisp/gnus/nndiary.el (nndiary-compute-reminders):
* lisp/net/tramp.el (tramp-time-diff):
* lisp/org/org-clock.el (org-clock-timestamps-change):
Prefer the time-subtract builtin to the subtract-time alias.
* lisp/files.el (dir-locals-find-file, dir-locals-read-from-dir):
* test/lisp/character-fold-tests.el (character-fold--speed-test):
Prefer the float-time builtin to the time-to-seconds alias.
* lisp/org/org-agenda.el, lisp/org/org-clock.el, lisp/org/org-list.el:
* lisp/org/org-timer.el, lisp/org/org.el:
Adjust to org-float-time deprecation.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/character-fold-tests.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/lisp/character-fold-tests.el b/test/lisp/character-fold-tests.el index c611217712e..dc7e9270551 100644 --- a/test/lisp/character-fold-tests.el +++ b/test/lisp/character-fold-tests.el | |||
| @@ -109,16 +109,14 @@ | |||
| 109 | (character-fold-to-regexp string))) | 109 | (character-fold-to-regexp string))) |
| 110 | (with-temp-buffer | 110 | (with-temp-buffer |
| 111 | (save-excursion (insert string)) | 111 | (save-excursion (insert string)) |
| 112 | (let ((time (time-to-seconds (current-time)))) | 112 | (let ((time (float-time))) |
| 113 | ;; Our initial implementation of case-folding in char-folding | 113 | ;; Our initial implementation of case-folding in char-folding |
| 114 | ;; created a lot of redundant paths in the regexp. Because of | 114 | ;; created a lot of redundant paths in the regexp. Because of |
| 115 | ;; that, if a really long string "almost" matches, the regexp | 115 | ;; that, if a really long string "almost" matches, the regexp |
| 116 | ;; engine took a long time to realize that it doesn't match. | 116 | ;; engine took a long time to realize that it doesn't match. |
| 117 | (should-not (character-fold-search-forward (concat string "c") nil 'noerror)) | 117 | (should-not (character-fold-search-forward (concat string "c") nil 'noerror)) |
| 118 | ;; Ensure it took less than a second. | 118 | ;; Ensure it took less than a second. |
| 119 | (should (< (- (time-to-seconds (current-time)) | 119 | (should (< (- (float-time) time) 1)))))) |
| 120 | time) | ||
| 121 | 1)))))) | ||
| 122 | 120 | ||
| 123 | (provide 'character-fold-tests) | 121 | (provide 'character-fold-tests) |
| 124 | ;;; character-fold-tests.el ends here | 122 | ;;; character-fold-tests.el ends here |