[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114131: * lisp/vc/vc-dispatcher.el (vc-run-delayed)
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] trunk r114131: * lisp/vc/vc-dispatcher.el (vc-run-delayed): New macro. |
Date: |
Wed, 04 Sep 2013 21:09:57 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114131
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2013-09-04 17:09:42 -0400
message:
* lisp/vc/vc-dispatcher.el (vc-run-delayed): New macro.
(vc-do-command, vc-set-async-update):
* lisp/vc/vc-mtn.el (vc-mtn-dir-status):
* lisp/vc/vc-hg.el (vc-hg-dir-status, vc-hg-dir-status-files)
(vc-hg-pull, vc-hg-merge-branch):
* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage, vc-git-pull)
(vc-git-merge-branch):
* lisp/vc/vc-cvs.el (vc-cvs-print-log, vc-cvs-dir-status)
(vc-cvs-dir-status-files):
* lisp/vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch, vc-bzr-dir-status)
(vc-bzr-dir-status-files):
* lisp/vc/vc-arch.el (vc-arch-dir-status): Use vc-run-delayed.
* lisp/vc/vc-annotate.el: Use lexical-binding.
(vc-annotate-display-select, vc-annotate): Use vc-run-delayed.
(vc-sentinel-movepoint): Declare.
(vc-annotate): Don't use `goto-line'.
* lisp/vc/vc.el (vc-diff-internal): Prefer a closure to `(lambda...).
(vc-diff-internal, vc-log-internal-common): Use vc-run-delayed.
(vc-sentinel-movepoint): Declare.
* lisp/vc/vc-svn.el: Use lexical-binding.
(vc-svn-dir-status, vc-svn-dir-status-files): Use vc-run-delayed.
* lisp/vc/vc-sccs.el:
* lisp/vc/vc-rcs.el: Use lexical-binding.
modified:
lisp/vc/vc-annotate.el
vcannotate.el-20091113204419-o5vbwnq5f7feedwu-8692
lisp/vc/vc-arch.el vcarch.el-20091113204419-o5vbwnq5f7feedwu-2971
lisp/vc/vc-bzr.el vcbzr.el-20091113204419-o5vbwnq5f7feedwu-5055
lisp/vc/vc-cvs.el vccvs.el-20091113204419-o5vbwnq5f7feedwu-1927
lisp/vc/vc-dispatcher.el
vcdispatcher.el-20091113204419-o5vbwnq5f7feedwu-8662
lisp/vc/vc-git.el vcgit.el-20091113204419-o5vbwnq5f7feedwu-5070
lisp/vc/vc-hg.el vchg.el-20091113204419-o5vbwnq5f7feedwu-5062
lisp/vc/vc-mtn.el vcmtn.el-20091113204419-o5vbwnq5f7feedwu-7300
lisp/vc/vc-rcs.el vcrcs.el-20091113204419-o5vbwnq5f7feedwu-1926
lisp/vc/vc-sccs.el vcsccs.el-20091113204419-o5vbwnq5f7feedwu-1928
lisp/vc/vc-svn.el vcsvn.el-20091113204419-o5vbwnq5f7feedwu-2575
lisp/vc/vc.el vc.el-20091113204419-o5vbwnq5f7feedwu-502
=== modified file 'lisp/vc/vc-annotate.el'
--- a/lisp/vc/vc-annotate.el 2013-01-01 09:11:05 +0000
+++ b/lisp/vc/vc-annotate.el 2013-09-04 21:09:42 +0000
@@ -1,4 +1,4 @@
-;;; vc-annotate.el --- VC Annotate Support
+;;; vc-annotate.el --- VC Annotate Support -*- lexical-binding: t -*-
;; Copyright (C) 1997-1998, 2000-2013 Free Software Foundation, Inc.
@@ -306,9 +306,9 @@
(vc-annotate-display-default (or vc-annotate-ratio 1.0)))
;; One of the auto-scaling modes
((eq vc-annotate-display-mode 'scale)
- (vc-exec-after `(vc-annotate-display-autoscale)))
+ (vc-run-delayed (vc-annotate-display-autoscale)))
((eq vc-annotate-display-mode 'fullscale)
- (vc-exec-after `(vc-annotate-display-autoscale t)))
+ (vc-run-delayed (vc-annotate-display-autoscale t)))
((numberp vc-annotate-display-mode) ; A fixed number of days lookback
(vc-annotate-display-default
(/ vc-annotate-display-mode
@@ -316,6 +316,8 @@
(t (error "No such display mode: %s"
vc-annotate-display-mode))))
+(defvar vc-sentinel-movepoint)
+
;;;###autoload
(defun vc-annotate (file rev &optional display-mode buf move-point-to vc-bk)
"Display the edit history of the current FILE using colors.
@@ -397,16 +399,16 @@
display-mode))))
(with-current-buffer temp-buffer-name
- (vc-exec-after
- `(progn
- ;; Ideally, we'd rather not move point if the user has already
- ;; moved it elsewhere, but really point here is not the position
- ;; of the user's cursor :-(
- (when ,current-line ;(and (bobp))
- (goto-line ,current-line)
- (setq vc-sentinel-movepoint (point)))
- (unless (active-minibuffer-window)
- (message "Annotating... done")))))))
+ (vc-run-delayed
+ ;; Ideally, we'd rather not move point if the user has already
+ ;; moved it elsewhere, but really point here is not the position
+ ;; of the user's cursor :-(
+ (when current-line ;(and (bobp))
+ (goto-char (point-min))
+ (forward-line (1- current-line))
+ (setq vc-sentinel-movepoint (point)))
+ (unless (active-minibuffer-window)
+ (message "Annotating... done"))))))
(defun vc-annotate-prev-revision (prefix)
"Visit the annotation of the revision previous to this one.
@@ -630,7 +632,7 @@
(vc-call-backend vc-annotate-backend 'annotate-current-time))
next-time))))
-(defun vc-default-annotate-current-time (backend)
+(defun vc-default-annotate-current-time (_backend)
"Return the current time, encoded as fractional days."
(vc-annotate-convert-time (current-time)))
=== modified file 'lisp/vc/vc-arch.el'
--- a/lisp/vc/vc-arch.el 2013-05-28 07:01:59 +0000
+++ b/lisp/vc/vc-arch.el 2013-09-04 21:09:42 +0000
@@ -321,8 +321,8 @@
(let ((default-directory dir))
(vc-arch-command t 'async nil "changes"))
;; The updating could be done asynchronously.
- (vc-exec-after
- `(vc-arch-after-dir-status ',callback)))
+ (vc-run-delayed
+ (vc-arch-after-dir-status callback)))
(defun vc-arch-after-dir-status (callback)
(let* ((state-map '(("M " . edited)
=== modified file 'lisp/vc/vc-bzr.el'
--- a/lisp/vc/vc-bzr.el 2013-09-04 00:31:13 +0000
+++ b/lisp/vc/vc-bzr.el 2013-09-04 21:09:42 +0000
@@ -47,6 +47,7 @@
(eval-when-compile
(require 'cl-lib)
+ (require 'vc-dispatcher)
(require 'vc-dir)) ; vc-dir-at-event
;; Clear up the cache to force vc-call to check again and discover
@@ -354,7 +355,7 @@
command (cadr args)
args (cddr args)))
(let ((buf (apply 'vc-bzr-async-command command args)))
- (with-current-buffer buf (vc-exec-after '(vc-compilation-mode 'bzr)))
+ (with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr)))
(vc-set-async-update buf))))
(defun vc-bzr-merge-branch ()
@@ -385,7 +386,7 @@
(command (cadr cmd))
(args (cddr cmd)))
(let ((buf (apply 'vc-bzr-async-command command args)))
- (with-current-buffer buf (vc-exec-after '(vc-compilation-mode 'bzr)))
+ (with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr)))
(vc-set-async-update buf))))
(defun vc-bzr-status (file)
@@ -995,23 +996,23 @@
(defun vc-bzr-dir-status (dir update-function)
"Return a list of conses (file . state) for DIR."
(vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S")
- (vc-exec-after
- `(vc-bzr-after-dir-status (quote ,update-function)
- ;; "bzr status" results are relative to
- ;; the bzr root directory, NOT to the
- ;; directory "bzr status" was invoked in.
- ;; Ugh.
- ;; We pass the relative directory here so
- ;; that `vc-bzr-after-dir-status' can
- ;; frob the results accordingly.
- (file-relative-name ,dir (vc-bzr-root ,dir)))))
+ (vc-run-delayed
+ (vc-bzr-after-dir-status update-function
+ ;; "bzr status" results are relative to
+ ;; the bzr root directory, NOT to the
+ ;; directory "bzr status" was invoked in.
+ ;; Ugh.
+ ;; We pass the relative directory here so
+ ;; that `vc-bzr-after-dir-status' can
+ ;; frob the results accordingly.
+ (file-relative-name dir (vc-bzr-root dir)))))
(defun vc-bzr-dir-status-files (dir files _default-state update-function)
"Return a list of conses (file . state) for DIR."
(apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files)
- (vc-exec-after
- `(vc-bzr-after-dir-status (quote ,update-function)
- (file-relative-name ,dir (vc-bzr-root ,dir)))))
+ (vc-run-delayed
+ (vc-bzr-after-dir-status update-function
+ (file-relative-name dir (vc-bzr-root dir)))))
(defvar vc-bzr-shelve-map
(let ((map (make-sparse-keymap)))
=== modified file 'lisp/vc/vc-cvs.el'
--- a/lisp/vc/vc-cvs.el 2013-07-30 03:46:06 +0000
+++ b/lisp/vc/vc-cvs.el 2013-09-04 21:09:42 +0000
@@ -518,7 +518,7 @@
(if (vc-stay-local-p files 'CVS) 'async 0)
files "log")
(with-current-buffer buffer
- (vc-exec-after (vc-rcs-print-log-cleanup)))
+ (vc-run-delayed (vc-rcs-print-log-cleanup)))
(when limit 'limit-unsupported))
(defun vc-cvs-comment-history (file)
@@ -1015,14 +1015,14 @@
;; (vc-cvs-command (current-buffer) 'async
;; (file-relative-name dir)
;; "-f" "-n" "update" "-d" "-P")
- (vc-exec-after
- `(vc-cvs-after-dir-status (quote ,update-function))))))
+ (vc-run-delayed
+ (vc-cvs-after-dir-status update-function)))))
(defun vc-cvs-dir-status-files (dir files _default-state update-function)
"Create a list of conses (file . state) for DIR."
(apply 'vc-cvs-command (current-buffer) 'async dir "-f" "status" files)
- (vc-exec-after
- `(vc-cvs-after-dir-status (quote ,update-function))))
+ (vc-run-delayed
+ (vc-cvs-after-dir-status update-function)))
(defun vc-cvs-file-to-string (file)
"Read the content of FILE and return it as a string."
=== modified file 'lisp/vc/vc-dispatcher.el'
--- a/lisp/vc/vc-dispatcher.el 2013-06-15 02:50:47 +0000
+++ b/lisp/vc/vc-dispatcher.el 2013-09-04 21:09:42 +0000
@@ -198,11 +198,11 @@
;; Normally, we want async code such as sentinels to not move point.
(save-excursion
(goto-char m)
- ;; Each sentinel may move point and the next one should be run
- ;; at that new point. We could get the same result by having
- ;; each sentinel read&set process-mark, but since `cmd' needs
- ;; to work both for async and sync processes, this would be
- ;; difficult to achieve.
+ ;; Each sentinel may move point and the next one should be run
+ ;; at that new point. We could get the same result by having
+ ;; each sentinel read&set process-mark, but since `cmd' needs
+ ;; to work both for async and sync processes, this would be
+ ;; difficult to achieve.
(vc-exec-after code)
(move-marker m (point)))
;; But sometimes the sentinels really want to move point.
@@ -247,6 +247,10 @@
(t (error "Unexpected process state"))))
nil)
+(defmacro vc-run-delayed (&rest body)
+ (declare (indent 0) (debug t))
+ `(vc-exec-after (lambda () ,@body)))
+
(defvar vc-post-command-functions nil
"Hook run at the end of `vc-do-command'.
Each function is called inside the buffer in which the command was run
@@ -328,8 +332,8 @@
(set-process-filter proc 'vc-process-filter)
(setq status proc)
(when vc-command-messages
- (vc-exec-after
- `(message "Running %s in background... done"
',full-command))))
+ (vc-run-delayed
+ (message "Running %s in background... done" full-command))))
;; Run synchronously
(when vc-command-messages
(message "Running %s in foreground..." full-command))
@@ -346,9 +350,9 @@
(if (integerp status) (format "status %d" status) status)))
(when vc-command-messages
(message "Running %s...OK = %d" full-command status))))
- (vc-exec-after
- `(run-hook-with-args 'vc-post-command-functions
- ',command ',file-or-list ',flags))
+ (vc-run-delayed
+ (run-hook-with-args 'vc-post-command-functions
+ command file-or-list flags))
status))))
(defun vc-do-async-command (buffer root command &rest args)
@@ -408,17 +412,17 @@
(cond
((derived-mode-p 'vc-dir-mode)
(with-current-buffer process-buffer
- (vc-exec-after
- `(if (buffer-live-p ,buf)
- (with-current-buffer ,buf
- (vc-dir-refresh))))))
+ (vc-run-delayed
+ (if (buffer-live-p buf)
+ (with-current-buffer buf
+ (vc-dir-refresh))))))
((derived-mode-p 'dired-mode)
(with-current-buffer process-buffer
- (vc-exec-after
- `(and (buffer-live-p ,buf)
- (= (buffer-modified-tick ,buf) ,tick)
- (with-current-buffer ,buf
- (revert-buffer)))))))))
+ (vc-run-delayed
+ (and (buffer-live-p buf)
+ (= (buffer-modified-tick buf) tick)
+ (with-current-buffer buf
+ (revert-buffer)))))))))
;; These functions are used to ensure that the view the user sees is up to date
;; even if the dispatcher client mode has messed with file contents (as in,
=== modified file 'lisp/vc/vc-git.el'
--- a/lisp/vc/vc-git.el 2013-09-04 00:39:34 +0000
+++ b/lisp/vc/vc-git.el 2013-09-04 21:09:42 +0000
@@ -477,8 +477,8 @@
(`diff-index
(vc-git-command (current-buffer) 'async files
"diff-index" "--relative" "-z" "-M" "HEAD" "--")))
- (vc-exec-after
- `(vc-git-after-dir-status-stage ',stage ',files ',update-function)))
+ (vc-run-delayed
+ (vc-git-after-dir-status-stage stage files update-function)))
(defun vc-git-dir-status (_dir update-function)
"Return a list of (FILE STATE EXTRA) entries for DIR."
@@ -726,7 +726,7 @@
command (cadr args)
args (cddr args)))
(apply 'vc-do-async-command buffer root git-program command args)
- (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'git)))
+ (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'git)))
(vc-set-async-update buffer)))
(defun vc-git-merge-branch ()
@@ -746,7 +746,7 @@
nil t)))
(apply 'vc-do-async-command buffer root vc-git-program "merge"
(list merge-source))
- (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'git)))
+ (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'git)))
(vc-set-async-update buffer)))
;;; HISTORY FUNCTIONS
=== modified file 'lisp/vc/vc-hg.el'
--- a/lisp/vc/vc-hg.el 2013-09-04 00:31:13 +0000
+++ b/lisp/vc/vc-hg.el 2013-09-04 21:09:42 +0000
@@ -608,13 +608,13 @@
(defun vc-hg-dir-status (dir update-function)
(vc-hg-command (current-buffer) 'async dir "status" "-C")
- (vc-exec-after
- `(vc-hg-after-dir-status (quote ,update-function))))
+ (vc-run-delayed
+ (vc-hg-after-dir-status update-function)))
(defun vc-hg-dir-status-files (dir files _default-state update-function)
(apply 'vc-hg-command (current-buffer) 'async dir "status" "-C" files)
- (vc-exec-after
- `(vc-hg-after-dir-status (quote ,update-function))))
+ (vc-run-delayed
+ (vc-hg-after-dir-status update-function)))
(defun vc-hg-dir-extra-header (name &rest commands)
(concat (propertize name 'face 'font-lock-type-face)
@@ -708,7 +708,8 @@
args (cddr args)))
(apply 'vc-do-async-command buffer root hg-program
command args)
- (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'hg)))
+ (with-current-buffer buffer
+ (vc-run-delayed (vc-compilation-mode 'hg)))
(vc-set-async-update buffer)))))
(defun vc-hg-merge-branch ()
@@ -717,7 +718,7 @@
(let* ((root (vc-hg-root default-directory))
(buffer (format "*vc-hg : %s*" (expand-file-name root))))
(apply 'vc-do-async-command buffer root vc-hg-program '("merge"))
- (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'hg)))
+ (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'hg)))
(vc-set-async-update buffer)))
;;; Internal functions
=== modified file 'lisp/vc/vc-mtn.el'
--- a/lisp/vc/vc-mtn.el 2013-05-28 07:01:59 +0000
+++ b/lisp/vc/vc-mtn.el 2013-09-04 21:09:42 +0000
@@ -128,8 +128,8 @@
(defun vc-mtn-dir-status (dir update-function)
(vc-mtn-command (current-buffer) 'async dir "status")
- (vc-exec-after
- `(vc-mtn-after-dir-status (quote ,update-function))))
+ (vc-run-delayed
+ (vc-mtn-after-dir-status update-function)))
(defun vc-mtn-working-revision (file)
;; If `mtn' fails or returns status>0, or if the search fails, just
=== modified file 'lisp/vc/vc-rcs.el'
--- a/lisp/vc/vc-rcs.el 2013-05-28 07:01:59 +0000
+++ b/lisp/vc/vc-rcs.el 2013-09-04 21:09:42 +0000
@@ -1,4 +1,4 @@
-;;; vc-rcs.el --- support for RCS version-control
+;;; vc-rcs.el --- support for RCS version-control -*- lexical-binding:t -*-
;; Copyright (C) 1992-2013 Free Software Foundation, Inc.
@@ -520,7 +520,7 @@
;; No, it was some other error: re-signal it.
(signal (car err) (cdr err)))))))))
-(defun vc-rcs-revert (file &optional contents-done)
+(defun vc-rcs-revert (file &optional _contents-done)
"Revert FILE to the version it was based on. If FILE is a directory,
revert all registered files beneath it."
(if (file-directory-p file)
@@ -571,8 +571,8 @@
(when (looking-at "[\b\t\n\v\f\r ]+")
(delete-char (- (match-end 0) (match-beginning 0))))))
-(defun vc-rcs-print-log (files buffer &optional shortlog
- start-revision-ignored limit)
+(defun vc-rcs-print-log (files buffer &optional _shortlog
+ _start-revision-ignored limit)
"Print commit log associated with FILES into specified BUFFER.
Remaining arguments are ignored.
If FILE is a directory the operation is applied to all registered
@@ -853,7 +853,7 @@
(string-match "[0-9]+\\'" rev)
(substring rev (match-beginning 0) (match-end 0)))
-(defun vc-rcs-previous-revision (file rev)
+(defun vc-rcs-previous-revision (_file rev)
"Return the revision number immediately preceding REV for FILE,
or nil if there is no previous revision. This default
implementation works for MAJOR.MINOR-style revision numbers as
@@ -1440,8 +1440,8 @@
;; only the former since it behaves identically to the
;; latter in the absence of "@@".)
sub)
- (cl-flet ((incg (beg end)
- (let ((b beg) (e end) @-holes)
+ (cl-flet ((incg (_beg end)
+ (let ((e end) @-holes)
(while (and asc (< (car asc) e))
(push (pop asc) @-holes))
;; Self-deprecate when work is done.
=== modified file 'lisp/vc/vc-sccs.el'
--- a/lisp/vc/vc-sccs.el 2013-05-28 07:47:11 +0000
+++ b/lisp/vc/vc-sccs.el 2013-09-04 21:09:42 +0000
@@ -1,4 +1,4 @@
-;;; vc-sccs.el --- support for SCCS version-control
+;;; vc-sccs.el --- support for SCCS version-control -*- lexical-binding:t -*-
;; Copyright (C) 1992-2013 Free Software Foundation, Inc.
@@ -101,7 +101,7 @@
;;; Properties of the backend
(defun vc-sccs-revision-granularity () 'file)
-(defun vc-sccs-checkout-model (files) 'locking)
+(defun vc-sccs-checkout-model (_files) 'locking)
;;;
;;; State-querying functions
@@ -321,7 +321,7 @@
(vc-name file) (concat "-r" discard))
(vc-sccs-do-command nil 0 "get" (vc-name file) nil))))
-(defun vc-sccs-revert (file &optional contents-done)
+(defun vc-sccs-revert (file &optional _contents-done)
"Revert FILE to the version it was based on. If FILE is a directory,
revert all subfiles."
(if (file-directory-p file)
@@ -353,7 +353,7 @@
;;; History functions
;;;
-(defun vc-sccs-print-log (files buffer &optional shortlog
start-revision-ignored limit)
+(defun vc-sccs-print-log (files buffer &optional _shortlog
_start-revision-ignored limit)
"Print commit log associated with FILES into specified BUFFER.
Remaining arguments are ignored."
(setq files (vc-expand-dirs files))
@@ -363,6 +363,8 @@
(autoload 'vc-setup-buffer "vc-dispatcher")
(autoload 'vc-delistify "vc-dispatcher")
+(defvar w32-quote-process-args)
+
;; FIXME use sccsdiff if present?
(defun vc-sccs-diff (files &optional oldvers newvers buffer)
"Get a difference report using SCCS between two filesets."
=== modified file 'lisp/vc/vc-svn.el'
--- a/lisp/vc/vc-svn.el 2013-09-04 00:31:13 +0000
+++ b/lisp/vc/vc-svn.el 2013-09-04 21:09:42 +0000
@@ -1,4 +1,4 @@
-;;; vc-svn.el --- non-resident support for Subversion version-control
+;;; vc-svn.el --- non-resident support for Subversion version-control -*-
lexical-binding:t -*-
;; Copyright (C) 2003-2013 Free Software Foundation, Inc.
@@ -115,7 +115,7 @@
;;; Properties of the backend
(defun vc-svn-revision-granularity () 'repository)
-(defun vc-svn-checkout-model (files) 'implicit)
+(defun vc-svn-checkout-model (_files) 'implicit)
;;;
;;; State-querying functions
@@ -231,13 +231,13 @@
(remote (or t (not local) (eq local 'only-file))))
(vc-svn-command (current-buffer) 'async nil "status"
(if remote "-u"))
- (vc-exec-after
- `(vc-svn-after-dir-status (quote ,callback) ,remote))))
+ (vc-run-delayed
+ (vc-svn-after-dir-status callback remote))))
-(defun vc-svn-dir-status-files (dir files default-state callback)
+(defun vc-svn-dir-status-files (dir files _default-state callback)
(apply 'vc-svn-command (current-buffer) 'async nil "status" files)
- (vc-exec-after
- `(vc-svn-after-dir-status (quote ,callback))))
+ (vc-run-delayed
+ (vc-svn-after-dir-status callback)))
(defun vc-svn-dir-extra-headers (dir)
"Generate extra status headers for a Subversion working copy."
@@ -268,7 +268,7 @@
;; vc-svn-mode-line-string doesn't exist because the default implementation
;; works just fine.
-(defun vc-svn-previous-revision (file rev)
+(defun vc-svn-previous-revision (_file rev)
(let ((newrev (1- (string-to-number rev))))
(when (< 0 newrev)
(number-to-string newrev))))
@@ -298,7 +298,7 @@
(autoload 'vc-switches "vc")
-(defun vc-svn-register (files &optional rev comment)
+(defun vc-svn-register (files &optional _rev _comment)
"Register FILES into the SVN version-control system.
The COMMENT argument is ignored This does an add but not a commit.
Passes either `vc-svn-register-switches' or `vc-register-switches'
@@ -314,7 +314,7 @@
"Return non-nil if FILE could be registered in SVN.
This is only possible if SVN is responsible for FILE's directory.")
-(defun vc-svn-checkin (files rev comment &optional extra-args-ignored)
+(defun vc-svn-checkin (files rev comment &optional _extra-args-ignored)
"SVN-specific version of `vc-backend-checkin'."
(if rev (error "Committing to a specific revision is unsupported in SVN"))
(let ((status (apply
@@ -357,7 +357,7 @@
FILE is a file wildcard, relative to the root directory of DIRECTORY."
(vc-svn-command t 0 file "propedit" "svn:ignore"))
-(defun vc-svn-ignore-completion-table (file)
+(defun vc-svn-ignore-completion-table (_file)
"Return the list of ignored files."
)
@@ -368,7 +368,7 @@
(vc-mode-line file 'SVN)
(message "Checking out %s...done" file))
-(defun vc-svn-update (file editable rev switches)
+(defun vc-svn-update (file _editable rev switches)
(if (and (file-exists-p file) (not rev))
;; If no revision was specified, there's nothing to do.
nil
@@ -457,7 +457,7 @@
(error "Couldn't analyze svn update result")))
(message "Merging changes into %s...done" file))))
-(defun vc-svn-modify-change-comment (files rev comment)
+(defun vc-svn-modify-change-comment (_files rev comment)
"Modify the change comments for a specified REV.
You must have ssh access to the repository host, and the directory Emacs
uses locally for temp files must also be writable by you on that host.
@@ -509,7 +509,7 @@
(autoload 'vc-setup-buffer "vc-dispatcher")
-(defun vc-svn-print-log (files buffer &optional shortlog start-revision limit)
+(defun vc-svn-print-log (files buffer &optional _shortlog start-revision limit)
"Print commit log associated with FILES into specified BUFFER.
SHORTLOG is ignored.
If START-REVISION is non-nil, it is the newest revision to show.
=== modified file 'lisp/vc/vc.el'
--- a/lisp/vc/vc.el 2013-09-04 00:39:34 +0000
+++ b/lisp/vc/vc.el 2013-09-04 21:09:42 +0000
@@ -1536,11 +1536,11 @@
;; (vc-file-tree-walk
;; default-directory
;; (lambda (f)
-;; (vc-exec-after
-;; `(let ((coding-system-for-read (vc-coding-system-for-diff ',f)))
-;; (message "Looking at %s" ',f)
-;; (vc-call-backend ',(vc-backend f)
-;; 'diff (list ',f) ',rev1 ',rev2))))))
+;; (vc-run-delayed
+;; (let ((coding-system-for-read (vc-coding-system-for-diff f)))
+;; (message "Looking at %s" f)
+;; (vc-call-backend (vc-backend f)
+;; 'diff (list f) rev1 rev2))))))
(defvar vc-coding-system-inherit-eol t
"When non-nil, inherit the EOL format for reading Diff output from the file.
@@ -1678,8 +1678,8 @@
(diff-mode)
(set (make-local-variable 'diff-vc-backend) (car vc-fileset))
(set (make-local-variable 'revert-buffer-function)
- `(lambda (ignore-auto noconfirm)
- (vc-diff-internal ,async ',vc-fileset ,rev1 ,rev2 ,verbose)))
+ (lambda (_ignore-auto _noconfirm)
+ (vc-diff-internal async vc-fileset rev1 rev2 verbose)))
;; Make the *vc-diff* buffer read only, the diff-mode key
;; bindings are nicer for read only buffers. pcl-cvs does the
;; same thing.
@@ -1695,8 +1695,8 @@
;; The diff process may finish early, so call `vc-diff-finish'
;; after `pop-to-buffer'; the former assumes the diff buffer is
;; shown in some window.
- (vc-exec-after `(vc-diff-finish ,(current-buffer)
- ',(when verbose messages)))
+ (let ((buf (current-buffer)))
+ (vc-run-delayed (vc-diff-finish buf (when verbose messages))))
;; In the async case, we return t even if there are no differences
;; because we don't know that yet.
t)))
@@ -2230,6 +2230,7 @@
(defvar vc-log-view-type nil
"Set this to differentiate the different types of logs.")
(put 'vc-log-view-type 'permanent-local t)
+(defvar vc-sentinel-movepoint)
(defun vc-log-internal-common (backend
buffer-name
@@ -2252,13 +2253,13 @@
(set (make-local-variable 'log-view-vc-fileset) files)
(set (make-local-variable 'revert-buffer-function)
rev-buff-func))
- (vc-exec-after
- `(let ((inhibit-read-only t))
- (funcall ',setup-buttons-func ',backend ',files ',retval)
- (shrink-window-if-larger-than-buffer)
- (funcall ',goto-location-func ',backend)
- (setq vc-sentinel-movepoint (point))
- (set-buffer-modified-p nil)))))
+ (vc-run-delayed
+ (let ((inhibit-read-only t))
+ (funcall setup-buttons-func backend files retval)
+ (shrink-window-if-larger-than-buffer)
+ (funcall goto-location-func backend)
+ (setq vc-sentinel-movepoint (point))
+ (set-buffer-modified-p nil)))))
(defun vc-incoming-outgoing-internal (backend remote-location buffer-name type)
(vc-log-internal-common
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114131: * lisp/vc/vc-dispatcher.el (vc-run-delayed): New macro.,
Stefan Monnier <=