aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJoakim Verona2013-05-28 23:39:22 +0200
committerJoakim Verona2013-05-28 23:39:22 +0200
commit4c71f9d37642209c3636b173b364ece36c38b57b (patch)
tree3a7913a3f989f90d877d2c1536e11723eeff4400 /lisp
parent5cf62a1639c5993c1fd6b532f92325b28a13ee79 (diff)
parent336d7284648810ce48a88d22515809f84415b5c1 (diff)
downloademacs-4c71f9d37642209c3636b173b364ece36c38b57b.tar.gz
emacs-4c71f9d37642209c3636b173b364ece36c38b57b.zip
upstream
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog117
-rw-r--r--lisp/dired-aux.el36
-rw-r--r--lisp/dired.el2
-rw-r--r--lisp/emacs-lisp/bytecomp.el5
-rw-r--r--lisp/eshell/em-unix.el4
-rw-r--r--lisp/info.el10
-rw-r--r--lisp/isearch.el52
-rw-r--r--lisp/net/dbus.el2
-rw-r--r--lisp/obsolete/fast-lock.el4
-rw-r--r--lisp/obsolete/vc-mcvs.el8
-rw-r--r--lisp/play/dunnet.el11
-rw-r--r--lisp/progmodes/cc-mode.el2
-rw-r--r--lisp/progmodes/cc-vars.el36
-rw-r--r--lisp/replace.el200
-rw-r--r--lisp/vc/vc-arch.el5
-rw-r--r--lisp/vc/vc-bzr.el22
-rw-r--r--lisp/vc/vc-cvs.el13
-rw-r--r--lisp/vc/vc-dir.el2
-rw-r--r--lisp/vc/vc-git.el62
-rw-r--r--lisp/vc/vc-hg.el12
-rw-r--r--lisp/vc/vc-mtn.el5
-rw-r--r--lisp/vc/vc-rcs.el11
-rw-r--r--lisp/vc/vc-sccs.el12
-rw-r--r--lisp/vc/vc-svn.el7
-rw-r--r--lisp/wdired.el8
25 files changed, 465 insertions, 183 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 509c940a8f4..9f9302680be 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,120 @@
12013-05-28 Alan Mackenzie <acm@muc.de>
2
3 Handle "capitalised keywords" correctly.
4 * progmodes/cc-mode.el (c-after-change): bind case-fold-search to
5 nil.
6
72013-05-28 Aidan Gauland <aidalgol@amuri.net>
8
9 * eshell/em-unix.el: Added -r option to cp
10
112013-05-28 Glenn Morris <rgm@gnu.org>
12
13 * vc/vc-arch.el (vc-exec-after): Declare.
14 (vc-switches): Autoload.
15 * vc/vc-bzr.el: No need to require vc when compiling.
16 (vc-exec-after, vc-set-async-update, vc-default-dir-printer)
17 (vc-resynch-buffer, vc-dir-refresh): Declare.
18 (vc-setup-buffer, vc-switches): Autoload.
19 * vc/vc-cvs.el (vc-exec-after, vc-coding-system-for-diff)
20 (vc-resynch-buffer): Declare.
21 (vc-switches, vc-default-revert, vc-version-backup-file): Autoload.
22 * vc/vc-dir.el (desktop-missing-file-warning): Declare.
23 * vc/vc-git.el (vc-exec-after, vc-set-async-update)
24 (grep-read-regexp, grep-read-files, grep-expand-template)
25 (vc-dir-refresh): Declare.
26 (vc-setup-buffer, vc-switches, vc-resynch-buffer): Autoload.
27 * vc/vc-hg.el (vc-exec-after, vc-set-async-update): Declare.
28 (vc-setup-buffer, vc-switches, vc-do-async-command): Autoload.
29 * vc/vc-mtn.el (vc-exec-after): Declare.
30 (vc-switches): Autoload.
31 * vc/vc-rcs.el (vc-expand-dirs, vc-switches)
32 (vc-tag-precondition, vc-buffer-sync, vc-rename-master): Autoload.
33 (vc-file-tree-walk): Declare.
34 * vc/vc-sccs.el (vc-file-tree-walk): Declare.
35 (vc-expand-dirs, vc-switches, vc-setup-buffer, vc-delistify)
36 (vc-tag-precondition, vc-rename-master): Autoload.
37 * vc/vc-svn.el (vc-exec-after): Declare.
38 (vc-switches, vc-setup-buffer): Autoload.
39 * obsolete/vc-mcvs.el (vc-checkout, vc-switches, vc-default-revert):
40 Autoload.
41 (vc-resynch-buffer): Declare.
42
43 * obsolete/fast-lock.el (byte-compile-warnings):
44 Don't warn about obsolete features in this obsolete file.
45
46 * progmodes/cc-vars.el (c-macro-names-with-semicolon):
47 Move definition before use.
48
49 * play/dunnet.el (byte-compile-warnings): Don't disable them all.
50 (dun-unix-verbs): Remove dun-zippy.
51 (dun-zippy): Remove function.
52
53 * emacs-lisp/bytecomp.el (byte-compile-warnings): Doc fix.
54
552013-05-27 Juri Linkov <juri@jurta.org>
56
57 * replace.el (replace-search): New function with code moved out
58 from `perform-replace'.
59 (replace-highlight, replace-dehighlight): Move function definitions
60 up closer to `replace-search'. (Bug#11746)
61
622013-05-27 Juri Linkov <juri@jurta.org>
63
64 * replace.el (perform-replace): Ignore invisible matches.
65 In addition to checking `query-replace-skip-read-only', also
66 filter out matches by calling `run-hook-with-args-until-failure'
67 on `isearch-filter-predicates', and also check `search-invisible'
68 for t or call `isearch-range-invisible'.
69 (replace-dehighlight): Call `isearch-clean-overlays'. (Bug#11746)
70
712013-05-27 Juri Linkov <juri@jurta.org>
72
73 * isearch.el (isearch-filter-predicates): Rename from
74 `isearch-filter-predicate'. Doc fix. (Bug#11378)
75 (isearch-message-prefix): Display text from the property
76 `isearch-message-prefix' of the currently active filters.
77 (isearch-search): Don't compare `isearch-filter-predicate' with
78 `isearch-filter-visible'. Call `run-hook-with-args-until-failure'
79 on `isearch-filter-predicates'. Also check `search-invisible' for t
80 or call `isearch-range-invisible'.
81 (isearch-filter-visible): Make obsolete.
82 (isearch-lazy-highlight-search):
83 Call `run-hook-with-args-until-failure' on
84 `isearch-filter-predicates' and use `isearch-range-invisible'.
85
86 * info.el (Info-search): Call `run-hook-with-args-until-failure' on
87 `isearch-filter-predicates' instead of `funcall'ing
88 `isearch-filter-predicate'.
89 (Info-mode): Set `Info-isearch-filter' to
90 `isearch-filter-predicates' instead of `isearch-filter-predicate'.
91
92 * dired-aux.el (dired-isearch-filter-predicate-orig):
93 Remove variable.
94 (dired-isearch-filenames-toggle, dired-isearch-filenames-setup)
95 (dired-isearch-filenames-end): Add and remove
96 `dired-isearch-filter-filenames' in `isearch-filter-predicates'
97 instead of changing the value of `isearch-filter-predicate'.
98 Rebind `dired-isearch-filenames-toggle' from "\M-sf" to "\M-sff".
99 (dired-isearch-filter-filenames): Don't use `isearch-filter-visible'.
100 Put property `isearch-message-prefix' to "filename " on
101 `dired-isearch-filter-filenames'.
102
103 * wdired.el (wdired-change-to-wdired-mode):
104 Add `isearch-filter-predicates' to `wdired-isearch-filter-read-only'
105 locally instead of changing `isearch-filter-predicate'.
106 (wdired-isearch-filter-read-only): Don't use `isearch-filter-visible'.
107
1082013-05-27 Dmitry Gutov <dgutov@yandex.ru>
109
110 * vc/vc-git.el (vc-git-working-revision): When in detached mode,
111 return the commit hash (Bug#14459). Also set the
112 `vc-git-detached' property.
113 (vc-git--rev-parse): Extract from `vc-git-previous-revision'.
114 (vc-git-mode-line-string): Use the same help-echo format whether
115 in detached mode or not, because we know the actual revision now.
116 When in detached mode, shorten the revision to 7 chars.
117
12013-05-27 Stefan Monnier <monnier@iro.umontreal.ca> 1182013-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
2 119
3 * emacs-lisp/easy-mmode.el (define-minor-mode): 120 * emacs-lisp/easy-mmode.el (define-minor-mode):
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index f6ff32b0b01..7cb63f6b012 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -2491,18 +2491,16 @@ a file name. Otherwise, it searches the whole buffer without restrictions."
2491 :group 'dired 2491 :group 'dired
2492 :version "23.1") 2492 :version "23.1")
2493 2493
2494(defvar dired-isearch-filter-predicate-orig nil)
2495
2496(defun dired-isearch-filenames-toggle () 2494(defun dired-isearch-filenames-toggle ()
2497 "Toggle file names searching on or off. 2495 "Toggle file names searching on or off.
2498When on, Isearch skips matches outside file names using the predicate 2496When on, Isearch skips matches outside file names using the predicate
2499`dired-isearch-filter-filenames' that matches only at file names. 2497`dired-isearch-filter-filenames' that matches only at file names.
2500When off, it uses the original predicate." 2498When off, it uses the original predicate."
2501 (interactive) 2499 (interactive)
2502 (setq isearch-filter-predicate 2500 (setq isearch-filter-predicates
2503 (if (eq isearch-filter-predicate 'dired-isearch-filter-filenames) 2501 (if (memq 'dired-isearch-filter-filenames isearch-filter-predicates)
2504 dired-isearch-filter-predicate-orig 2502 (delq 'dired-isearch-filter-filenames isearch-filter-predicates)
2505 'dired-isearch-filter-filenames)) 2503 (cons 'dired-isearch-filter-filenames isearch-filter-predicates)))
2506 (setq isearch-success t isearch-adjusted t) 2504 (setq isearch-success t isearch-adjusted t)
2507 (isearch-update)) 2505 (isearch-update))
2508 2506
@@ -2513,29 +2511,27 @@ Intended to be added to `isearch-mode-hook'."
2513 (when (or (eq dired-isearch-filenames t) 2511 (when (or (eq dired-isearch-filenames t)
2514 (and (eq dired-isearch-filenames 'dwim) 2512 (and (eq dired-isearch-filenames 'dwim)
2515 (get-text-property (point) 'dired-filename))) 2513 (get-text-property (point) 'dired-filename)))
2516 (setq isearch-message-prefix-add "filename ") 2514 (define-key isearch-mode-map "\M-sff" 'dired-isearch-filenames-toggle)
2517 (define-key isearch-mode-map "\M-sf" 'dired-isearch-filenames-toggle) 2515 (add-hook 'isearch-filter-predicates 'dired-isearch-filter-filenames nil t)
2518 (setq dired-isearch-filter-predicate-orig
2519 (default-value 'isearch-filter-predicate))
2520 (setq-default isearch-filter-predicate 'dired-isearch-filter-filenames)
2521 (add-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end nil t))) 2516 (add-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end nil t)))
2522 2517
2523(defun dired-isearch-filenames-end () 2518(defun dired-isearch-filenames-end ()
2524 "Clean up the Dired file name search after terminating isearch." 2519 "Clean up the Dired file name search after terminating isearch."
2525 (setq isearch-message-prefix-add nil) 2520 (setq isearch-message-prefix-add nil)
2526 (define-key isearch-mode-map "\M-sf" nil) 2521 (define-key isearch-mode-map "\M-sff" nil)
2527 (setq-default isearch-filter-predicate dired-isearch-filter-predicate-orig) 2522 (remove-hook 'isearch-filter-predicates 'dired-isearch-filter-filenames t)
2528 (remove-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end t)) 2523 (remove-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end t))
2529 2524
2530(defun dired-isearch-filter-filenames (beg end) 2525(defun dired-isearch-filter-filenames (beg end)
2531 "Test whether the current search hit is a visible file name. 2526 "Test whether the current search hit is a file name.
2532Return non-nil if the text from BEG to END is part of a file 2527Return non-nil if the text from BEG to END is part of a file
2533name (has the text property `dired-filename') and is visible." 2528name (has the text property `dired-filename')."
2534 (and (isearch-filter-visible beg end) 2529 (if dired-isearch-filenames
2535 (if dired-isearch-filenames 2530 (text-property-not-all (min beg end) (max beg end)
2536 (text-property-not-all (min beg end) (max beg end) 2531 'dired-filename nil)
2537 'dired-filename nil) 2532 t))
2538 t))) 2533
2534(put 'dired-isearch-filter-filenames 'isearch-message-prefix "filename ")
2539 2535
2540;;;###autoload 2536;;;###autoload
2541(defun dired-isearch-filenames () 2537(defun dired-isearch-filenames ()
diff --git a/lisp/dired.el b/lisp/dired.el
index f03e0aca475..5b6a78759db 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3864,7 +3864,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
3864;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command 3864;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
3865;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown 3865;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
3866;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff 3866;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
3867;;;;;; dired-diff) "dired-aux" "dired-aux.el" "d6a694b6d13fa948465fde52a9ffb3ba") 3867;;;;;; dired-diff) "dired-aux" "dired-aux.el" "8f5af3aa4eee1b3448525896fa6f39a3")
3868;;; Generated autoloads from dired-aux.el 3868;;; Generated autoloads from dired-aux.el
3869 3869
3870(autoload 'dired-diff "dired-aux" "\ 3870(autoload 'dired-diff "dired-aux" "\
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 5e20bba2ddb..c910acdbc14 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -289,10 +289,11 @@ Elements of the list may be:
289 obsolete obsolete variables and functions. 289 obsolete obsolete variables and functions.
290 noruntime functions that may not be defined at runtime (typically 290 noruntime functions that may not be defined at runtime (typically
291 defined only under `eval-when-compile'). 291 defined only under `eval-when-compile').
292 cl-functions calls to runtime functions from the CL package (as 292 cl-functions calls to runtime functions (as distinguished from macros and
293 distinguished from macros and aliases). 293 aliases) from the old CL package (not the newer cl-lib).
294 interactive-only 294 interactive-only
295 commands that normally shouldn't be called from Lisp code. 295 commands that normally shouldn't be called from Lisp code.
296 lexical global/dynamic variables lacking a prefix.
296 make-local calls to make-variable-buffer-local that may be incorrect. 297 make-local calls to make-variable-buffer-local that may be incorrect.
297 mapcar mapcar called for effect. 298 mapcar mapcar called for effect.
298 constants let-binding of, or assignment to, constants/nonvariables. 299 constants let-binding of, or assignment to, constants/nonvariables.
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 60caf38710a..af54d875cb0 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -532,8 +532,10 @@ Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
532 "don't change anything on disk") 532 "don't change anything on disk")
533 (?p "preserve" nil preserve 533 (?p "preserve" nil preserve
534 "preserve file attributes if possible") 534 "preserve file attributes if possible")
535 (?R "recursive" nil em-recursive 535 (?r "recursive" nil em-recursive
536 "copy directories recursively") 536 "copy directories recursively")
537 (?R nil nil em-recursive
538 "as for -r")
537 (?v "verbose" nil em-verbose 539 (?v "verbose" nil em-verbose
538 "explain what is being done") 540 "explain what is being done")
539 (nil "help" nil nil "show this usage screen") 541 (nil "help" nil nil "show this usage screen")
diff --git a/lisp/info.el b/lisp/info.el
index b4673731383..9dc312fc697 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1931,7 +1931,8 @@ If DIRECTION is `backward', search in the reverse direction."
1931 (point-max))) 1931 (point-max)))
1932 (while (and (not give-up) 1932 (while (and (not give-up)
1933 (or (null found) 1933 (or (null found)
1934 (not (funcall isearch-filter-predicate beg-found found)))) 1934 (not (run-hook-with-args-until-failure
1935 'isearch-filter-predicates beg-found found))))
1935 (let ((search-spaces-regexp Info-search-whitespace-regexp)) 1936 (let ((search-spaces-regexp Info-search-whitespace-regexp))
1936 (if (if backward 1937 (if (if backward
1937 (re-search-backward regexp bound t) 1938 (re-search-backward regexp bound t)
@@ -2009,7 +2010,8 @@ If DIRECTION is `backward', search in the reverse direction."
2009 (setq give-up nil found nil) 2010 (setq give-up nil found nil)
2010 (while (and (not give-up) 2011 (while (and (not give-up)
2011 (or (null found) 2012 (or (null found)
2012 (not (funcall isearch-filter-predicate beg-found found)))) 2013 (not (run-hook-with-args-until-failure
2014 'isearch-filter-predicates beg-found found))))
2013 (let ((search-spaces-regexp Info-search-whitespace-regexp)) 2015 (let ((search-spaces-regexp Info-search-whitespace-regexp))
2014 (if (if backward 2016 (if (if backward
2015 (re-search-backward regexp nil t) 2017 (re-search-backward regexp nil t)
@@ -4275,8 +4277,8 @@ Advanced commands:
4275 'Info-isearch-wrap) 4277 'Info-isearch-wrap)
4276 (set (make-local-variable 'isearch-push-state-function) 4278 (set (make-local-variable 'isearch-push-state-function)
4277 'Info-isearch-push-state) 4279 'Info-isearch-push-state)
4278 (set (make-local-variable 'isearch-filter-predicate) 4280 (set (make-local-variable 'isearch-filter-predicates)
4279 'Info-isearch-filter) 4281 '(Info-isearch-filter))
4280 (set (make-local-variable 'revert-buffer-function) 4282 (set (make-local-variable 'revert-buffer-function)
4281 'Info-revert-buffer-function) 4283 'Info-revert-buffer-function)
4282 (Info-set-mode-line) 4284 (Info-set-mode-line)
diff --git a/lisp/isearch.el b/lisp/isearch.el
index fe73bf7d6a4..5bf2818fadc 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -187,12 +187,21 @@ or to the end of the buffer for a backward search.")
187 "Function to save a function restoring the mode-specific Isearch state 187 "Function to save a function restoring the mode-specific Isearch state
188to the search status stack.") 188to the search status stack.")
189 189
190(defvar isearch-filter-predicate 'isearch-filter-visible 190(defvar isearch-filter-predicates nil
191 "Predicate that filters the search hits that would normally be available. 191 "Predicates that filter the search hits that would normally be available.
192Search hits that dissatisfy the predicate are skipped. The function 192Search hits that dissatisfy the list of predicates are skipped.
193has two arguments: the positions of start and end of text matched by 193Each function in this list has two arguments: the positions of
194the search. If this function returns nil, continue searching without 194start and end of text matched by the search.
195stopping at this match.") 195The search loop uses `run-hook-with-args-until-failure' to call
196each predicate in order, and when one of the predicates returns nil,
197skips this match and continues searching for the next match.
198When the list of predicates is empty, `run-hook-with-args-until-failure'
199returns non-nil that means that the found match is accepted.
200The property `isearch-message-prefix' put on the predicate's symbol
201specifies the prefix string displyed in the search message.")
202(define-obsolete-variable-alias 'isearch-filter-predicate
203 'isearch-filter-predicates
204 "24.4")
196 205
197;; Search ring. 206;; Search ring.
198 207
@@ -2491,6 +2500,13 @@ If there is no completion possible, say so and continue searching."
2491 (< (point) isearch-opoint))) 2500 (< (point) isearch-opoint)))
2492 "over") 2501 "over")
2493 (if isearch-wrapped "wrapped ") 2502 (if isearch-wrapped "wrapped ")
2503 (mapconcat (lambda (s)
2504 (and (symbolp s)
2505 (get s 'isearch-message-prefix)))
2506 (if (consp isearch-filter-predicates)
2507 isearch-filter-predicates
2508 (list isearch-filter-predicates))
2509 "")
2494 (if isearch-word 2510 (if isearch-word
2495 (or (and (symbolp isearch-word) 2511 (or (and (symbolp isearch-word)
2496 (get isearch-word 'isearch-message-prefix)) 2512 (get isearch-word 'isearch-message-prefix))
@@ -2622,10 +2638,7 @@ update the match data, and return point."
2622 (setq isearch-case-fold-search 2638 (setq isearch-case-fold-search
2623 (isearch-no-upper-case-p isearch-string isearch-regexp))) 2639 (isearch-no-upper-case-p isearch-string isearch-regexp)))
2624 (condition-case lossage 2640 (condition-case lossage
2625 (let ((inhibit-point-motion-hooks 2641 (let ((inhibit-point-motion-hooks search-invisible)
2626 ;; FIXME: equality comparisons on functions is asking for trouble.
2627 (and (eq isearch-filter-predicate 'isearch-filter-visible)
2628 search-invisible))
2629 (inhibit-quit nil) 2642 (inhibit-quit nil)
2630 (case-fold-search isearch-case-fold-search) 2643 (case-fold-search isearch-case-fold-search)
2631 (retry t)) 2644 (retry t))
@@ -2638,8 +2651,15 @@ update the match data, and return point."
2638 (if (or (not isearch-success) 2651 (if (or (not isearch-success)
2639 (bobp) (eobp) 2652 (bobp) (eobp)
2640 (= (match-beginning 0) (match-end 0)) 2653 (= (match-beginning 0) (match-end 0))
2641 (funcall isearch-filter-predicate 2654 ;; When one of filter predicates returns nil,
2642 (match-beginning 0) (match-end 0))) 2655 ;; retry the search. Otherwise, act according
2656 ;; to search-invisible (open overlays, etc.)
2657 (and (run-hook-with-args-until-failure
2658 'isearch-filter-predicates
2659 (match-beginning 0) (match-end 0))
2660 (or (eq search-invisible t)
2661 (not (isearch-range-invisible
2662 (match-beginning 0) (match-end 0))))))
2643 (setq retry nil))) 2663 (setq retry nil)))
2644 (setq isearch-just-started nil) 2664 (setq isearch-just-started nil)
2645 (if isearch-success 2665 (if isearch-success
@@ -2816,6 +2836,7 @@ determined by `isearch-range-invisible' unless invisible text can be
2816searched too when `search-invisible' is t." 2836searched too when `search-invisible' is t."
2817 (or (eq search-invisible t) 2837 (or (eq search-invisible t)
2818 (not (isearch-range-invisible beg end)))) 2838 (not (isearch-range-invisible beg end))))
2839(make-obsolete 'isearch-filter-visible 'search-invisible "24.4")
2819 2840
2820 2841
2821;; General utilities 2842;; General utilities
@@ -3041,8 +3062,11 @@ Attempt to do the search exactly the way the pending Isearch would."
3041 (if (or (not success) 3062 (if (or (not success)
3042 (= (point) bound) ; like (bobp) (eobp) in `isearch-search'. 3063 (= (point) bound) ; like (bobp) (eobp) in `isearch-search'.
3043 (= (match-beginning 0) (match-end 0)) 3064 (= (match-beginning 0) (match-end 0))
3044 (funcall isearch-filter-predicate 3065 (and (run-hook-with-args-until-failure
3045 (match-beginning 0) (match-end 0))) 3066 'isearch-filter-predicates
3067 (match-beginning 0) (match-end 0))
3068 (not (isearch-range-invisible
3069 (match-beginning 0) (match-end 0)))))
3046 (setq retry nil))) 3070 (setq retry nil)))
3047 success) 3071 success)
3048 (error nil))) 3072 (error nil)))
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index 94a906122fe..0e9c4fc5c76 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -268,6 +268,8 @@ object is returned instead of a list containing this single Lisp object.
268 ;; Wait until `dbus-call-method-handler' has put the result into 268 ;; Wait until `dbus-call-method-handler' has put the result into
269 ;; `dbus-return-values-table'. If no timeout is given, use the 269 ;; `dbus-return-values-table'. If no timeout is given, use the
270 ;; default 25". Events which are not from D-Bus must be restored. 270 ;; default 25". Events which are not from D-Bus must be restored.
271 ;; `read-event' performs a redisplay. This must be suppressed; it
272 ;; hurts when reading D-Bus events asynchronously.
271 (with-timeout ((if timeout (/ timeout 1000.0) 25)) 273 (with-timeout ((if timeout (/ timeout 1000.0) 25))
272 (while (eq (gethash key dbus-return-values-table :ignore) :ignore) 274 (while (eq (gethash key dbus-return-values-table :ignore) :ignore)
273 (let ((event (let ((inhibit-redisplay t) unread-command-events) 275 (let ((event (let ((inhibit-redisplay t) unread-command-events)
diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el
index 941ba3b4902..98f9b836a3b 100644
--- a/lisp/obsolete/fast-lock.el
+++ b/lisp/obsolete/fast-lock.el
@@ -855,3 +855,7 @@ See `fast-lock-get-face-properties'."
855(provide 'fast-lock) 855(provide 'fast-lock)
856 856
857;;; fast-lock.el ends here 857;;; fast-lock.el ends here
858
859;; Local Variables:
860;; byte-compile-warnings: (not obsolete)
861;; End:
diff --git a/lisp/obsolete/vc-mcvs.el b/lisp/obsolete/vc-mcvs.el
index dd597be32b1..9f9bd7a0e76 100644
--- a/lisp/obsolete/vc-mcvs.el
+++ b/lisp/obsolete/vc-mcvs.el
@@ -189,6 +189,8 @@ This is only meaningful if you don't use the implicit checkout model
189;;; 189;;;
190;;; State-changing functions 190;;; State-changing functions
191;;; 191;;;
192(autoload 'vc-checkout "vc")
193(autoload 'vc-switches "vc")
192 194
193(defun vc-mcvs-register (files &optional rev comment) 195(defun vc-mcvs-register (files &optional rev comment)
194 "Register FILES into the Meta-CVS version-control system. 196 "Register FILES into the Meta-CVS version-control system.
@@ -345,6 +347,8 @@ This is only possible if Meta-CVS is responsible for FILE's directory.")
345(defun vc-mcvs-rename-file (old new) 347(defun vc-mcvs-rename-file (old new)
346 (vc-mcvs-command nil 0 new "move" (file-relative-name old))) 348 (vc-mcvs-command nil 0 new "move" (file-relative-name old)))
347 349
350(autoload 'vc-default-revert "vc")
351
348(defun vc-mcvs-revert (file &optional contents-done) 352(defun vc-mcvs-revert (file &optional contents-done)
349 "Revert FILE to the working revision it was based on." 353 "Revert FILE to the working revision it was based on."
350 (vc-default-revert 'MCVS file contents-done) 354 (vc-default-revert 'MCVS file contents-done)
@@ -478,6 +482,10 @@ workspace is immediately moved to that new branch)."
478 (vc-mcvs-command nil 0 dir "branch" name) 482 (vc-mcvs-command nil 0 dir "branch" name)
479 (vc-mcvs-command nil 0 dir "switch" name))) 483 (vc-mcvs-command nil 0 dir "switch" name)))
480 484
485;; vc-mcvs-command calls the autoloaded vc-do-command from vc-dispatcher.
486(declare-function vc-resynch-buffer "vc-dispatcher"
487 (file &optional keep noquery reset-vc-info))
488
481(defun vc-mcvs-retrieve-tag (dir name update) 489(defun vc-mcvs-retrieve-tag (dir name update)
482 "Retrieve a tag at and below DIR. 490 "Retrieve a tag at and below DIR.
483NAME is the name of the tag; if it is empty, do a `cvs update'. 491NAME is the name of the tag; if it is empty, do a `cvs update'.
diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el
index db525fe531f..9d48d36bb30 100644
--- a/lisp/play/dunnet.el
+++ b/lisp/play/dunnet.el
@@ -1,4 +1,4 @@
1;;; dunnet.el --- text adventure for Emacs -*- byte-compile-warnings: nil -*- 1;;; dunnet.el --- text adventure for Emacs
2 2
3;; Copyright (C) 1992-1993, 2001-2013 Free Software Foundation, Inc. 3;; Copyright (C) 1992-1993, 2001-2013 Free Software Foundation, Inc.
4 4
@@ -1386,7 +1386,7 @@ for a moment, then straighten yourself up.
1386(setq dun-unix-verbs '((ls . dun-ls) (ftp . dun-ftp) (echo . dun-echo) 1386(setq dun-unix-verbs '((ls . dun-ls) (ftp . dun-ftp) (echo . dun-echo)
1387 (exit . dun-uexit) (cd . dun-cd) (pwd . dun-pwd) 1387 (exit . dun-uexit) (cd . dun-cd) (pwd . dun-pwd)
1388 (rlogin . dun-rlogin) (uncompress . dun-uncompress) 1388 (rlogin . dun-rlogin) (uncompress . dun-uncompress)
1389 (cat . dun-cat) (zippy . dun-zippy))) 1389 (cat . dun-cat)))
1390 1390
1391(setq dun-dos-verbs '((dir . dun-dos-dir) (type . dun-dos-type) 1391(setq dun-dos-verbs '((dir . dun-dos-dir) (type . dun-dos-type)
1392 (exit . dun-dos-exit) (command . dun-dos-spawn) 1392 (exit . dun-dos-exit) (command . dun-dos-spawn)
@@ -2996,9 +2996,6 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..")
2996 (dun-mprincl "Ascii files only.") 2996 (dun-mprincl "Ascii files only.")
2997 (dun-mprincl "File not found.")))))))) 2997 (dun-mprincl "File not found."))))))))
2998 2998
2999(defun dun-zippy (args)
3000 (dun-mprincl (yow)))
3001
3002(defun dun-rlogin-endgame () 2999(defun dun-rlogin-endgame ()
3003 (if (not (= (dun-score nil) 90)) 3000 (if (not (= (dun-score nil) 90))
3004 (dun-mprincl 3001 (dun-mprincl
@@ -3356,3 +3353,7 @@ File not found")))
3356(provide 'dunnet) 3353(provide 'dunnet)
3357 3354
3358;;; dunnet.el ends here 3355;;; dunnet.el ends here
3356
3357;; Local Variables:
3358;; byte-compile-warnings: (not free-vars lexical)
3359;; End:
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 2c32a7a5607..746b75d962b 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1059,7 +1059,7 @@ Note that the style variables are always made local to the buffer."
1059 ;; This calls the language variable c-before-font-lock-functions, if non nil. 1059 ;; This calls the language variable c-before-font-lock-functions, if non nil.
1060 ;; This typically sets `syntax-table' properties. 1060 ;; This typically sets `syntax-table' properties.
1061 1061
1062 (c-save-buffer-state () 1062 (c-save-buffer-state (case-fold-search)
1063 ;; When `combine-after-change-calls' is used we might get calls 1063 ;; When `combine-after-change-calls' is used we might get calls
1064 ;; with regions outside the current narrowing. This has been 1064 ;; with regions outside the current narrowing. This has been
1065 ;; observed in Emacs 20.7. 1065 ;; observed in Emacs 20.7.
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index 66ff217c73e..f830cc7edc1 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -1622,6 +1622,24 @@ names)."))
1622) 1622)
1623(make-variable-buffer-local 'c-macro-with-semi-re) 1623(make-variable-buffer-local 'c-macro-with-semi-re)
1624 1624
1625(defvar c-macro-names-with-semicolon
1626 '("Q_OBJECT" "Q_PROPERTY" "Q_DECLARE" "Q_ENUMS")
1627 "List of #defined symbols whose expansion ends with a semicolon.
1628Alternatively it can be a string, a regular expression which
1629matches all such symbols.
1630
1631The \"symbols\" must be syntactically valid identifiers in the
1632target language \(C, C++, Objective C), or \(as the case may be)
1633the regular expression must match only valid identifiers.
1634
1635If you change this variable's value, call the function
1636`c-make-macros-with-semi-re' to set the necessary internal
1637variables.
1638
1639Note that currently \(2008-11-04) this variable is a prototype,
1640and is likely to disappear or change its form soon.")
1641(make-variable-buffer-local 'c-macro-names-with-semicolon)
1642
1625(defun c-make-macro-with-semi-re () 1643(defun c-make-macro-with-semi-re ()
1626 ;; Convert `c-macro-names-with-semicolon' into the regexp 1644 ;; Convert `c-macro-names-with-semicolon' into the regexp
1627 ;; `c-macro-with-semi-re' (or just copy it if it's already a re). 1645 ;; `c-macro-with-semi-re' (or just copy it if it's already a re).
@@ -1643,24 +1661,6 @@ names)."))
1643c-macro-names-with-semicolon: %s" 1661c-macro-names-with-semicolon: %s"
1644 c-macro-names-with-semicolon)))))) 1662 c-macro-names-with-semicolon))))))
1645 1663
1646(defvar c-macro-names-with-semicolon
1647 '("Q_OBJECT" "Q_PROPERTY" "Q_DECLARE" "Q_ENUMS")
1648 "List of #defined symbols whose expansion ends with a semicolon.
1649Alternatively it can be a string, a regular expression which
1650matches all such symbols.
1651
1652The \"symbols\" must be syntactically valid identifiers in the
1653target language \(C, C++, Objective C), or \(as the case may be)
1654the regular expression must match only valid identifiers.
1655
1656If you change this variable's value, call the function
1657`c-make-macros-with-semi-re' to set the necessary internal
1658variables.
1659
1660Note that currently \(2008-11-04) this variable is a prototype,
1661and is likely to disappear or change its form soon.")
1662(make-variable-buffer-local 'c-macro-names-with-semicolon)
1663
1664(defvar c-file-style nil 1664(defvar c-file-style nil
1665 "Variable interface for setting style via File Local Variables. 1665 "Variable interface for setting style via File Local Variables.
1666In a file's Local Variable section, you can set this variable to a 1666In a file's Local Variable section, you can set this variable to a
diff --git a/lisp/replace.el b/lisp/replace.el
index 1bebff448fa..86956a614cd 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1838,6 +1838,68 @@ It is used by `query-replace-regexp', `replace-regexp',
1838It is called with three arguments, as if it were 1838It is called with three arguments, as if it were
1839`re-search-forward'.") 1839`re-search-forward'.")
1840 1840
1841(defun replace-search (search-string limit regexp-flag delimited-flag
1842 case-fold-search)
1843 "Search for the next occurence of SEARCH-STRING to replace."
1844 ;; Let-bind global isearch-* variables to values used
1845 ;; to search the next replacement. These let-bindings
1846 ;; should be effective both at the time of calling
1847 ;; `isearch-search-fun-default' and also at the
1848 ;; time of funcalling `search-function'.
1849 ;; These isearch-* bindings can't be placed higher
1850 ;; outside of this function because then another I-search
1851 ;; used after `recursive-edit' might override them.
1852 (let* ((isearch-regexp regexp-flag)
1853 (isearch-word delimited-flag)
1854 (isearch-lax-whitespace
1855 replace-lax-whitespace)
1856 (isearch-regexp-lax-whitespace
1857 replace-regexp-lax-whitespace)
1858 (isearch-case-fold-search case-fold-search)
1859 (isearch-adjusted nil)
1860 (isearch-nonincremental t) ; don't use lax word mode
1861 (isearch-forward t)
1862 (search-function
1863 (or (if regexp-flag
1864 replace-re-search-function
1865 replace-search-function)
1866 (isearch-search-fun-default))))
1867 (funcall search-function search-string limit t)))
1868
1869(defvar replace-overlay nil)
1870
1871(defun replace-highlight (match-beg match-end range-beg range-end
1872 search-string regexp-flag delimited-flag
1873 case-fold-search)
1874 (if query-replace-highlight
1875 (if replace-overlay
1876 (move-overlay replace-overlay match-beg match-end (current-buffer))
1877 (setq replace-overlay (make-overlay match-beg match-end))
1878 (overlay-put replace-overlay 'priority 1001) ;higher than lazy overlays
1879 (overlay-put replace-overlay 'face 'query-replace)))
1880 (if query-replace-lazy-highlight
1881 (let ((isearch-string search-string)
1882 (isearch-regexp regexp-flag)
1883 (isearch-word delimited-flag)
1884 (isearch-lax-whitespace
1885 replace-lax-whitespace)
1886 (isearch-regexp-lax-whitespace
1887 replace-regexp-lax-whitespace)
1888 (isearch-case-fold-search case-fold-search)
1889 (isearch-forward t)
1890 (isearch-other-end match-beg)
1891 (isearch-error nil))
1892 (isearch-lazy-highlight-new-loop range-beg range-end))))
1893
1894(defun replace-dehighlight ()
1895 (when replace-overlay
1896 (delete-overlay replace-overlay))
1897 (when query-replace-lazy-highlight
1898 (lazy-highlight-cleanup lazy-highlight-cleanup)
1899 (setq isearch-lazy-highlight-last-string nil))
1900 ;; Close overlays opened by `isearch-range-invisible' in `perform-replace'.
1901 (isearch-clean-overlays))
1902
1841(defun perform-replace (from-string replacements 1903(defun perform-replace (from-string replacements
1842 query-flag regexp-flag delimited-flag 1904 query-flag regexp-flag delimited-flag
1843 &optional repeat-count map start end) 1905 &optional repeat-count map start end)
@@ -1925,62 +1987,40 @@ make, or the user didn't cancel the call."
1925 ;; Loop finding occurrences that perhaps should be replaced. 1987 ;; Loop finding occurrences that perhaps should be replaced.
1926 (while (and keep-going 1988 (while (and keep-going
1927 (not (or (eobp) (and limit (>= (point) limit)))) 1989 (not (or (eobp) (and limit (>= (point) limit))))
1928 ;; Let-bind global isearch-* variables to values used 1990 ;; Use the next match if it is already known;
1929 ;; to search the next replacement. These let-bindings 1991 ;; otherwise, search for a match after moving forward
1930 ;; should be effective both at the time of calling 1992 ;; one char if progress is required.
1931 ;; `isearch-search-fun-default' and also at the 1993 (setq real-match-data
1932 ;; time of funcalling `search-function'. 1994 (cond ((consp match-again)
1933 ;; These isearch-* bindings can't be placed higher 1995 (goto-char (nth 1 match-again))
1934 ;; outside of this loop because then another I-search 1996 (replace-match-data
1935 ;; used after `recursive-edit' might override them. 1997 t real-match-data match-again))
1936 (let* ((isearch-regexp regexp-flag) 1998 ;; MATCH-AGAIN non-nil means accept an
1937 (isearch-word delimited-flag) 1999 ;; adjacent match.
1938 (isearch-lax-whitespace 2000 (match-again
1939 replace-lax-whitespace) 2001 (and
1940 (isearch-regexp-lax-whitespace 2002 (replace-search search-string limit
1941 replace-regexp-lax-whitespace) 2003 regexp-flag delimited-flag
1942 (isearch-case-fold-search case-fold-search) 2004 case-fold-search)
1943 (isearch-adjusted nil) 2005 ;; For speed, use only integers and
1944 (isearch-nonincremental t) ; don't use lax word mode 2006 ;; reuse the list used last time.
1945 (isearch-forward t) 2007 (replace-match-data t real-match-data)))
1946 (search-function 2008 ((and (< (1+ (point)) (point-max))
1947 (or (if regexp-flag 2009 (or (null limit)
1948 replace-re-search-function 2010 (< (1+ (point)) limit)))
1949 replace-search-function) 2011 ;; If not accepting adjacent matches,
1950 (isearch-search-fun-default)))) 2012 ;; move one char to the right before
1951 ;; Use the next match if it is already known; 2013 ;; searching again. Undo the motion
1952 ;; otherwise, search for a match after moving forward 2014 ;; if the search fails.
1953 ;; one char if progress is required. 2015 (let ((opoint (point)))
1954 (setq real-match-data 2016 (forward-char 1)
1955 (cond ((consp match-again) 2017 (if (replace-search search-string limit
1956 (goto-char (nth 1 match-again)) 2018 regexp-flag delimited-flag
1957 (replace-match-data 2019 case-fold-search)
1958 t real-match-data match-again)) 2020 (replace-match-data
1959 ;; MATCH-AGAIN non-nil means accept an 2021 t real-match-data)
1960 ;; adjacent match. 2022 (goto-char opoint)
1961 (match-again 2023 nil))))))
1962 (and
1963 (funcall search-function search-string
1964 limit t)
1965 ;; For speed, use only integers and
1966 ;; reuse the list used last time.
1967 (replace-match-data t real-match-data)))
1968 ((and (< (1+ (point)) (point-max))
1969 (or (null limit)
1970 (< (1+ (point)) limit)))
1971 ;; If not accepting adjacent matches,
1972 ;; move one char to the right before
1973 ;; searching again. Undo the motion
1974 ;; if the search fails.
1975 (let ((opoint (point)))
1976 (forward-char 1)
1977 (if (funcall
1978 search-function search-string
1979 limit t)
1980 (replace-match-data
1981 t real-match-data)
1982 (goto-char opoint)
1983 nil)))))))
1984 2024
1985 ;; Record whether the match is nonempty, to avoid an infinite loop 2025 ;; Record whether the match is nonempty, to avoid an infinite loop
1986 ;; repeatedly matching the same empty string. 2026 ;; repeatedly matching the same empty string.
@@ -2003,10 +2043,18 @@ make, or the user didn't cancel the call."
2003 match)))))) 2043 match))))))
2004 2044
2005 ;; Optionally ignore matches that have a read-only property. 2045 ;; Optionally ignore matches that have a read-only property.
2006 (unless (and query-replace-skip-read-only 2046 (when (and (or (not query-replace-skip-read-only)
2007 (text-property-not-all 2047 (not (text-property-not-all
2008 (nth 0 real-match-data) (nth 1 real-match-data) 2048 (nth 0 real-match-data) (nth 1 real-match-data)
2009 'read-only nil)) 2049 'read-only nil)))
2050 ;; Optionally filter out matches.
2051 (run-hook-with-args-until-failure
2052 'isearch-filter-predicates
2053 (nth 0 real-match-data) (nth 1 real-match-data))
2054 ;; Optionally ignore invisible matches.
2055 (or (eq search-invisible t)
2056 (not (isearch-range-invisible
2057 (nth 0 real-match-data) (nth 1 real-match-data)))))
2010 2058
2011 ;; Calculate the replacement string, if necessary. 2059 ;; Calculate the replacement string, if necessary.
2012 (when replacements 2060 (when replacements
@@ -2221,36 +2269,4 @@ make, or the user didn't cancel the call."
2221 (if (= replace-count 1) "" "s"))) 2269 (if (= replace-count 1) "" "s")))
2222 (or (and keep-going stack) multi-buffer))) 2270 (or (and keep-going stack) multi-buffer)))
2223 2271
2224(defvar replace-overlay nil)
2225
2226(defun replace-highlight (match-beg match-end range-beg range-end
2227 search-string regexp-flag delimited-flag
2228 case-fold-search)
2229 (if query-replace-highlight
2230 (if replace-overlay
2231 (move-overlay replace-overlay match-beg match-end (current-buffer))
2232 (setq replace-overlay (make-overlay match-beg match-end))
2233 (overlay-put replace-overlay 'priority 1001) ;higher than lazy overlays
2234 (overlay-put replace-overlay 'face 'query-replace)))
2235 (if query-replace-lazy-highlight
2236 (let ((isearch-string search-string)
2237 (isearch-regexp regexp-flag)
2238 (isearch-word delimited-flag)
2239 (isearch-lax-whitespace
2240 replace-lax-whitespace)
2241 (isearch-regexp-lax-whitespace
2242 replace-regexp-lax-whitespace)
2243 (isearch-case-fold-search case-fold-search)
2244 (isearch-forward t)
2245 (isearch-other-end match-beg)
2246 (isearch-error nil))
2247 (isearch-lazy-highlight-new-loop range-beg range-end))))
2248
2249(defun replace-dehighlight ()
2250 (when replace-overlay
2251 (delete-overlay replace-overlay))
2252 (when query-replace-lazy-highlight
2253 (lazy-highlight-cleanup lazy-highlight-cleanup)
2254 (setq isearch-lazy-highlight-last-string nil)))
2255
2256;;; replace.el ends here 2272;;; replace.el ends here
diff --git a/lisp/vc/vc-arch.el b/lisp/vc/vc-arch.el
index 52609457ebc..f94e19271ee 100644
--- a/lisp/vc/vc-arch.el
+++ b/lisp/vc/vc-arch.el
@@ -311,6 +311,9 @@ Only the value `maybe' can be trusted :-(."
311 'up-to-date 311 'up-to-date
312 'edited))))))))) 312 'edited)))))))))
313 313
314;; -dir-status called from vc-dir, which loads vc, which loads vc-dispatcher.
315(declare-function vc-exec-after "vc-dispatcher" (code))
316
314(defun vc-arch-dir-status (dir callback) 317(defun vc-arch-dir-status (dir callback)
315 "Run 'tla inventory' for DIR and pass results to CALLBACK. 318 "Run 'tla inventory' for DIR and pass results to CALLBACK.
316CALLBACK expects (ENTRIES &optional MORE-TO-COME); see 319CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
@@ -432,6 +435,8 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
432 (message "There are unresolved conflicts in %s" 435 (message "There are unresolved conflicts in %s"
433 (file-name-nondirectory rej)))))) 436 (file-name-nondirectory rej))))))
434 437
438(autoload 'vc-switches "vc")
439
435(defun vc-arch-checkin (files rev comment) 440(defun vc-arch-checkin (files rev comment)
436 (if rev (error "Committing to a specific revision is unsupported")) 441 (if rev (error "Committing to a specific revision is unsupported"))
437 ;; FIXME: This implementation probably only works for singleton filesets 442 ;; FIXME: This implementation probably only works for singleton filesets
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 4a08403c93e..5e76d8464a5 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -47,8 +47,7 @@
47 47
48(eval-when-compile 48(eval-when-compile
49 (require 'cl-lib) 49 (require 'cl-lib)
50 (require 'vc) ;; for vc-exec-after 50 (require 'vc-dir)) ; vc-dir-at-event
51 (require 'vc-dir))
52 51
53;; Clear up the cache to force vc-call to check again and discover 52;; Clear up the cache to force vc-call to check again and discover
54;; new functions when we reload this file. 53;; new functions when we reload this file.
@@ -320,6 +319,12 @@ in the repository root directory of FILE."
320 ("^Using saved parent location: \\(.+\\)" 1 nil nil 0)) 319 ("^Using saved parent location: \\(.+\\)" 1 nil nil 0))
321 "Value of `compilation-error-regexp-alist' in *vc-bzr* buffers.") 320 "Value of `compilation-error-regexp-alist' in *vc-bzr* buffers.")
322 321
322;; Follows vc-bzr-(async-)command, which uses vc-do-(async-)command
323;; from vc-dispatcher.
324(declare-function vc-exec-after "vc-dispatcher" (code))
325;; Follows vc-exec-after.
326(declare-function vc-set-async-update "vc-dispatcher" (process-buffer))
327
323(defun vc-bzr-pull (prompt) 328(defun vc-bzr-pull (prompt)
324 "Pull changes into the current Bzr branch. 329 "Pull changes into the current Bzr branch.
325Normally, this runs \"bzr pull\". However, if the branch is a 330Normally, this runs \"bzr pull\". However, if the branch is a
@@ -693,6 +698,8 @@ REV non-nil gets an error."
693 (2 'change-log-email)) 698 (2 'change-log-email))
694 ("^ *timestamp: \\(.*\\)" (1 'change-log-date-face))))))) 699 ("^ *timestamp: \\(.*\\)" (1 'change-log-date-face)))))))
695 700
701(autoload 'vc-setup-buffer "vc-dispatcher")
702
696(defun vc-bzr-print-log (files buffer &optional shortlog start-revision limit) 703(defun vc-bzr-print-log (files buffer &optional shortlog start-revision limit)
697 "Print commit log associated with FILES into specified BUFFER. 704 "Print commit log associated with FILES into specified BUFFER.
698If SHORTLOG is non-nil, use --line format. 705If SHORTLOG is non-nil, use --line format.
@@ -778,6 +785,8 @@ If LIMIT is non-nil, show no more than this many entries."
778 (goto-char (point-min))) 785 (goto-char (point-min)))
779 found))) 786 found)))
780 787
788(autoload 'vc-switches "vc")
789
781(defun vc-bzr-diff (files &optional rev1 rev2 buffer) 790(defun vc-bzr-diff (files &optional rev1 rev2 buffer)
782 "VC bzr backend for diff." 791 "VC bzr backend for diff."
783 (let* ((switches (vc-switches 'bzr 'diff)) 792 (let* ((switches (vc-switches 'bzr 'diff))
@@ -898,6 +907,8 @@ stream. Standard error output is discarded."
898 (:conc-name vc-bzr-extra-fileinfo->)) 907 (:conc-name vc-bzr-extra-fileinfo->))
899 extra-name) ;; original name for rename targets, new name for 908 extra-name) ;; original name for rename targets, new name for
900 909
910(declare-function vc-default-dir-printer "vc-dir" (backend fileentry))
911
901(defun vc-bzr-dir-printer (info) 912(defun vc-bzr-dir-printer (info)
902 "Pretty-printer for the vc-dir-fileinfo structure." 913 "Pretty-printer for the vc-dir-fileinfo structure."
903 (let ((extra (vc-dir-fileinfo->extra info))) 914 (let ((extra (vc-dir-fileinfo->extra info)))
@@ -1110,6 +1121,10 @@ stream. Standard error output is discarded."
1110 'help-echo shelve-help-echo 1121 'help-echo shelve-help-echo
1111 'face 'font-lock-variable-name-face)))))) 1122 'face 'font-lock-variable-name-face))))))
1112 1123
1124;; Follows vc-bzr-command, which uses vc-do-command from vc-dispatcher.
1125(declare-function vc-resynch-buffer "vc-dispatcher"
1126 (file &optional keep noquery reset-vc-info))
1127
1113(defun vc-bzr-shelve (name) 1128(defun vc-bzr-shelve (name)
1114 "Create a shelve." 1129 "Create a shelve."
1115 (interactive "sShelf name: ") 1130 (interactive "sShelf name: ")
@@ -1169,6 +1184,9 @@ stream. Standard error output is discarded."
1169 (match-string 1) 1184 (match-string 1)
1170 (error "Cannot find shelf at point")))) 1185 (error "Cannot find shelf at point"))))
1171 1186
1187;; vc-bzr-shelve-delete-at-point must be called from a vc-dir buffer.
1188(declare-function vc-dir-refresh "vc-dir" ())
1189
1172(defun vc-bzr-shelve-delete-at-point () 1190(defun vc-bzr-shelve-delete-at-point ()
1173 (interactive) 1191 (interactive)
1174 (let ((shelve (vc-bzr-shelve-get-at-point (point)))) 1192 (let ((shelve (vc-bzr-shelve-get-at-point (point))))
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index 7a8f8107509..eee896056c6 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -280,6 +280,8 @@ committed and support display of sticky tags."
280;;; State-changing functions 280;;; State-changing functions
281;;; 281;;;
282 282
283(autoload 'vc-switches "vc")
284
283(defun vc-cvs-register (files &optional _rev comment) 285(defun vc-cvs-register (files &optional _rev comment)
284 "Register FILES into the CVS version-control system. 286 "Register FILES into the CVS version-control system.
285COMMENT can be used to provide an initial description of FILES. 287COMMENT can be used to provide an initial description of FILES.
@@ -415,6 +417,8 @@ REV is the revision to check out."
415(defun vc-cvs-delete-file (file) 417(defun vc-cvs-delete-file (file)
416 (vc-cvs-command nil 0 file "remove" "-f")) 418 (vc-cvs-command nil 0 file "remove" "-f"))
417 419
420(autoload 'vc-default-revert "vc")
421
418(defun vc-cvs-revert (file &optional contents-done) 422(defun vc-cvs-revert (file &optional contents-done)
419 "Revert FILE to the working revision on which it was based." 423 "Revert FILE to the working revision on which it was based."
420 (vc-default-revert 'CVS file contents-done) 424 (vc-default-revert 'CVS file contents-done)
@@ -501,6 +505,8 @@ Will fail unless you have administrative privileges on the repo."
501;;; 505;;;
502 506
503(declare-function vc-rcs-print-log-cleanup "vc-rcs" ()) 507(declare-function vc-rcs-print-log-cleanup "vc-rcs" ())
508;; Follows vc-cvs-command, which uses vc-do-command from vc-dispatcher.
509(declare-function vc-exec-after "vc-dispatcher" (code))
504 510
505(defun vc-cvs-print-log (files buffer &optional _shortlog _start-revision limit) 511(defun vc-cvs-print-log (files buffer &optional _shortlog _start-revision limit)
506 "Print commit log associated with FILES into specified BUFFER. 512 "Print commit log associated with FILES into specified BUFFER.
@@ -519,6 +525,9 @@ Remaining arguments are ignored."
519 "Get comment history of a file." 525 "Get comment history of a file."
520 (vc-call-backend 'RCS 'comment-history file)) 526 (vc-call-backend 'RCS 'comment-history file))
521 527
528(autoload 'vc-version-backup-file "vc")
529(declare-function vc-coding-system-for-diff "vc" (file))
530
522(defun vc-cvs-diff (files &optional oldvers newvers buffer) 531(defun vc-cvs-diff (files &optional oldvers newvers buffer)
523 "Get a difference report using CVS between two revisions of FILE." 532 "Get a difference report using CVS between two revisions of FILE."
524 (let* (process-file-side-effects 533 (let* (process-file-side-effects
@@ -665,6 +674,10 @@ workspace is immediately moved to that new branch)."
665 (vc-cvs-command nil 0 dir "tag" "-c" (if branchp "-b") name) 674 (vc-cvs-command nil 0 dir "tag" "-c" (if branchp "-b") name)
666 (when branchp (vc-cvs-command nil 0 dir "update" "-r" name))) 675 (when branchp (vc-cvs-command nil 0 dir "update" "-r" name)))
667 676
677;; Follows vc-cvs-command, which uses vc-do-command from vc-dispatcher.
678(declare-function vc-resynch-buffer "vc-dispatcher"
679 (file &optional keep noquery reset-vc-info))
680
668(defun vc-cvs-retrieve-tag (dir name update) 681(defun vc-cvs-retrieve-tag (dir name update)
669 "Retrieve a tag at and below DIR. 682 "Retrieve a tag at and below DIR.
670NAME is the name of the tag; if it is empty, do a `cvs update'. 683NAME is the name of the tag; if it is empty, do a `cvs update'.
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index d10e3934680..e0bd0a574a5 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1301,6 +1301,8 @@ These are the commands available for use in the file status buffer:
1301 "Auxiliary information to be saved in desktop file." 1301 "Auxiliary information to be saved in desktop file."
1302 (cons (desktop-file-name default-directory dirname) vc-dir-backend)) 1302 (cons (desktop-file-name default-directory dirname) vc-dir-backend))
1303 1303
1304(defvar desktop-missing-file-warning)
1305
1304(defun vc-dir-restore-desktop-buffer (_filename _buffername misc-data) 1306(defun vc-dir-restore-desktop-buffer (_filename _buffername misc-data)
1305 "Restore a `vc-dir' buffer specified in a desktop file." 1307 "Restore a `vc-dir' buffer specified in a desktop file."
1306 (let ((dir (car misc-data)) 1308 (let ((dir (car misc-data))
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 06474cb4604..af5be361047 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -234,30 +234,30 @@ matching the resulting Git log output, and KEYWORDS is a list of
234 (vc-git--state-code diff-letter))) 234 (vc-git--state-code diff-letter)))
235 (if (vc-git--empty-db-p) 'added 'up-to-date)))) 235 (if (vc-git--empty-db-p) 'added 'up-to-date))))
236 236
237(defun vc-git-working-revision (_file) 237(defun vc-git-working-revision (file)
238 "Git-specific version of `vc-working-revision'." 238 "Git-specific version of `vc-working-revision'."
239 (let* (process-file-side-effects 239 (let* (process-file-side-effects
240 (str (with-output-to-string 240 (str (vc-git--run-command-string nil "symbolic-ref" "HEAD")))
241 (with-current-buffer standard-output 241 (vc-file-setprop file 'vc-git-detached (null str))
242 (vc-git--out-ok "symbolic-ref" "HEAD"))))) 242 (if str
243 (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str) 243 (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str)
244 (match-string 2 str) 244 (match-string 2 str)
245 str))) 245 str)
246 (vc-git--rev-parse "HEAD"))))
246 247
247(defun vc-git-workfile-unchanged-p (file) 248(defun vc-git-workfile-unchanged-p (file)
248 (eq 'up-to-date (vc-git-state file))) 249 (eq 'up-to-date (vc-git-state file)))
249 250
250(defun vc-git-mode-line-string (file) 251(defun vc-git-mode-line-string (file)
251 "Return a string for `vc-mode-line' to put in the mode line for FILE." 252 "Return a string for `vc-mode-line' to put in the mode line for FILE."
252 (let* ((branch (vc-working-revision file)) 253 (let* ((rev (vc-working-revision file))
254 (detached (vc-file-getprop file 'vc-git-detached))
253 (def-ml (vc-default-mode-line-string 'Git file)) 255 (def-ml (vc-default-mode-line-string 'Git file))
254 (help-echo (get-text-property 0 'help-echo def-ml))) 256 (help-echo (get-text-property 0 'help-echo def-ml)))
255 (if (zerop (length branch)) 257 (propertize (if detached
256 (propertize 258 (substring def-ml 0 (- 7 (length rev)))
257 (concat def-ml "!") 259 def-ml)
258 'help-echo (concat help-echo "\nNo current branch (detached HEAD)")) 260 'help-echo (concat help-echo "\nCurrent revision: " rev))))
259 (propertize def-ml
260 'help-echo (concat help-echo "\nCurrent branch: " branch)))))
261 261
262(cl-defstruct (vc-git-extra-fileinfo 262(cl-defstruct (vc-git-extra-fileinfo
263 (:copier nil) 263 (:copier nil)
@@ -443,6 +443,12 @@ or an empty string if none."
443 (when next-stage 443 (when next-stage
444 (vc-git-dir-status-goto-stage next-stage files update-function)))) 444 (vc-git-dir-status-goto-stage next-stage files update-function))))
445 445
446;; Follows vc-git-command (or vc-do-async-command), which uses vc-do-command
447;; from vc-dispatcher.
448(declare-function vc-exec-after "vc-dispatcher" (code))
449;; Follows vc-exec-after.
450(declare-function vc-set-async-update "vc-dispatcher" (process-buffer))
451
446(defun vc-git-dir-status-goto-stage (stage files update-function) 452(defun vc-git-dir-status-goto-stage (stage files update-function)
447 (erase-buffer) 453 (erase-buffer)
448 (pcase stage 454 (pcase stage
@@ -731,6 +737,8 @@ This prompts for a branch to merge from."
731 737
732;;; HISTORY FUNCTIONS 738;;; HISTORY FUNCTIONS
733 739
740(autoload 'vc-setup-buffer "vc-dispatcher")
741
734(defun vc-git-print-log (files buffer &optional shortlog start-revision limit) 742(defun vc-git-print-log (files buffer &optional shortlog start-revision limit)
735 "Print commit log associated with FILES into specified BUFFER. 743 "Print commit log associated with FILES into specified BUFFER.
736If SHORTLOG is non-nil, use a short format based on `vc-git-root-log-format'. 744If SHORTLOG is non-nil, use a short format based on `vc-git-root-log-format'.
@@ -857,6 +865,8 @@ or BRANCH^ (where \"^\" can be repeated)."
857 (indent-region (point-min) (point-max) 2) 865 (indent-region (point-min) (point-max) 2)
858 (buffer-string)))) 866 (buffer-string))))
859 867
868(autoload 'vc-switches "vc")
869
860(defun vc-git-diff (files &optional rev1 rev2 buffer) 870(defun vc-git-diff (files &optional rev1 rev2 buffer)
861 "Get a difference report using Git between two revisions of FILES." 871 "Get a difference report using Git between two revisions of FILES."
862 (let (process-file-side-effects) 872 (let (process-file-side-effects)
@@ -943,10 +953,13 @@ or BRANCH^ (where \"^\" can be repeated)."
943 (point) 953 (point)
944 (1- (point-max))))))) 954 (1- (point-max)))))))
945 (or (vc-git-symbolic-commit prev-rev) prev-rev)) 955 (or (vc-git-symbolic-commit prev-rev) prev-rev))
946 (with-temp-buffer 956 (vc-git--rev-parse (concat rev "^"))))
947 (and 957
948 (vc-git--out-ok "rev-parse" (concat rev "^")) 958(defun vc-git--rev-parse (rev)
949 (buffer-substring-no-properties (point-min) (+ (point-min) 40)))))) 959 (with-temp-buffer
960 (and
961 (vc-git--out-ok "rev-parse" rev)
962 (buffer-substring-no-properties (point-min) (+ (point-min) 40)))))
950 963
951(defun vc-git-next-revision (file rev) 964(defun vc-git-next-revision (file rev)
952 "Git-specific version of `vc-next-revision'." 965 "Git-specific version of `vc-next-revision'."
@@ -1007,6 +1020,12 @@ or BRANCH^ (where \"^\" can be repeated)."
1007 (or (vc-file-getprop file 'git-root) 1020 (or (vc-file-getprop file 'git-root)
1008 (vc-file-setprop file 'git-root (vc-find-root file ".git")))) 1021 (vc-file-setprop file 'git-root (vc-find-root file ".git"))))
1009 1022
1023;; grep-compute-defaults autoloads grep.
1024(declare-function grep-read-regexp "grep" ())
1025(declare-function grep-read-files "grep" (regexp))
1026(declare-function grep-expand-template "grep"
1027 (template &optional regexp files dir excl))
1028
1010;; Derived from `lgrep'. 1029;; Derived from `lgrep'.
1011(defun vc-git-grep (regexp &optional files dir) 1030(defun vc-git-grep (regexp &optional files dir)
1012 "Run git grep, searching for REGEXP in FILES in directory DIR. 1031 "Run git grep, searching for REGEXP in FILES in directory DIR.
@@ -1062,6 +1081,10 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
1062 (if (eq next-error-last-buffer (current-buffer)) 1081 (if (eq next-error-last-buffer (current-buffer))
1063 (setq default-directory dir)))))) 1082 (setq default-directory dir))))))
1064 1083
1084;; Everywhere but here, follows vc-git-command, which uses vc-do-command
1085;; from vc-dispatcher.
1086(autoload 'vc-resynch-buffer "vc-dispatcher")
1087
1065(defun vc-git-stash (name) 1088(defun vc-git-stash (name)
1066 "Create a stash." 1089 "Create a stash."
1067 (interactive "sStash name: ") 1090 (interactive "sStash name: ")
@@ -1119,6 +1142,9 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
1119 (match-string 1) 1142 (match-string 1)
1120 (error "Cannot find stash at point")))) 1143 (error "Cannot find stash at point"))))
1121 1144
1145;; vc-git-stash-delete-at-point must be called from a vc-dir buffer.
1146(declare-function vc-dir-refresh "vc-dir" ())
1147
1122(defun vc-git-stash-delete-at-point () 1148(defun vc-git-stash-delete-at-point ()
1123 (interactive) 1149 (interactive)
1124 (let ((stash (vc-git-stash-get-at-point (point)))) 1150 (let ((stash (vc-git-stash-get-at-point (point))))
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index feec015e52a..a80a103c675 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -245,6 +245,8 @@ highlighting the Log View buffer."
245 (repeat :tag "Argument List" :value ("") string)) 245 (repeat :tag "Argument List" :value ("") string))
246 :group 'vc-hg) 246 :group 'vc-hg)
247 247
248(autoload 'vc-setup-buffer "vc-dispatcher")
249
248(defun vc-hg-print-log (files buffer &optional shortlog start-revision limit) 250(defun vc-hg-print-log (files buffer &optional shortlog start-revision limit)
249 "Print commit log associated with FILES into specified BUFFER. 251 "Print commit log associated with FILES into specified BUFFER.
250If SHORTLOG is non-nil, use a short format based on `vc-hg-root-log-format'. 252If SHORTLOG is non-nil, use a short format based on `vc-hg-root-log-format'.
@@ -306,6 +308,8 @@ If LIMIT is non-nil, show no more than this many entries."
306 ("^tag: +\\([^ ]+\\)$" (1 'highlight)) 308 ("^tag: +\\([^ ]+\\)$" (1 'highlight))
307 ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message))))))) 309 ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message)))))))
308 310
311(autoload 'vc-switches "vc")
312
309(defun vc-hg-diff (files &optional oldvers newvers buffer) 313(defun vc-hg-diff (files &optional oldvers newvers buffer)
310 "Get a difference report using hg between two revisions of FILES." 314 "Get a difference report using hg between two revisions of FILES."
311 (let* ((firstfile (car files)) 315 (let* ((firstfile (car files))
@@ -591,6 +595,12 @@ REV is the revision to check out into WORKFILE."
591 (forward-line)) 595 (forward-line))
592 (funcall update-function result))) 596 (funcall update-function result)))
593 597
598;; Follows vc-hg-command (or vc-do-async-command), which uses vc-do-command
599;; from vc-dispatcher.
600(declare-function vc-exec-after "vc-dispatcher" (code))
601;; Follows vc-exec-after.
602(declare-function vc-set-async-update "vc-dispatcher" (process-buffer))
603
594(defun vc-hg-dir-status (dir update-function) 604(defun vc-hg-dir-status (dir update-function)
595 (vc-hg-command (current-buffer) 'async dir "status" "-C") 605 (vc-hg-command (current-buffer) 'async dir "status" "-C")
596 (vc-exec-after 606 (vc-exec-after
@@ -651,6 +661,8 @@ REV is the revision to check out into WORKFILE."
651 ;; modified files 661 ;; modified files
652 "Value of `compilation-error-regexp-alist' in *vc-hg* buffers.") 662 "Value of `compilation-error-regexp-alist' in *vc-hg* buffers.")
653 663
664(autoload 'vc-do-async-command "vc-dispatcher")
665
654(defun vc-hg-pull (prompt) 666(defun vc-hg-pull (prompt)
655 "Issue a Mercurial pull command. 667 "Issue a Mercurial pull command.
656If called interactively with a set of marked Log View buffers, 668If called interactively with a set of marked Log View buffers,
diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el
index fbfd89561b7..29996fafe92 100644
--- a/lisp/vc/vc-mtn.el
+++ b/lisp/vc/vc-mtn.el
@@ -123,6 +123,9 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
123 ((match-end 2) (push (list (match-string 3) 'added) result)))) 123 ((match-end 2) (push (list (match-string 3) 'added) result))))
124 (funcall update-function result))) 124 (funcall update-function result)))
125 125
126;; -dir-status called from vc-dir, which loads vc, which loads vc-dispatcher.
127(declare-function vc-exec-after "vc-dispatcher" (code))
128
126(defun vc-mtn-dir-status (dir update-function) 129(defun vc-mtn-dir-status (dir update-function)
127 (vc-mtn-command (current-buffer) 'async dir "status") 130 (vc-mtn-command (current-buffer) 'async dir "status")
128 (vc-exec-after 131 (vc-exec-after
@@ -233,6 +236,8 @@ If LIMIT is non-nil, show no more than this many entries."
233;; (defun vc-mtn-show-log-entry (revision) 236;; (defun vc-mtn-show-log-entry (revision)
234;; ) 237;; )
235 238
239(autoload 'vc-switches "vc")
240
236(defun vc-mtn-diff (files &optional rev1 rev2 buffer) 241(defun vc-mtn-diff (files &optional rev1 rev2 buffer)
237 "Get a difference report using monotone between two revisions of FILES." 242 "Get a difference report using monotone between two revisions of FILES."
238 (apply 'vc-mtn-command (or buffer "*vc-diff*") 1 files "diff" 243 (apply 'vc-mtn-command (or buffer "*vc-diff*") 1 files "diff"
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index 0a2fc804e6d..e85494b2156 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -200,6 +200,8 @@ For a description of possible values, see `vc-check-master-templates'."
200 (vc-rcs-state file)))) 200 (vc-rcs-state file))))
201 (vc-rcs-state file))))) 201 (vc-rcs-state file)))))
202 202
203(autoload 'vc-expand-dirs "vc")
204
203(defun vc-rcs-dir-status (dir update-function) 205(defun vc-rcs-dir-status (dir update-function)
204 ;; FIXME: this function should be rewritten or `vc-expand-dirs' 206 ;; FIXME: this function should be rewritten or `vc-expand-dirs'
205 ;; should be changed to take a backend parameter. Using 207 ;; should be changed to take a backend parameter. Using
@@ -270,6 +272,8 @@ When VERSION is given, perform check for that version."
270 ;; RCS is totally file-oriented, so all we have to do is make the directory. 272 ;; RCS is totally file-oriented, so all we have to do is make the directory.
271 (make-directory "RCS")) 273 (make-directory "RCS"))
272 274
275(autoload 'vc-switches "vc")
276
273(defun vc-rcs-register (files &optional rev comment) 277(defun vc-rcs-register (files &optional rev comment)
274 "Register FILES into the RCS version-control system. 278 "Register FILES into the RCS version-control system.
275REV is the optional revision number for the files. COMMENT can be used 279REV is the optional revision number for the files. COMMENT can be used
@@ -821,6 +825,9 @@ systime, or nil if there is none. Also, reposition point."
821;;; Tag system 825;;; Tag system
822;;; 826;;;
823 827
828(autoload 'vc-tag-precondition "vc")
829(declare-function vc-file-tree-walk "vc" (dirname func &rest args))
830
824(defun vc-rcs-create-tag (dir name branchp) 831(defun vc-rcs-create-tag (dir name branchp)
825 (when branchp 832 (when branchp
826 (error "RCS backend does not support module branches")) 833 (error "RCS backend does not support module branches"))
@@ -892,6 +899,8 @@ and CVS."
892 (t "rcs2log"))) 899 (t "rcs2log")))
893 "Path to the `rcs2log' program (normally in `exec-directory').") 900 "Path to the `rcs2log' program (normally in `exec-directory').")
894 901
902(autoload 'vc-buffer-sync "vc-dispatcher")
903
895(defun vc-rcs-update-changelog (files) 904(defun vc-rcs-update-changelog (files)
896 "Default implementation of update-changelog. 905 "Default implementation of update-changelog.
897Uses `rcs2log' which only works for RCS and CVS." 906Uses `rcs2log' which only works for RCS and CVS."
@@ -958,6 +967,8 @@ Uses `rcs2log' which only works for RCS and CVS."
958 nil t) 967 nil t)
959 (replace-match "$\\1$")))) 968 (replace-match "$\\1$"))))
960 969
970(autoload 'vc-rename-master "vc")
971
961(defun vc-rcs-rename-file (old new) 972(defun vc-rcs-rename-file (old new)
962 ;; Just move the master file (using vc-rcs-master-templates). 973 ;; Just move the master file (using vc-rcs-master-templates).
963 (vc-rename-master (vc-name old) new vc-rcs-master-templates)) 974 (vc-rename-master (vc-name old) new vc-rcs-master-templates))
diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el
index d3cf650ddf9..7bce1ea3ba6 100644
--- a/lisp/vc/vc-sccs.el
+++ b/lisp/vc/vc-sccs.el
@@ -155,6 +155,8 @@ For a description of possible values, see `vc-check-master-templates'."
155 (vc-sccs-state file)))) 155 (vc-sccs-state file))))
156 (vc-sccs-state file))) 156 (vc-sccs-state file)))
157 157
158(autoload 'vc-expand-dirs "vc")
159
158(defun vc-sccs-dir-status (dir update-function) 160(defun vc-sccs-dir-status (dir update-function)
159 ;; FIXME: this function should be rewritten, using `vc-expand-dirs' 161 ;; FIXME: this function should be rewritten, using `vc-expand-dirs'
160 ;; is not TRTD because it returns files from multiple backends. 162 ;; is not TRTD because it returns files from multiple backends.
@@ -216,6 +218,8 @@ Optional string REV is a revision."
216 ;; SCCS is totally file-oriented, so all we have to do is make the directory 218 ;; SCCS is totally file-oriented, so all we have to do is make the directory
217 (make-directory "SCCS")) 219 (make-directory "SCCS"))
218 220
221(autoload 'vc-switches "vc")
222
219(defun vc-sccs-register (files &optional rev comment) 223(defun vc-sccs-register (files &optional rev comment)
220 "Register FILES into the SCCS version-control system. 224 "Register FILES into the SCCS version-control system.
221REV is the optional revision number for the file. COMMENT can be used 225REV is the optional revision number for the file. COMMENT can be used
@@ -356,6 +360,9 @@ Remaining arguments are ignored."
356 (vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-name files)) 360 (vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-name files))
357 (when limit 'limit-unsupported)) 361 (when limit 'limit-unsupported))
358 362
363(autoload 'vc-setup-buffer "vc-dispatcher")
364(autoload 'vc-delistify "vc-dispatcher")
365
359;; FIXME use sccsdiff if present? 366;; FIXME use sccsdiff if present?
360(defun vc-sccs-diff (files &optional oldvers newvers buffer) 367(defun vc-sccs-diff (files &optional oldvers newvers buffer)
361 "Get a difference report using SCCS between two filesets." 368 "Get a difference report using SCCS between two filesets."
@@ -432,6 +439,9 @@ Remaining arguments are ignored."
432;;; our own set of name-to-revision mappings. 439;;; our own set of name-to-revision mappings.
433;;; 440;;;
434 441
442(autoload 'vc-tag-precondition "vc")
443(declare-function vc-file-tree-walk "vc" (dirname func &rest args))
444
435(defun vc-sccs-create-tag (dir name branchp) 445(defun vc-sccs-create-tag (dir name branchp)
436 (when branchp 446 (when branchp
437 (error "SCCS backend does not support module branches")) 447 (error "SCCS backend does not support module branches"))
@@ -460,6 +470,8 @@ Remaining arguments are ignored."
460 (goto-char (point-min)) 470 (goto-char (point-min))
461 (re-search-forward "%[A-Z]%" nil t))) 471 (re-search-forward "%[A-Z]%" nil t)))
462 472
473(autoload 'vc-rename-master "vc")
474
463(defun vc-sccs-rename-file (old new) 475(defun vc-sccs-rename-file (old new)
464 ;; Move the master file (using vc-rcs-master-templates). 476 ;; Move the master file (using vc-rcs-master-templates).
465 (vc-rename-master (vc-name old) new vc-sccs-master-templates) 477 (vc-rename-master (vc-name old) new vc-sccs-master-templates)
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index a94bf0d6117..39b107b81b5 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -215,6 +215,9 @@ If you want to force an empty list of arguments, use t."
215 (setq result (cons (list filename state) result))))) 215 (setq result (cons (list filename state) result)))))
216 (funcall callback result))) 216 (funcall callback result)))
217 217
218;; -dir-status called from vc-dir, which loads vc, which loads vc-dispatcher.
219(declare-function vc-exec-after "vc-dispatcher" (code))
220
218(defun vc-svn-dir-status (dir callback) 221(defun vc-svn-dir-status (dir callback)
219 "Run 'svn status' for DIR and update BUFFER via CALLBACK. 222 "Run 'svn status' for DIR and update BUFFER via CALLBACK.
220CALLBACK is called as (CALLBACK RESULT BUFFER), where 223CALLBACK is called as (CALLBACK RESULT BUFFER), where
@@ -293,6 +296,8 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
293 (vc-svn-command "*vc*" 0 "." "checkout" 296 (vc-svn-command "*vc*" 0 "." "checkout"
294 (concat "file://" default-directory "SVN"))) 297 (concat "file://" default-directory "SVN")))
295 298
299(autoload 'vc-switches "vc")
300
296(defun vc-svn-register (files &optional rev comment) 301(defun vc-svn-register (files &optional rev comment)
297 "Register FILES into the SVN version-control system. 302 "Register FILES into the SVN version-control system.
298The COMMENT argument is ignored This does an add but not a commit. 303The COMMENT argument is ignored This does an add but not a commit.
@@ -493,6 +498,8 @@ or svn+ssh://."
493 (require 'add-log) 498 (require 'add-log)
494 (set (make-local-variable 'log-view-per-file-logs) nil)) 499 (set (make-local-variable 'log-view-per-file-logs) nil))
495 500
501(autoload 'vc-setup-buffer "vc-dispatcher")
502
496(defun vc-svn-print-log (files buffer &optional shortlog start-revision limit) 503(defun vc-svn-print-log (files buffer &optional shortlog start-revision limit)
497 "Print commit log associated with FILES into specified BUFFER. 504 "Print commit log associated with FILES into specified BUFFER.
498SHORTLOG is ignored. 505SHORTLOG is ignored.
diff --git a/lisp/wdired.el b/lisp/wdired.el
index 47cd99f45ac..55665fbb6a0 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -239,8 +239,7 @@ See `wdired-mode'."
239 (dired-remember-marks (point-min) (point-max))) 239 (dired-remember-marks (point-min) (point-max)))
240 (set (make-local-variable 'wdired-old-point) (point)) 240 (set (make-local-variable 'wdired-old-point) (point))
241 (set (make-local-variable 'query-replace-skip-read-only) t) 241 (set (make-local-variable 'query-replace-skip-read-only) t)
242 (set (make-local-variable 'isearch-filter-predicate) 242 (add-hook 'isearch-filter-predicates 'wdired-isearch-filter-read-only nil t)
243 'wdired-isearch-filter-read-only)
244 (use-local-map wdired-mode-map) 243 (use-local-map wdired-mode-map)
245 (force-mode-line-update) 244 (force-mode-line-update)
246 (setq buffer-read-only nil) 245 (setq buffer-read-only nil)
@@ -268,9 +267,8 @@ or \\[wdired-abort-changes] to abort changes")))
268 267
269(defun wdired-isearch-filter-read-only (beg end) 268(defun wdired-isearch-filter-read-only (beg end)
270 "Skip matches that have a read-only property." 269 "Skip matches that have a read-only property."
271 (and (isearch-filter-visible beg end) 270 (not (text-property-not-all (min beg end) (max beg end)
272 (not (text-property-not-all (min beg end) (max beg end) 271 'read-only nil)))
273 'read-only nil))))
274 272
275;; Protect the buffer so only the filenames can be changed, and put 273;; Protect the buffer so only the filenames can be changed, and put
276;; properties so filenames (old and new) can be easily found. 274;; properties so filenames (old and new) can be easily found.