aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-09-23 00:17:08 -0700
committerGlenn Morris2010-09-23 00:17:08 -0700
commit7b344dfef79b1fdd068b39036bb34ddeafa96b7d (patch)
treeb3f2f1036eba1c56faf76e0019ac7398b4975f51
parentd97034985aea86dbc2405db1cab5433c65339ac4 (diff)
downloademacs-7b344dfef79b1fdd068b39036bb34ddeafa96b7d.tar.gz
emacs-7b344dfef79b1fdd068b39036bb34ddeafa96b7d.zip
Cosmetic changes for add-log.el.
* lisp/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'.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc/add-log.el10
2 files changed, 8 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7bf7ed53108..658c4b18b58 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
12010-09-23 Glenn Morris <rgm@gnu.org> 12010-09-23 Glenn Morris <rgm@gnu.org>
2 2
3 * vc/add-log.el: Don't require timezone when compiling.
4 (timezone-make-date-sortable): Autoload it.
5 (change-log-sortable-date-at): Don't require timezone.
6 Use `ignore-errors'.
7
3 * comint.el (comint-use-prompt-regexp-instead-of-fields): 8 * comint.el (comint-use-prompt-regexp-instead-of-fields):
4 Move alias before definition, so it does not need autoloading. 9 Move alias before definition, so it does not need autoloading.
5 10
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index 23f1e33f181..b63e482ff05 100644
--- a/lisp/vc/add-log.el
+++ b/lisp/vc/add-log.el
@@ -37,9 +37,6 @@
37 37
38;;; Code: 38;;; Code:
39 39
40(eval-when-compile
41 (require 'timezone))
42
43(defgroup change-log nil 40(defgroup change-log nil
44 "Change log maintenance." 41 "Change log maintenance."
45 :group 'tools 42 :group 'tools
@@ -1252,19 +1249,18 @@ Has a preference of looking backwards."
1252 (change-log-get-method-definition-1 "")) 1249 (change-log-get-method-definition-1 ""))
1253 (concat change-log-get-method-definition-md "]")))))) 1250 (concat change-log-get-method-definition-md "]"))))))
1254 1251
1252(autoload 'timezone-make-date-sortable "timezone")
1253
1255(defun change-log-sortable-date-at () 1254(defun change-log-sortable-date-at ()
1256 "Return date of log entry in a consistent form for sorting. 1255 "Return date of log entry in a consistent form for sorting.
1257Point is assumed to be at the start of the entry." 1256Point is assumed to be at the start of the entry."
1258 (require 'timezone)
1259 (if (looking-at change-log-start-entry-re) 1257 (if (looking-at change-log-start-entry-re)
1260 (let ((date (match-string-no-properties 0))) 1258 (let ((date (match-string-no-properties 0)))
1261 (if date 1259 (if date
1262 (if (string-match "\\(....\\)-\\(..\\)-\\(..\\)\\s-+" date) 1260 (if (string-match "\\(....\\)-\\(..\\)-\\(..\\)\\s-+" date)
1263 (concat (match-string 1 date) (match-string 2 date) 1261 (concat (match-string 1 date) (match-string 2 date)
1264 (match-string 3 date)) 1262 (match-string 3 date))
1265 (condition-case nil 1263 (ignore-errors (timezone-make-date-sortable date)))))
1266 (timezone-make-date-sortable date)
1267 (error nil)))))
1268 (error "Bad date"))) 1264 (error "Bad date")))
1269 1265
1270(defun change-log-resolve-conflict () 1266(defun change-log-resolve-conflict ()