merge with crew.
--- a/contrib/mercurial.el Sun Jun 18 04:13:33 2006 +0900
+++ b/contrib/mercurial.el Sun Jun 18 21:04:42 2006 -0700
@@ -380,7 +380,7 @@
(save-excursion
(while hg-prev-buffer
(set-buffer hg-prev-buffer))
- (let ((path (or default (buffer-file-name))))
+ (let ((path (or default (buffer-file-name) default-directory)))
(if (or (not path) current-prefix-arg)
(expand-file-name
(eval (list* 'read-file-name
@@ -712,7 +712,8 @@
(let ((pos (point)))
(insert (documentation 'hg-mode))
(goto-char pos)
- (kill-line))))
+ (end-of-line 1)
+ (delete-region pos (point)))))
(defun hg-add (path)
"Add PATH to the Mercurial repository on the next commit.
@@ -976,8 +977,8 @@
(defun hg-log-mode ()
"Mode for viewing a Mercurial change log."
(goto-char (point-min))
- (when (looking-at "^searching for changes")
- (kill-entire-line))
+ (when (looking-at "^searching for changes.*$")
+ (delete-region (match-beginning 0) (match-end 0)))
(run-hooks 'hg-log-mode-hook))
(defun hg-log (path &optional rev1 rev2 log-limit)
@@ -1102,7 +1103,11 @@
(interactive (list (hg-read-file-name)))
(if (or path (not hg-root))
(let ((root (do ((prev nil dir)
- (dir (file-name-directory (or path buffer-file-name ""))
+ (dir (file-name-directory
+ (or
+ path
+ buffer-file-name
+ (expand-file-name default-directory)))
(file-name-directory (directory-file-name dir))))
((equal prev dir))
(when (file-directory-p (concat dir ".hg"))