Skip to content

Commit ef65117

Browse files
MorganJamesSmithjpgrayson
authored andcommitted
stgit.el: Support Emacs versions < 31
Before Emacs 31 `defvar-local' required a default value.`
1 parent d138079 commit ef65117

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

contrib/stgit.el

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,14 @@
6969
(defvar-local stgit-worktree-node nil)
7070
(defvar-local stgit-expanded-patches '(:work :index))
7171
(defvar-local stgit-svn-find-rev-hash nil)
72-
(defvar-local stgit-committed-count)
73-
(defvar-local stgit-show-committed)
74-
(defvar-local stgit-show-ignored)
75-
(defvar-local stgit-show-patch-names)
76-
(defvar-local stgit-show-svn)
77-
(defvar-local stgit-show-unknown)
78-
(defvar-local stgit-show-worktree)
79-
(defvar-local stgit-ewoc)
80-
(defvar-local stgit-edit-patchsym)
81-
(defvar-local stgit-refresh-after-new)
82-
(defvar-local stgit-refresh-after-new)
83-
(defvar-local stgit-sink-to)
84-
(defvar-local stgit-patchsyms)
85-
(defvar-local old-process-sentinel)
86-
(defvar-local stgit-buffer)
72+
(defvar-local stgit-ewoc nil)
73+
(defvar-local stgit-edit-patchsym nil)
74+
(defvar-local stgit-refresh-after-new nil)
75+
(defvar-local stgit-refresh-after-new nil)
76+
(defvar-local stgit-sink-to nil)
77+
(defvar-local stgit-patchsyms nil)
78+
(defvar-local old-process-sentinel nil)
79+
(defvar-local stgit-buffer nil)
8780

8881
(defun stgit-set-default (symbol value)
8982
"Set default value of SYMBOL to VALUE using `set-default' and
@@ -108,6 +101,7 @@ setting in an already-started StGit buffer."
108101
:type 'boolean
109102
:group 'stgit
110103
:link '(variable-link stgit-show-worktree))
104+
(defvar-local stgit-show-worktree stgit-default-show-worktree)
111105

112106
(defcustom stgit-default-show-unknown nil
113107
"Set to non-nil to by default show unknown files a new stgit buffer.
@@ -117,6 +111,7 @@ setting in an already-started StGit buffer."
117111
:type 'boolean
118112
:group 'stgit
119113
:link '(variable-link stgit-show-unknown))
114+
(defvar-local stgit-show-unknown stgit-default-show-unknown)
120115

121116
(defcustom stgit-default-show-ignored nil
122117
"Set to non-nil to by default show ignored files a new stgit buffer.
@@ -126,6 +121,7 @@ setting in an already-started StGit buffer."
126121
:type 'boolean
127122
:group 'stgit
128123
:link '(variable-link stgit-show-ignored))
124+
(defvar-local stgit-show-ignored stgit-default-show-ignored)
129125

130126
(defcustom stgit-default-show-patch-names t
131127
"If non-nil, default to showing patch names in a new stgit buffer.
@@ -135,6 +131,7 @@ to toggle the this setting in an already-started StGit buffer."
135131
:type 'boolean
136132
:group 'stgit
137133
:link '(variable-link stgit-show-patch-names))
134+
(defvar-local stgit-show-patch-names stgit-default-show-patch-names)
138135

139136
(defcustom stgit-default-show-committed nil
140137
"Set to nil to inhibit showing of historical git commits by default.
@@ -146,6 +143,7 @@ shown."
146143
:group 'stgit
147144
:link '(variable-link stgit-default-committed-count)
148145
:link '(variable-link stgit-show-committed))
146+
(defvar-local stgit-show-committed stgit-default-show-committed)
149147

150148
(defcustom stgit-default-committed-count 5
151149
"The number of historical commits to show when `stgit-show-committed'
@@ -154,6 +152,7 @@ is enabled."
154152
:group 'stgit
155153
:link '(variable-link stgit-default-show-committed)
156154
:link '(variable-link stgit-committed-count))
155+
(defvar-local stgit-committed-count stgit-default-committed-count)
157156

158157
(defcustom stgit-default-show-svn t
159158
"Set to non-nil to by default show subversion information in a
@@ -164,6 +163,7 @@ setting in an already-started StGit buffer."
164163
:type 'boolean
165164
:group 'stgit
166165
:link '(variable-link stgit-show-worktree))
166+
(defvar-local stgit-show-svn stgit-default-show-svn)
167167

168168
(defcustom stgit-abbreviate-copies-and-renames t
169169
"If non-nil, abbreviate copies and renames as \"dir/{old -> new}/file\"

0 commit comments

Comments
 (0)