[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 6e29e82 17/39: Switch to lexical-binding.
From: |
Thierry Volpiatto |
Subject: |
[elpa] master 6e29e82 17/39: Switch to lexical-binding. |
Date: |
Wed, 18 May 2016 18:02:51 +0000 (UTC) |
branch: master
commit 6e29e825fc44a57f98cc988880498f3af6c34014
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>
Switch to lexical-binding.
* async-bytecomp.el: Switch to lex.
* async.el: Switch to lex.
(async-when-done): Fix unused arg.
(async-receive): Same.
* dired-async.el: Switch to lex.
(dired-async-create-files): Remove unused stuff
and fix vars for lex env.
* smtpmail-async.el: Switch to lex.
---
async-bytecomp.el | 2 +-
async.el | 8 ++++----
dired-async.el | 31 +++++++++++--------------------
smtpmail-async.el | 2 +-
4 files changed, 17 insertions(+), 26 deletions(-)
diff --git a/async-bytecomp.el b/async-bytecomp.el
index 54313c0..0e452b1 100644
--- a/async-bytecomp.el
+++ b/async-bytecomp.el
@@ -1,4 +1,4 @@
-;;; async-bytecomp.el --- Async functions to compile elisp files async
+;;; async-bytecomp.el --- Compile elisp files asynchronously -*-
lexical-binding: t -*-
;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
diff --git a/async.el b/async.el
index 080fd34..dc73270 100644
--- a/async.el
+++ b/async.el
@@ -1,4 +1,4 @@
-;;; async.el --- Asynchronous processing in Emacs
+;;; async.el --- Asynchronous processing in Emacs -*- lexical-binding: t -*-
;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
@@ -95,8 +95,8 @@ as follows:
(unless async-debug
(kill-buffer buf)))))
-(defun async-when-done (proc &optional change)
- "Process sentinal used to retrieve the value from the child process."
+(defun async-when-done (proc &optional _change)
+ "Process sentinel used to retrieve the value from the child process."
(when (eq 'exit (process-status proc))
(with-current-buffer (process-buffer proc)
(let ((async-current-process proc))
@@ -201,7 +201,7 @@ its FINISH-FUNC is nil."
(funcall async-callback args))
(async--transmit-sexp (car args) (list 'quote (cdr args))))))
-(defun async-receive (&rest args)
+(defun async-receive ()
"Send the given messages to the asychronous Emacs PROCESS."
(async--receive-sexp))
diff --git a/dired-async.el b/dired-async.el
index 8c09f1f..b253ca2 100644
--- a/dired-async.el
+++ b/dired-async.el
@@ -1,4 +1,4 @@
-;;; dired-async.el --- Copy/move/delete asynchronously in dired.
+;;; dired-async.el --- Asynchronous dired actions -*- lexical-binding: t -*-
;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
@@ -144,19 +144,18 @@ Should take same args as `message'."
(buffer-name b)) b))))
(when buf (kill-buffer buf))))))
+(defvar overwrite-query)
(defun dired-async-create-files (file-creator operation fn-list
name-constructor
- &optional marker-char)
+ &optional _marker-char)
"Same as `dired-create-files' but asynchronous.
See `dired-create-files' for the behavior of arguments."
(setq dired-async-operation nil)
- (let (dired-create-files-failures
- failures async-fn-list
- skipped (success-count 0)
- (total (length fn-list))
- callback)
- (let (to overwrite-query
- overwrite-backup-query) ; for dired-handle-overwrite
+ (setq overwrite-query nil)
+ (let ((total (length fn-list))
+ dired-create-files-failures
+ failures async-fn-list skipped callback)
+ (let (to)
(dolist (from fn-list)
(setq to (funcall name-constructor from))
(if (equal to from)
@@ -175,14 +174,7 @@ Type SPC or `y' to overwrite file `%s',
DEL or `n' to skip to next,
ESC or `q' to not overwrite any of the remaining files,
`!' to overwrite all remaining files with no more questions." to)))
- (dired-query 'overwrite-query
- "Overwrite `%s'?" to))))
- ;; must determine if FROM is marked before file-creator
- ;; gets a chance to delete it (in case of a move).
- (actual-marker-char
- (cond ((integerp marker-char) marker-char)
- (marker-char (dired-file-marker from)) ; slow
- (t nil))))
+ (dired-query 'overwrite-query "Overwrite `%s'?"
to)))))
;; Handle the `dired-copy-file' file-creator specially
;; When copying a directory to another directory or
;; possibly to itself or one of its subdirectories.
@@ -246,9 +238,7 @@ ESC or `q' to not overwrite any of the remaining files,
(format "%s: %d of %d file%s skipped"
operation (length skipped) total
(dired-plural-s total))
- skipped))
- (t (message "%s: %s file%s"
- operation success-count (dired-plural-s success-count))))
+ skipped)))
;; Start async process.
(when async-fn-list
(async-start `(lambda ()
@@ -258,6 +248,7 @@ ESC or `q' to not overwrite any of the remaining files,
(let ((dired-recursive-copies (quote always))
(dired-copy-preserve-time
,dired-copy-preserve-time))
+ (setq overwrite-backup-query nil)
;; Inline `backup-file' as long as it is not
;; available in emacs.
(defalias 'backup-file
diff --git a/smtpmail-async.el b/smtpmail-async.el
index 5ac426d..0a65a98 100644
--- a/smtpmail-async.el
+++ b/smtpmail-async.el
@@ -1,4 +1,4 @@
-;;; smtpmail-async.el --- Send e-mail with smtpmail.el asynchronously
+;;; smtpmail-async.el --- Send e-mail with smtpmail.el asynchronously -*-
lexical-binding: t -*-
;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
- [elpa] master 228ec4b 34/39: Handle errors file by file instead of returning on first error., (continued)
- [elpa] master 228ec4b 34/39: Handle errors file by file instead of returning on first error., Thierry Volpiatto, 2016/05/18
- [elpa] master 0b8fbed 23/39: Remove commented line, no code change., Thierry Volpiatto, 2016/05/18
- [elpa] master 3ec3fb6 02/39: Declare package-alist in async-bytecomp.., Thierry Volpiatto, 2016/05/18
- [elpa] master dd77b81 22/39: Fix formatting the help form in dired-create-files., Thierry Volpiatto, 2016/05/18
- [elpa] master 8d27590 21/39: Finally handle the failures correctly., Thierry Volpiatto, 2016/05/18
- [elpa] master 1763517 14/39: Add comment no code change., Thierry Volpiatto, 2016/05/18
- [elpa] master 9a82294 26/39: DRY use apply., Thierry Volpiatto, 2016/05/18
- [elpa] master 1c57dc3 31/39: Better handling of errors happening on child., Thierry Volpiatto, 2016/05/18
- [elpa] master dd09794 33/39: Fix success message on callback., Thierry Volpiatto, 2016/05/18
- [elpa] master 14170a4 35/39: Add more info in mode-line on failures., Thierry Volpiatto, 2016/05/18
- [elpa] master 6e29e82 17/39: Switch to lexical-binding.,
Thierry Volpiatto <=
- [elpa] master 0e327f7 37/39: Update version number here too., Thierry Volpiatto, 2016/05/18
- [elpa] master 6521911 07/39: Merge pull request #59 from kolewu/kolewu-fix-typo-1, Thierry Volpiatto, 2016/05/18
- [elpa] master cd901e7 12/39: Improve backup-files by handling symlinks and time-stamp errors., Thierry Volpiatto, 2016/05/18
- [elpa] master e8db6cc 36/39: Update pkg file., Thierry Volpiatto, 2016/05/18
- [elpa] master 527c590 38/39: Merge commit '0e327f72bdffc5bc4a1fbc34a8da1b7066e819b3', Thierry Volpiatto, 2016/05/18
- [elpa] master 4c4eba9 19/39: Fix repetition in callback., Thierry Volpiatto, 2016/05/18
- [elpa] master 6552135 32/39: Improve how error buffer is displayed., Thierry Volpiatto, 2016/05/18
- [elpa] master d1cc5e0 04/39: Fix UTF-8 encoding for strings passed to subordinate Emacs, Thierry Volpiatto, 2016/05/18