Commit 615bd7d1 authored by Jonas Bernoulli's avatar Jonas Bernoulli

enable lexical-binding in all libraries

parent 5eec217c
;;; git-rebase.el --- Edit Git rebase files
;;; git-rebase.el --- Edit Git rebase files -*- lexical-binding: t -*-
;; Copyright (C) 2010-2015 The Magit Project Contributors
;;
......
;;; magit-apply.el --- apply Git diffs
;;; magit-apply.el --- apply Git diffs -*- lexical-binding: t -*-
;; Copyright (C) 2010-2015 The Magit Project Contributors
;;
......@@ -39,6 +39,7 @@
;; For `magit-discard-files'
(declare-function magit-checkout-stage 'magit)
(declare-function magit-checkout-read-stage 'magit)
(defvar auto-revert-verbose)
(require 'dired)
......
;;; magit-bisect.el --- bisect support for Magit
;;; magit-bisect.el --- bisect support for Magit -*- lexical-binding: t -*-
;; Copyright (C) 2011-2015 The Magit Project Contributors
;;
......@@ -172,7 +172,7 @@ bisect run'."
(magit-git-wash #'magit-wash-bisect-log "bisect" "log")
(insert ?\n))))
(defun magit-wash-bisect-log (args)
(defun magit-wash-bisect-log (_args)
(let (beg)
(while (progn (setq beg (point-marker))
(re-search-forward "^\\(git bisect [^\n]+\n\\)" nil t))
......
;;; magit-blame.el --- blame support for Magit
;;; magit-blame.el --- blame support for Magit -*- lexical-binding: t -*-
;; Copyright (C) 2012-2015 The Magit Project Contributors
;;
......
;;; magit-commit.el --- create Git commits
;;; magit-commit.el --- create Git commits -*- lexical-binding: t -*-
;; Copyright (C) 2008-2015 The Magit Project Contributors
;;
......@@ -314,7 +314,7 @@ depending on the value of option `magit-commit-squash-confirm'."
(defvar magit-gpg-secret-key-hist nil)
(defun magit-read-gpg-secret-key (prompt &optional initial-input)
(defun magit-read-gpg-secret-key (prompt &optional _initial-input)
(require 'epa)
(let ((keys (--map (list (epg-sub-key-id (car (epg-key-sub-key-list it)))
(-when-let (id-obj (car (epg-key-user-id-list it)))
......
;;; magit-core.el --- core functionality
;;; magit-core.el --- core functionality -*- lexical-binding: t -*-
;; Copyright (C) 2010-2015 The Magit Project Contributors
;;
......
;;; magit-diff.el --- inspect Git diffs
;;; magit-diff.el --- inspect Git diffs -*- lexical-binding: t -*-
;; Copyright (C) 2010-2015 The Magit Project Contributors
;;
......@@ -41,6 +41,8 @@
(declare-function magit-insert-tags-header 'magit)
;; For `magit-diff-while-committing'
(declare-function magit-commit-message-buffer 'magit)
;; For `magit-insert-revision-gravatar'
(defvar gravatar-size)
;; For `magit-show-commit' and `magit-diff-show-or-scroll'
(declare-function magit-blame-chunk-get 'magit-blame)
(declare-function magit-blame-mode 'magit-blame)
......@@ -946,7 +948,7 @@ which, as the name suggests always visits the actual file."
(and (string-match "\\.\\.\\([^.].*\\)?[ \t]*\\'" it)
(match-string 1 it))))))
(unmerged-p (magit-anything-unmerged-p file))
diff hunk line col buffer)
hunk line col buffer)
(when (and rev (magit-rev-head-p rev))
(setq rev nil))
(setq hunk
......@@ -1108,7 +1110,7 @@ commit or stash at point, then prompt for a commit."
rev)
(car magit-refresh-args))))
(with-selected-window win
(condition-case err
(condition-case nil
(funcall fn)
(error
(goto-char (pcase fn
......@@ -1328,7 +1330,7 @@ section or a child thereof."
(magit-delete-line)
(while (looking-at
"^ \\([^ ]+\\) +[0-9]\\{6\\} \\([a-z0-9]\\{40\\}\\) \\(.+\\)$")
(magit-bind-match-strings (side blob name) nil
(magit-bind-match-strings (side _blob name) nil
(pcase side
("result" (setq file name))
("our" (setq orig name))
......
;;; magit-ediff.el --- Ediff extension for Magit
;;; magit-ediff.el --- Ediff extension for Magit -*- lexical-binding: t -*-
;; Copyright (C) 2010-2015 The Magit Project Contributors
;;
......
;;; magit-extras.el --- additional functionality for Magit
;;; magit-extras.el --- additional functionality for Magit -*- lexical-binding: t -*-
;; Copyright (C) 2008-2015 The Magit Project Contributors
;;
......
;;; magit-git.el --- Git functionality
;;; magit-git.el --- Git functionality -*- lexical-binding: t -*-
;; Copyright (C) 2010-2015 The Magit Project Contributors
;;
......@@ -533,7 +533,7 @@ range. Otherwise, it can be any revision or range accepted by
(lwarn '(magit) :error
"Failed to parse Cygwin mount: %S" it))
(ignore-errors (process-lines "mount")))
#'> :key (-lambda ((cyg . win)) (length cyg))))
#'> :key (-lambda ((cyg . _win)) (length cyg))))
"Alist of (CYGWIN . WIN32) directory names.
Sorted from longest to shortest CYGWIN name."
:package-version '(magit . "2.3.0")
......@@ -973,7 +973,8 @@ Return a list of two integers: (A>B B>A)."
it))
(defun magit-format-ref-label (ref &optional head)
(-let [(re face fn) (--first (string-match (car it) ref) magit-ref-namespaces)]
(-let [(_re face fn)
(--first (string-match (car it) ref) magit-ref-namespaces)]
(if fn
(funcall fn ref face)
(propertize (or (match-string 1 ref) ref)
......
;;; magit-log.el --- inspect Git history
;;; magit-log.el --- inspect Git history -*- lexical-binding: t -*-
;; Copyright (C) 2010-2015 The Magit Project Contributors
;;
......@@ -827,7 +827,7 @@ Do not add this to a hook variable."
(format "Type \\<%s>\\[%s] to show more history"
'magit-log-mode-map
'magit-log-double-commit-limit))
'action (lambda (button)
'action (lambda (_button)
(magit-log-double-commit-limit))
'follow-link t
'mouse-face 'magit-section-highlight)))
......
;;; magit-mode.el --- create and refresh Magit buffers
;;; magit-mode.el --- create and refresh Magit buffers -*- lexical-binding: t -*-
;; Copyright (C) 2010-2015 The Magit Project Contributors
;;
......
;;; magit-popup.el --- Define prefix-infix-suffix command combos
;;; magit-popup.el --- Define prefix-infix-suffix command combos -*- lexical-binding: t -*-
;; Copyright (C) 2010-2015 The Magit Project Contributors
;;
......@@ -382,12 +382,12 @@ or `:only' which doesn't change the behaviour."
:use (and v t) :val (and v (match-string 1 v))
:fun (or (nth 3 it) 'read-from-minibuffer)))))
(defun magit-popup-convert-variables (val def)
(defun magit-popup-convert-variables (_val def)
(magit-popup-convert-events def
(make-magit-popup-event
:key (car it) :dsc (cadr it) :fun (nth 2 it) :arg (nth 3 it))))
(defun magit-popup-convert-actions (val def)
(defun magit-popup-convert-actions (_val def)
(magit-popup-convert-events def
(make-magit-popup-event
:key (car it) :dsc (cadr it) :fun (nth 2 it))))
......@@ -822,8 +822,7 @@ TYPE is one of `:action', `:sequence-action', `:switch', or
(defun magit-popup-quit ()
"Quit the current popup command without invoking an action."
(interactive)
(let ((buf (current-buffer))
(winconf magit-popup-previous-winconf))
(let ((winconf magit-popup-previous-winconf))
(if (derived-mode-p 'magit-popup-mode)
(kill-buffer)
(magit-popup-help-mode -1)
......
;;; magit-process.el --- process functionality
;;; magit-process.el --- process functionality -*- lexical-binding: t -*-
;; Copyright (C) 2010-2015 The Magit Project Contributors
;;
......@@ -744,7 +744,7 @@ as argument."
(and (string= comm "git-credential-cache--daemon")
(string= user user-login-name)))
(list-system-processes))
(condition-case err
(condition-case nil
(start-process "git-credential-cache--daemon"
" *git-credential-cache--daemon*"
magit-git-executable
......
;;; magit-remote.el --- transfer Git commits
;;; magit-remote.el --- transfer Git commits -*- lexical-binding: t -*-
;; Copyright (C) 2008-2015 The Magit Project Contributors
;;
......
;;; magit-section.el --- section functionality
;;; magit-section.el --- section functionality -*- lexical-binding: t -*-
;; Copyright (C) 2010-2015 The Magit Project Contributors
;;
......@@ -164,6 +164,10 @@ IDENT has to be a list as returned by `magit-section-ident'."
(pop ident))
section)))
(defvar magit-insert-section--current nil "For internal use only.")
(defvar magit-insert-section--parent nil "For internal use only.")
(defvar magit-insert-section--oldroot nil "For internal use only.")
;;; Commands
;;;; Movement
......@@ -606,10 +610,6 @@ at point."
clauses)))))
;;; Create
(defvar magit-insert-section--current nil "For internal use only.")
(defvar magit-insert-section--parent nil "For internal use only.")
(defvar magit-insert-section--oldroot nil "For internal use only.")
(defvar magit-insert-section-hook nil
"Hook run after `magit-insert-section's BODY.
Avoid using this hook and only ever do so if you know
......
;;; magit-sequence.el --- history manipulation in Magit
;;; magit-sequence.el --- history manipulation in Magit -*- lexical-binding: t -*-
;; Copyright (C) 2011-2015 The Magit Project Contributors
;;
......
;;; magit-stash.el --- stash support for Magit
;;; magit-stash.el --- stash support for Magit -*- lexical-binding: t -*-
;; Copyright (C) 2008-2015 The Magit Project Contributors
;;
......@@ -354,7 +354,7 @@ instead of \"Stashes:\"."
:group 'magit-diff
(hack-dir-local-variables-non-file-buffer))
(defun magit-stash-refresh-buffer (stash _const args files)
(defun magit-stash-refresh-buffer (stash _const _args _files)
(setq header-line-format
(concat
"\s" (propertize (capitalize stash) 'face 'magit-section-heading)
......
;;; magit-utils.el --- various utilities
;;; magit-utils.el --- various utilities -*- lexical-binding: t -*-
;; Copyright (C) 2010-2015 The Magit Project Contributors
;;
......
;;; magit-wip.el --- commit snapshots to work-in-progress refs
;;; magit-wip.el --- commit snapshots to work-in-progress refs -*- lexical-binding: t -*-
;; Copyright (C) 2010-2015 The Magit Project Contributors
;;
......
;;; magit.el --- A Git porcelain inside Emacs
;;; magit.el --- A Git porcelain inside Emacs -*- lexical-binding: t -*-
;; Copyright (C) 2008-2015 The Magit Project Contributors
;;
......@@ -407,6 +407,8 @@ then offer to initialize it as a new repository."
;;;;; Standard Status Sections
(defvar magit-status-sections-hook-1 nil)
(defun magit-status-refresh-buffer ()
(magit-git-exit-code "update-index" "--refresh")
(magit-insert-section (status)
......@@ -727,7 +729,7 @@ Refs are compared with a branch read form the user."
(magit-show-refs-arguments)))
(magit-mode-setup #'magit-refs-mode ref args))
(defun magit-refs-refresh-buffer (&rest ignore)
(defun magit-refs-refresh-buffer (&rest _ignore)
(setq magit-set-buffer-margin-refresh (not magit-show-margin))
(unless (magit-rev-verify (or (car magit-refresh-args) "HEAD"))
(setq magit-refs-show-commit-count nil))
......@@ -2003,7 +2005,7 @@ With a prefix argument annotate the tag.
(magit-read-branch-or-commit "Place tag on")
(let ((args (magit-tag-arguments)))
(when current-prefix-arg
(add-to-list 'args "--annotate"))
(cl-pushnew "--annotate" args))
args)))
(magit-run-git-with-editor "tag" args name rev))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment