2010-09-23 Glenn Morris <rgm@gnu.org>
+ * vc/add-log.el: Don't require timezone when compiling.
+ (timezone-make-date-sortable): Autoload it.
+ (change-log-sortable-date-at): Don't require timezone.
+ Use `ignore-errors'.
+
* comint.el (comint-use-prompt-regexp-instead-of-fields):
Move alias before definition, so it does not need autoloading.
;;; Code:
-(eval-when-compile
- (require 'timezone))
-
(defgroup change-log nil
"Change log maintenance."
:group 'tools
(change-log-get-method-definition-1 ""))
(concat change-log-get-method-definition-md "]"))))))
\f
+(autoload 'timezone-make-date-sortable "timezone")
+
(defun change-log-sortable-date-at ()
"Return date of log entry in a consistent form for sorting.
Point is assumed to be at the start of the entry."
- (require 'timezone)
(if (looking-at change-log-start-entry-re)
(let ((date (match-string-no-properties 0)))
(if date
(if (string-match "\\(....\\)-\\(..\\)-\\(..\\)\\s-+" date)
(concat (match-string 1 date) (match-string 2 date)
(match-string 3 date))
- (condition-case nil
- (timezone-make-date-sortable date)
- (error nil)))))
+ (ignore-errors (timezone-make-date-sortable date)))))
(error "Bad date")))
(defun change-log-resolve-conflict ()