# HG changeset patch # User FUJIWARA Katsunori # Date 1148017389 25200 # Node ID c4a2d8502cc09cbceb36a8639473642238302b3f # Parent e9b5749e4de3d08747471aaf894b755f28cf0313 Emacs: adapt read-file-name invocation for (non-X)Emacs 21.4. this patch deters hg-read-file-name from passing hg-file-history to read-file-name as 6th parameter in non-X Emacs environment. diff -r e9b5749e4de3 -r c4a2d8502cc0 contrib/mercurial.el --- a/contrib/mercurial.el Thu May 18 22:35:41 2006 -0700 +++ b/contrib/mercurial.el Thu May 18 22:43:09 2006 -0700 @@ -382,14 +382,17 @@ (set-buffer hg-prev-buffer)) (let ((path (or default (buffer-file-name)))) (if (or (not path) current-prefix-arg) - (expand-file-name - (read-file-name (format "File, directory or pattern%s: " - (or prompt "")) - (and path (file-name-directory path)) - nil nil - (and path (file-name-nondirectory path)) - 'hg-file-history)) - path)))) + (expand-file-name + (eval (list* 'read-file-name + (format "File, directory or pattern%s: " + (or prompt "")) + (and path (file-name-directory path)) + nil nil + (and path (file-name-nondirectory path)) + (if hg-running-xemacs + (cons (quote 'hg-file-history) nil) + nil)))) + path)))) (defun hg-read-config () "Return an alist of (key . value) pairs of Mercurial config data.