Skip to content

Commit 04559f0

Browse files
MorganJamesSmithjpgrayson
authored andcommitted
stgit.el: Enable lexical-binding
1 parent 402aede commit 04559f0

File tree

1 file changed

+15
-21
lines changed

1 file changed

+15
-21
lines changed

contrib/stgit.el

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; stgit.el --- major mode for StGit interaction
1+
;;; stgit.el --- major mode for StGit interaction -*- lexical-binding: t; -*-
22
;;
33
;; Copyright (C) 2007-2013 David Kågedal
44
;;
@@ -543,20 +543,18 @@ been advised to update the stgit status when necessary.")
543543
(ewoc-invalidate (car stgit-worktree-node) (cdr stgit-worktree-node))))
544544

545545
(defun stgit-run-series-insert-index (ewoc)
546-
;; TODO: non-lexical stuff happening here (`index-node' and `worktree-node').
547-
;; Fix this before enabling lexical binding.
548-
(setq index-node (cons ewoc (ewoc-enter-last ewoc
549-
(make-stgit-patch
550-
:status 'index
551-
:name :index
552-
:desc nil
553-
:empty nil)))
554-
worktree-node (cons ewoc (ewoc-enter-last ewoc
555-
(make-stgit-patch
556-
:status 'work
557-
:name :work
558-
:desc nil
559-
:empty nil)))))
546+
(setq stgit-index-node (cons ewoc (ewoc-enter-last ewoc
547+
(make-stgit-patch
548+
:status 'index
549+
:name :index
550+
:desc nil
551+
:empty nil)))
552+
stgit-worktree-node (cons ewoc (ewoc-enter-last ewoc
553+
(make-stgit-patch
554+
:status 'work
555+
:name :work
556+
:desc nil
557+
:empty nil)))))
560558

561559
(defun stgit-get-position (&optional position)
562560
"Return `stgit-mode' position information at POSITION (point by
@@ -708,9 +706,7 @@ using (make-hash-table :test \='equal)."
708706
:desc desc
709707
:empty empty)))
710708
(forward-line 1)))))))
711-
(let ((inserted-index (not stgit-show-worktree))
712-
index-node
713-
worktree-node)
709+
(let ((inserted-index (not stgit-show-worktree)))
714710
(with-temp-buffer
715711
(let* ((standard-output (current-buffer))
716712
(exit-status (stgit-run-silent "series"
@@ -752,9 +748,7 @@ using (make-hash-table :test \='equal)."
752748
(forward-line 1)))))
753749
(unless inserted-index
754750
(stgit-run-series-insert-index ewoc))
755-
(setq stgit-index-node index-node
756-
stgit-worktree-node worktree-node
757-
stgit-marked-patches (cl-intersection stgit-marked-patches
751+
(setq stgit-marked-patches (cl-intersection stgit-marked-patches
758752
all-patchsyms)))))
759753

760754
(defun stgit-current-branch ()

0 commit comments

Comments
 (0)