|
1 |
| -;;; stgit.el --- major mode for StGit interaction |
| 1 | +;;; stgit.el --- major mode for StGit interaction -*- lexical-binding: t; -*- |
2 | 2 | ;;
|
3 | 3 | ;; Copyright (C) 2007-2013 David Kågedal
|
4 | 4 | ;;
|
@@ -543,20 +543,18 @@ been advised to update the stgit status when necessary.")
|
543 | 543 | (ewoc-invalidate (car stgit-worktree-node) (cdr stgit-worktree-node))))
|
544 | 544 |
|
545 | 545 | (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))))) |
560 | 558 |
|
561 | 559 | (defun stgit-get-position (&optional position)
|
562 | 560 | "Return `stgit-mode' position information at POSITION (point by
|
@@ -708,9 +706,7 @@ using (make-hash-table :test \='equal)."
|
708 | 706 | :desc desc
|
709 | 707 | :empty empty)))
|
710 | 708 | (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))) |
714 | 710 | (with-temp-buffer
|
715 | 711 | (let* ((standard-output (current-buffer))
|
716 | 712 | (exit-status (stgit-run-silent "series"
|
@@ -752,9 +748,7 @@ using (make-hash-table :test \='equal)."
|
752 | 748 | (forward-line 1)))))
|
753 | 749 | (unless inserted-index
|
754 | 750 | (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 |
758 | 752 | all-patchsyms)))))
|
759 | 753 |
|
760 | 754 | (defun stgit-current-branch ()
|
|
0 commit comments