comparison contrib/mercurial.el @ 2315:c4a2d8502cc0

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.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Thu, 18 May 2006 22:43:09 -0700
parents 68e84563c540
children 6d0a9de9a8ac
comparison
equal deleted inserted replaced
2314:e9b5749e4de3 2315:c4a2d8502cc0
380 (save-excursion 380 (save-excursion
381 (while hg-prev-buffer 381 (while hg-prev-buffer
382 (set-buffer hg-prev-buffer)) 382 (set-buffer hg-prev-buffer))
383 (let ((path (or default (buffer-file-name)))) 383 (let ((path (or default (buffer-file-name))))
384 (if (or (not path) current-prefix-arg) 384 (if (or (not path) current-prefix-arg)
385 (expand-file-name 385 (expand-file-name
386 (read-file-name (format "File, directory or pattern%s: " 386 (eval (list* 'read-file-name
387 (or prompt "")) 387 (format "File, directory or pattern%s: "
388 (and path (file-name-directory path)) 388 (or prompt ""))
389 nil nil 389 (and path (file-name-directory path))
390 (and path (file-name-nondirectory path)) 390 nil nil
391 'hg-file-history)) 391 (and path (file-name-nondirectory path))
392 path)))) 392 (if hg-running-xemacs
393 (cons (quote 'hg-file-history) nil)
394 nil))))
395 path))))
393 396
394 (defun hg-read-config () 397 (defun hg-read-config ()
395 "Return an alist of (key . value) pairs of Mercurial config data. 398 "Return an alist of (key . value) pairs of Mercurial config data.
396 Each key is of the form (section . name)." 399 Each key is of the form (section . name)."
397 (let (items) 400 (let (items)