aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2007-07-30 00:19:06 +0000
committerDan Nicolaescu2007-07-30 00:19:06 +0000
commiteff23ff37606569028a6ef96ba2481df6b061ec4 (patch)
treed5acc8e64e1e122a74c8bf3cfad654b70217dbd4
parent463dca7e44715219fe720858d2144d54ea315635 (diff)
downloademacs-eff23ff37606569028a6ef96ba2481df6b061ec4.tar.gz
emacs-eff23ff37606569028a6ef96ba2481df6b061ec4.zip
* vc-git.el: (vc-directory-exclusion-list, vc-handled-backends):
Remove. (vc-git-revision-completion-table): Enable. * vc-hooks.el (vc-handled-backends): Add GIT and HG. * vc.el (vc-directory-exclusion-list): Add .git and .hg. * vc-hg.el (vc-hg-revision-completion-table): Re-enable. * diff-mode.el (diff-mode-menu): New entries. * diff-mode.el (diff-beginning-of-file-and-junk): New function. (diff-file-kill): Use it. (diff-beginning-of-hunk): Add arg `try-harder' using it. (diff-restrict-view, diff-find-source-location, diff-refine-hunk): Use it so they find the hunk even when we're in the file header. * vc.el: Add new VC operation `revision-completion-table'. (vc-default-revision-completion-table): New function. (vc-version-diff, vc-version-other-window): Use it to provide completion of revision names if the backend provides it. * vc-arch.el (vc-arch--version-completion-table) (vc-arch-revision-completion-table): New functions to provide completion of revision names. * vc-cvs.el: Require CL. (vc-cvs-revision-table, vc-cvs-revision-completion-table): New functions to provide completion of revision names. * eval.c (init_eval_once): Bump max_lisp_eval_depth to 400. * vc2-xtra.texi (Customizing VC): Add GIT and HG.
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/ChangeLog35
-rw-r--r--lisp/diff-mode.el65
-rw-r--r--lisp/vc-arch.el25
-rw-r--r--lisp/vc-cvs.el30
-rw-r--r--lisp/vc-git.el21
-rw-r--r--lisp/vc-hg.el12
-rw-r--r--lisp/vc-hooks.el7
-rw-r--r--lisp/vc.el60
-rw-r--r--man/ChangeLog4
-rw-r--r--man/vc2-xtra.texi6
-rw-r--r--src/ChangeLog4
-rw-r--r--src/eval.c2
13 files changed, 211 insertions, 62 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 45d4819f10e..eff08166324 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -63,6 +63,8 @@ in to make it use the scrollbars from the system theme.
63 63
64** VC 64** VC
65 65
66*** VC backends can provide completion of revision names.
67
66*** VC has some support for Mercurial (hg). 68*** VC has some support for Mercurial (hg).
67 69
68*** VC has some support for Git. 70*** VC has some support for Git.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6a74584fbd4..dfa662b791c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,38 @@
12007-07-30 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * vc-git.el: (vc-directory-exclusion-list, vc-handled-backends):
4 Remove.
5 (vc-git-revision-completion-table): Enable.
6
7 * vc-hooks.el (vc-handled-backends): Add GIT and HG.
8
9 * vc.el (vc-directory-exclusion-list): Add .git and .hg.
10
11 * vc-hg.el (vc-hg-revision-completion-table): Re-enable.
12
13 * diff-mode.el (diff-mode-menu): New entries.
14
152007-06-30 Stefan Monnier <monnier@iro.umontreal.ca>
16
17 * diff-mode.el (diff-beginning-of-file-and-junk): New function.
18 (diff-file-kill): Use it.
19 (diff-beginning-of-hunk): Add arg `try-harder' using it.
20 (diff-restrict-view, diff-find-source-location, diff-refine-hunk):
21 Use it so they find the hunk even when we're in the file header.
22
23 * vc.el: Add new VC operation `revision-completion-table'.
24 (vc-default-revision-completion-table): New function.
25 (vc-version-diff, vc-version-other-window): Use it to provide
26 completion of revision names if the backend provides it.
27
28 * vc-arch.el (vc-arch--version-completion-table)
29 (vc-arch-revision-completion-table): New functions to provide
30 completion of revision names.
31
32 * vc-cvs.el: Require CL.
33 (vc-cvs-revision-table, vc-cvs-revision-completion-table):
34 New functions to provide completion of revision names.
35
12007-07-29 Kimit Yada <kimitto@gmail.com> (tiny change) 362007-07-29 Kimit Yada <kimitto@gmail.com> (tiny change)
2 37
3 * emacs-lisp/copyright.el (copyright-update-year, copyright-update) 38 * emacs-lisp/copyright.el (copyright-update-year, copyright-update)
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 3f96ba6e453..f2800f1c337 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -164,12 +164,23 @@ when editing big diffs)."
164 '("Diff" 164 '("Diff"
165 ["Jump to Source" diff-goto-source t] 165 ["Jump to Source" diff-goto-source t]
166 ["Apply hunk" diff-apply-hunk t] 166 ["Apply hunk" diff-apply-hunk t]
167 ["Test applying hunk" diff-test-hunk t]
167 ["Apply diff with Ediff" diff-ediff-patch t] 168 ["Apply diff with Ediff" diff-ediff-patch t]
168 ["-----" nil nil] 169 "-----"
169 ["Reverse direction" diff-reverse-direction t] 170 ["Reverse direction" diff-reverse-direction t]
170 ["Context -> Unified" diff-context->unified t] 171 ["Context -> Unified" diff-context->unified t]
171 ["Unified -> Context" diff-unified->context t] 172 ["Unified -> Context" diff-unified->context t]
172 ;;["Fixup Headers" diff-fixup-modifs (not buffer-read-only)] 173 ;;["Fixup Headers" diff-fixup-modifs (not buffer-read-only)]
174 "-----"
175 ["Split hunk" diff-split-hunk t]
176 ["Refine hunk" diff-refine-hunk t]
177 ["Kill current hunk" diff-hunk-kill t]
178 ["Kill current file's hunks" diff-file-kill t]
179 "-----"
180 ["Previous Hunk" diff-hunk-prev t]
181 ["Next Hunk" diff-hunk-next t]
182 ["Previous File" diff-file-prev t]
183 ["Next File" diff-file-next t]
173 )) 184 ))
174 185
175(defcustom diff-minor-mode-prefix "\C-c=" 186(defcustom diff-minor-mode-prefix "\C-c="
@@ -390,13 +401,20 @@ when editing big diffs)."
390 ;; The return value is used by easy-mmode-define-navigation. 401 ;; The return value is used by easy-mmode-define-navigation.
391 (goto-char (or end (point-max))))) 402 (goto-char (or end (point-max)))))
392 403
393(defun diff-beginning-of-hunk () 404(defun diff-beginning-of-hunk (&optional try-harder)
405 "Move back to beginning of hunk.
406If TRY-HARDER is non-nil, try to cater to the case where we're not in a hunk
407but in the file header instead, in which case move forward to the first hunk."
394 (beginning-of-line) 408 (beginning-of-line)
395 (unless (looking-at diff-hunk-header-re) 409 (unless (looking-at diff-hunk-header-re)
396 (forward-line 1) 410 (forward-line 1)
397 (condition-case () 411 (condition-case ()
398 (re-search-backward diff-hunk-header-re) 412 (re-search-backward diff-hunk-header-re)
399 (error (error "Can't find the beginning of the hunk"))))) 413 (error
414 (if (not try-harder)
415 (error "Can't find the beginning of the hunk")
416 (diff-beginning-of-file-and-junk)
417 (diff-hunk-next))))))
400 418
401(defun diff-beginning-of-file () 419(defun diff-beginning-of-file ()
402 (beginning-of-line) 420 (beginning-of-line)
@@ -425,7 +443,7 @@ when editing big diffs)."
425If the prefix ARG is given, restrict the view to the current file instead." 443If the prefix ARG is given, restrict the view to the current file instead."
426 (interactive "P") 444 (interactive "P")
427 (save-excursion 445 (save-excursion
428 (if arg (diff-beginning-of-file) (diff-beginning-of-hunk)) 446 (if arg (diff-beginning-of-file) (diff-beginning-of-hunk 'try-harder))
429 (narrow-to-region (point) 447 (narrow-to-region (point)
430 (progn (if arg (diff-end-of-file) (diff-end-of-hunk)) 448 (progn (if arg (diff-end-of-file) (diff-end-of-hunk))
431 (point))) 449 (point)))
@@ -453,18 +471,37 @@ If the prefix ARG is given, restrict the view to the current file instead."
453 (diff-end-of-hunk) 471 (diff-end-of-hunk)
454 (kill-region start (point))))) 472 (kill-region start (point)))))
455 473
474(defun diff-beginning-of-file-and-junk ()
475 "Go to the beginning of file-related diff-info.
476This is like `diff-beginning-of-file' except it tries to skip back over leading
477data such as \"Index: ...\" and such."
478 (let ((start (point))
479 (file (condition-case err (progn (diff-beginning-of-file) (point))
480 (error err)))
481 ;; prevhunk is one of the limits.
482 (prevhunk (save-excursion (ignore-errors (diff-hunk-prev) (point))))
483 err)
484 (when (consp file)
485 ;; Presumably, we started before the file header, in the leading junk.
486 (setq err file)
487 (diff-file-next)
488 (setq file (point)))
489 (let ((index (save-excursion
490 (re-search-backward "^Index: " prevhunk t))))
491 (when index (setq file index))
492 (if (<= file start)
493 (goto-char file)
494 ;; File starts *after* the starting point: we really weren't in
495 ;; a file diff but elsewhere.
496 (goto-char start)
497 (signal (car err) (cdr err))))))
498
456(defun diff-file-kill () 499(defun diff-file-kill ()
457 "Kill current file's hunks." 500 "Kill current file's hunks."
458 (interactive) 501 (interactive)
459 (diff-beginning-of-file) 502 (diff-beginning-of-file-and-junk)
460 (let* ((start (point)) 503 (let* ((start (point))
461 (prevhunk (save-excursion
462 (ignore-errors
463 (diff-hunk-prev) (point))))
464 (index (save-excursion
465 (re-search-backward "^Index: " prevhunk t)))
466 (inhibit-read-only t)) 504 (inhibit-read-only t))
467 (when index (setq start index))
468 (diff-end-of-file) 505 (diff-end-of-file)
469 (if (looking-at "^\n") (forward-char 1)) ;`tla' generates such diffs. 506 (if (looking-at "^\n") (forward-char 1)) ;`tla' generates such diffs.
470 (kill-region start (point)))) 507 (kill-region start (point))))
@@ -1289,7 +1326,8 @@ SRC and DST are the two variants of text as returned by `diff-hunk-text'.
1289SWITCHED is non-nil if the patch is already applied." 1326SWITCHED is non-nil if the patch is already applied."
1290 (save-excursion 1327 (save-excursion
1291 (let* ((other (diff-xor other-file diff-jump-to-old-file)) 1328 (let* ((other (diff-xor other-file diff-jump-to-old-file))
1292 (char-offset (- (point) (progn (diff-beginning-of-hunk) (point)))) 1329 (char-offset (- (point) (progn (diff-beginning-of-hunk 'try-harder)
1330 (point))))
1293 ;; Check that the hunk is well-formed. Otherwise diff-mode and 1331 ;; Check that the hunk is well-formed. Otherwise diff-mode and
1294 ;; the user may disagree on what constitutes the hunk 1332 ;; the user may disagree on what constitutes the hunk
1295 ;; (e.g. because an empty line truncates the hunk mid-course), 1333 ;; (e.g. because an empty line truncates the hunk mid-course),
@@ -1458,7 +1496,8 @@ For use in `add-log-current-defun-function'."
1458(defun diff-refine-hunk () 1496(defun diff-refine-hunk ()
1459 "Refine the current hunk by ignoring space differences." 1497 "Refine the current hunk by ignoring space differences."
1460 (interactive) 1498 (interactive)
1461 (let* ((char-offset (- (point) (progn (diff-beginning-of-hunk) (point)))) 1499 (let* ((char-offset (- (point) (progn (diff-beginning-of-hunk 'try-harder)
1500 (point))))
1462 (opts (case (char-after) (?@ "-bu") (?* "-bc") (t "-b"))) 1501 (opts (case (char-after) (?@ "-bu") (?* "-bc") (t "-b")))
1463 (line-nb (and (or (looking-at "[^0-9]+\\([0-9]+\\)") 1502 (line-nb (and (or (looking-at "[^0-9]+\\([0-9]+\\)")
1464 (error "Can't find line number")) 1503 (error "Can't find line number"))
diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el
index b0cdea9d31f..68a1b1b5f17 100644
--- a/lisp/vc-arch.el
+++ b/lisp/vc-arch.el
@@ -419,6 +419,31 @@ Return non-nil if FILE is unchanged."
419 419
420(defun vc-arch-init-version () nil) 420(defun vc-arch-init-version () nil)
421 421
422;;; Completion of versions and revisions.
423
424(defun vc-arch--version-completion-table (root string)
425 (delq nil
426 (mapcar
427 (lambda (d)
428 (when (string-match "/\\([^/]+\\)/\\([^/]+\\)\\'" d)
429 (concat (match-string 2 d) "/" (match-string 1 d))))
430 (let ((default-directory root))
431 (file-expand-wildcards
432 (concat "*/*/"
433 (if (string-match "/" string)
434 (concat (substring string (match-end 0))
435 "*/" (substring string 0 (match-beginning 0)))
436 (concat "*/" string))
437 "*"))))))
438
439(defun vc-arch-revision-completion-table (file)
440 (lexical-let ((file file))
441 (lambda (string pred action)
442 ;; FIXME: complete revision patches as well.
443 (let* ((root (expand-file-name "{arch}" (vc-arch-root file)))
444 (table (vc-arch--version-completion-table root string)))
445 (complete-with-action action table string pred)))))
446
422;;; Less obvious implementations. 447;;; Less obvious implementations.
423 448
424(defun vc-arch-find-version (file rev buffer) 449(defun vc-arch-find-version (file rev buffer)
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el
index 0c9615e6469..a0eb2609ade 100644
--- a/lisp/vc-cvs.el
+++ b/lisp/vc-cvs.el
@@ -29,8 +29,7 @@
29 29
30;;; Code: 30;;; Code:
31 31
32(eval-when-compile 32(eval-when-compile (require 'cl) (require 'vc))
33 (require 'vc))
34 33
35;;; 34;;;
36;;; Customization options 35;;; Customization options
@@ -960,6 +959,33 @@ is non-nil."
960 (vc-file-setprop file 'vc-checkout-time 0) 959 (vc-file-setprop file 'vc-checkout-time 0)
961 (if set-state (vc-file-setprop file 'vc-state 'edited))))))))) 960 (if set-state (vc-file-setprop file 'vc-state 'edited)))))))))
962 961
962;; Completion of revision names.
963;; Just so I don't feel like I'm duplicating code from pcl-cvs, I'll use
964;; `cvs log' so I can list all the revision numbers rather than only
965;; tag names.
966
967(defun vc-cvs-revision-table (file)
968 (let ((default-directory (file-name-directory file))
969 (res nil))
970 (with-temp-buffer
971 (vc-cvs-command t nil file "log")
972 (goto-char (point-min))
973 (when (re-search-forward "^symbolic names:\n" nil t)
974 (while (looking-at "^ \\(.*\\): \\(.*\\)")
975 (push (cons (match-string 1) (match-string 2)) res)
976 (forward-line 1)))
977 (while (re-search-forward "^revision \\([0-9.]+\\)" nil t)
978 (push (match-string 1) res))
979 res)))
980
981(defun vc-cvs-revision-completion-table (file)
982 (lexical-let ((file file)
983 table)
984 (setq table (lazy-completion-table
985 table (lambda () (vc-cvs-revision-table file))))
986 table))
987
988
963(provide 'vc-cvs) 989(provide 'vc-cvs)
964 990
965;;; arch-tag: 60e1402a-aa53-4607-927a-cf74f144b432 991;;; arch-tag: 60e1402a-aa53-4607-927a-cf74f144b432
diff --git a/lisp/vc-git.el b/lisp/vc-git.el
index c0cfc1e88cc..256be2c6f03 100644
--- a/lisp/vc-git.el
+++ b/lisp/vc-git.el
@@ -111,13 +111,6 @@
111 111
112(eval-when-compile (require 'cl) (require 'vc)) 112(eval-when-compile (require 'cl) (require 'vc))
113 113
114;; XXX when this backend is considered sufficiently reliable this
115;; should be moved to vc-hooks.el
116(add-to-list 'vc-handled-backends 'GIT)
117(eval-after-load "vc"
118 '(add-to-list 'vc-directory-exclusion-list ".git" t))
119
120
121(defvar git-commits-coding-system 'utf-8 114(defvar git-commits-coding-system 'utf-8
122 "Default coding system for git commits.") 115 "Default coding system for git commits.")
123 116
@@ -331,14 +324,12 @@
331 (push (match-string 2) table))) 324 (push (match-string 2) table)))
332 table)) 325 table))
333 326
334;; Commented out on the 22.x branch, VC here does not support it yet 327(defun vc-git-revision-completion-table (file)
335;; and when bytecompiling it max-specpdl-size is exceeded. 328 (lexical-let ((file file)
336;; (defun vc-git-revision-completion-table (file) 329 table)
337;; (lexical-let ((file file) 330 (setq table (lazy-completion-table
338;; table) 331 table (lambda () (vc-git-revision-table file))))
339;; (setq table (lazy-completion-table 332 table))
340;; table (lambda () (vc-git-revision-table file))))
341;; table))
342 333
343(defun vc-git-diff-tree (dir &optional rev1 rev2) 334(defun vc-git-diff-tree (dir &optional rev1 rev2)
344 (vc-git-diff dir rev1 rev2)) 335 (vc-git-diff dir rev1 rev2))
diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el
index ea32c4a33b6..972adeed675 100644
--- a/lisp/vc-hg.el
+++ b/lisp/vc-hg.el
@@ -292,12 +292,12 @@
292 (buffer-substring-no-properties (point-min) (point-max)))))) 292 (buffer-substring-no-properties (point-min) (point-max))))))
293 293
294;; Modelled after the similar function in vc-cvs.el 294;; Modelled after the similar function in vc-cvs.el
295;; (defun vc-hg-revision-completion-table (file) 295(defun vc-hg-revision-completion-table (file)
296;; (lexical-let ((file file) 296 (lexical-let ((file file)
297;; table) 297 table)
298;; (setq table (lazy-completion-table 298 (setq table (lazy-completion-table
299;; table (lambda () (vc-hg-revision-table file)))) 299 table (lambda () (vc-hg-revision-table file))))
300;; table)) 300 table))
301 301
302(defalias 'vc-hg-diff-tree 'vc-hg-diff) 302(defalias 'vc-hg-diff-tree 'vc-hg-diff)
303 303
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index a47637d37ee..5a0c5395b96 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -62,8 +62,9 @@ interpreted as hostnames."
62 :type 'regexp 62 :type 'regexp
63 :group 'vc) 63 :group 'vc)
64 64
65(defcustom vc-handled-backends '(RCS CVS SVN SCCS Arch MCVS) 65(defcustom vc-handled-backends '(RCS CVS SVN SCCS GIT HG Arch MCVS)
66 ;; Arch and MCVS come last because they are per-tree rather than per-dir. 66 ;; GIT, HG, Arch and MCVS come last because they are per-tree rather
67 ;; than per-dir.
67 "*List of version control backends for which VC will be used. 68 "*List of version control backends for which VC will be used.
68Entries in this list will be tried in order to determine whether a 69Entries in this list will be tried in order to determine whether a
69file is under that sort of version control. 70file is under that sort of version control.
@@ -71,7 +72,7 @@ Removing an entry from the list prevents VC from being activated
71when visiting a file managed by that backend. 72when visiting a file managed by that backend.
72An empty list disables VC altogether." 73An empty list disables VC altogether."
73 :type '(repeat symbol) 74 :type '(repeat symbol)
74 :version "21.1" 75 :version "22.2"
75 :group 'vc) 76 :group 'vc)
76 77
77(defcustom vc-path 78(defcustom vc-path
diff --git a/lisp/vc.el b/lisp/vc.el
index c3c03131caa..835d2c50685 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -327,6 +327,11 @@
327;; of either 0 (no differences found), or 1 (either non-empty diff 327;; of either 0 (no differences found), or 1 (either non-empty diff
328;; or the diff is run asynchronously). 328;; or the diff is run asynchronously).
329;; 329;;
330;; - revision-completion-table (file)
331;;
332;; Return a completion table for existing revisions of FILE.
333;; The default is to not use any completion table.
334;;
330;; - diff-tree (dir &optional rev1 rev2) 335;; - diff-tree (dir &optional rev1 rev2)
331;; 336;;
332;; Insert the diff for all files at and below DIR into the *vc-diff* 337;; Insert the diff for all files at and below DIR into the *vc-diff*
@@ -559,7 +564,8 @@ These are passed to the checkin program by \\[vc-register]."
559 :group 'vc 564 :group 'vc
560 :version "20.3") 565 :version "20.3")
561 566
562(defcustom vc-directory-exclusion-list '("SCCS" "RCS" "CVS" "MCVS" ".svn" "{arch}") 567(defcustom vc-directory-exclusion-list '("SCCS" "RCS" "CVS" "MCVS" ".svn"
568 ".git" ".hg" "{arch}")
563 "List of directory names to be ignored when walking directory trees." 569 "List of directory names to be ignored when walking directory trees."
564 :type '(repeat string) 570 :type '(repeat string)
565 :group 'vc) 571 :group 'vc)
@@ -1752,6 +1758,8 @@ saving the buffer."
1752 (message "No changes to %s since latest version" file) 1758 (message "No changes to %s since latest version" file)
1753 (vc-version-diff file nil nil))))) 1759 (vc-version-diff file nil nil)))))
1754 1760
1761(defun vc-default-revision-completion-table (backend file) nil)
1762
1755(defun vc-version-diff (file rev1 rev2) 1763(defun vc-version-diff (file rev1 rev2)
1756 "List the differences between FILE's versions REV1 and REV2. 1764 "List the differences between FILE's versions REV1 and REV2.
1757If REV1 is empty or nil it means to use the current workfile version; 1765If REV1 is empty or nil it means to use the current workfile version;
@@ -1759,12 +1767,13 @@ REV2 empty or nil means the current file contents. FILE may also be
1759a directory, in that case, generate diffs between the correponding 1767a directory, in that case, generate diffs between the correponding
1760versions of all registered files in or below it." 1768versions of all registered files in or below it."
1761 (interactive 1769 (interactive
1762 (let ((file (expand-file-name 1770 (let* ((file (expand-file-name
1763 (read-file-name (if buffer-file-name 1771 (read-file-name (if buffer-file-name
1764 "File or dir to diff (default visited file): " 1772 "File or dir to diff (default visited file): "
1765 "File or dir to diff: ") 1773 "File or dir to diff: ")
1766 default-directory buffer-file-name t))) 1774 default-directory buffer-file-name t)))
1767 (rev1-default nil) (rev2-default nil)) 1775 (rev1-default nil) (rev2-default nil)
1776 (completion-table (vc-call revision-completion-table file)))
1768 ;; compute default versions based on the file state 1777 ;; compute default versions based on the file state
1769 (cond 1778 (cond
1770 ;; if it's a directory, don't supply any version default 1779 ;; if it's a directory, don't supply any version default
@@ -1780,17 +1789,21 @@ versions of all registered files in or below it."
1780 (if (string= rev1-default "") (setq rev1-default nil)) 1789 (if (string= rev1-default "") (setq rev1-default nil))
1781 (setq rev2-default (vc-workfile-version file)))) 1790 (setq rev2-default (vc-workfile-version file))))
1782 ;; construct argument list 1791 ;; construct argument list
1783 (list file 1792 (let* ((rev1-prompt (if rev1-default
1784 (read-string (if rev1-default 1793 (concat "Older version (default "
1785 (concat "Older version (default " 1794 rev1-default "): ")
1786 rev1-default "): ") 1795 "Older version: "))
1787 "Older version: ") 1796 (rev2-prompt (concat "Newer version (default "
1788 nil nil rev1-default) 1797 (or rev2-default "current source") "): "))
1789 (read-string (if rev2-default 1798 (rev1 (if completion-table
1790 (concat "Newer version (default " 1799 (completing-read rev1-prompt completion-table
1791 rev2-default "): ") 1800 nil nil nil nil rev1-default)
1792 "Newer version (default current source): ") 1801 (read-string rev1-prompt nil nil rev1-default)))
1793 nil nil rev2-default)))) 1802 (rev2 (if completion-table
1803 (completing-read rev2-prompt completion-table
1804 nil nil nil nil rev2-default)
1805 (read-string rev2-prompt nil nil rev2-default))))
1806 (list file rev1 rev2))))
1794 (if (file-directory-p file) 1807 (if (file-directory-p file)
1795 ;; recursive directory diff 1808 ;; recursive directory diff
1796 (progn 1809 (progn
@@ -1945,7 +1958,16 @@ The meaning of REV1 and REV2 is the same as for `vc-version-diff'."
1945 "Visit version REV of the current file in another window. 1958 "Visit version REV of the current file in another window.
1946If the current file is named `F', the version is named `F.~REV~'. 1959If the current file is named `F', the version is named `F.~REV~'.
1947If `F.~REV~' already exists, use it instead of checking it out again." 1960If `F.~REV~' already exists, use it instead of checking it out again."
1948 (interactive "sVersion to visit (default is workfile version): ") 1961 (interactive
1962 (save-current-buffer
1963 (vc-ensure-vc-buffer)
1964 (let ((completion-table
1965 (vc-call revision-completion-table buffer-file-name))
1966 (prompt "Version to visit (default is workfile version): "))
1967 (list
1968 (if completion-table
1969 (completing-read prompt completion-table)
1970 (read-string prompt))))))
1949 (vc-ensure-vc-buffer) 1971 (vc-ensure-vc-buffer)
1950 (let* ((file buffer-file-name) 1972 (let* ((file buffer-file-name)
1951 (version (if (string-equal rev "") 1973 (version (if (string-equal rev "")
diff --git a/man/ChangeLog b/man/ChangeLog
index c12acbc89ee..904dfb3ed33 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,7 @@
12007-07-30 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * vc2-xtra.texi (Customizing VC): Add GIT and HG.
4
12007-07-28 Nick Roberts <nickrob@snap.net.nz> 52007-07-28 Nick Roberts <nickrob@snap.net.nz>
2 6
3 * building.texi (GDB Graphical Interface): Qualify use of "M-x gdba". 7 * building.texi (GDB Graphical Interface): Qualify use of "M-x gdba".
diff --git a/man/vc2-xtra.texi b/man/vc2-xtra.texi
index 11c8ea1fb96..5a8d131705a 100644
--- a/man/vc2-xtra.texi
+++ b/man/vc2-xtra.texi
@@ -588,9 +588,9 @@ headers.
588@subsection Customizing VC 588@subsection Customizing VC
589 589
590@vindex vc-handled-backends 590@vindex vc-handled-backends
591The variable @code{vc-handled-backends} determines which version 591The variable @code{vc-handled-backends} determines which version control
592control systems VC should handle. The default value is @code{(RCS CVS 592systems VC should handle. The default value is @code{(RCS CVS SVN SCCS
593SVN SCCS Arch MCVS)}, so it contains all six version systems that are 593GIT HG Arch MCVS)}, so it contains all six version systems that are
594currently supported. If you want VC to ignore one or more of these 594currently supported. If you want VC to ignore one or more of these
595systems, exclude its name from the list. To disable VC entirely, set 595systems, exclude its name from the list. To disable VC entirely, set
596this variable to @code{nil}. 596this variable to @code{nil}.
diff --git a/src/ChangeLog b/src/ChangeLog
index 419f39e034f..835379d9cde 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12007-07-30 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * eval.c (init_eval_once): Bump max_lisp_eval_depth to 400.
4
12007-07-25 Glenn Morris <rgm@gnu.org> 52007-07-25 Glenn Morris <rgm@gnu.org>
2 6
3 * Relicense all FSF files to GPLv3 or later. 7 * Relicense all FSF files to GPLv3 or later.
diff --git a/src/eval.c b/src/eval.c
index 0993767b9e3..60e3c77a3a3 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -221,7 +221,7 @@ init_eval_once ()
221 specpdl_ptr = specpdl; 221 specpdl_ptr = specpdl;
222 /* Don't forget to update docs (lispref node "Local Variables"). */ 222 /* Don't forget to update docs (lispref node "Local Variables"). */
223 max_specpdl_size = 1000; 223 max_specpdl_size = 1000;
224 max_lisp_eval_depth = 300; 224 max_lisp_eval_depth = 400;
225 225
226 Vrun_hooks = Qnil; 226 Vrun_hooks = Qnil;
227} 227}