Skip to content

Commit 18d346c

Browse files
committed
fix #43: Remove grip-theme option and --theme parameter for go-grip
The latest go-grip does not support the ’--theme‘ parameter. Refer to chrishrb/go-grip@0c40e7d.
1 parent b8b9e60 commit 18d346c

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ Run `M-x customize-group RET grip RET` or set the variables.
8686
;; Command: auto, grip, go-grip or mdopen
8787
(setq grip-command 'auto)
8888
89-
;; Theme choice
90-
(setq grip-theme 'auto)
91-
9289
;; Use embedded webkit to preview
9390
;; This requires GNU/Emacs version >= 26 and built with the `--with-xwidgets` option.
9491
;; mdopen doesn't support webkit preview.

grip-mode.el

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,6 @@
6060
(const :tag "Mdopen" mdopen))
6161
:group 'grip)
6262

63-
(defcustom grip-theme 'auto
64-
"Theme choice."
65-
:type '(choice
66-
(const :tag "Automatic" auto)
67-
(const :tag "Dark" dark)
68-
(const :tag "Light" light))
69-
:group 'grip)
70-
7163
(defcustom grip-preview-use-webkit t
7264
"Use embedded webkit to preview.
7365
@@ -214,8 +206,8 @@ Use default browser unless `xwidget' is available."
214206
grip--command
215207
(abbreviate-file-name buffer-file-name)
216208
(grip--preview-url))))
217-
;; Support real-time refresh
218-
(if grip-real-time-refresh (add-hook 'after-change-functions (function grip--refresh) nil t)))
209+
;; Support real-time refresh
210+
(if grip-real-time-refresh (add-hook 'after-change-functions (function grip--refresh) nil t)))
219211
('go-grip
220212
(unless (executable-find "go-grip")
221213
(grip-mode -1)
@@ -227,7 +219,6 @@ Use default browser unless `xwidget' is available."
227219
(format " *go-grip-%d*" grip--port)
228220
"go-grip"
229221
(format "--port=%d" grip--port)
230-
(format "--theme=%s" grip-theme)
231222
"--browser=false"
232223
"--bounding-box=false"
233224
(format "%s.md" (file-name-base grip--preview-file))))
@@ -289,15 +280,15 @@ Use default browser unless `xwidget' is available."
289280
;; could be killed by other ways, process may not existed, hence
290281
;; deleting the file is separating out for the clean-up process.
291282
(when (and grip--preview-file
292-
(not (string-equal grip--preview-file buffer-file-name)))
283+
(not (string-equal grip--preview-file buffer-file-name)))
293284
(delete-file grip--preview-file)))
294285

295286
(defun grip--preview-md ()
296287
"Render and preview markdown with grip."
297288
(if grip-real-time-refresh
298-
(progn
299-
(setq grip--preview-file (concat buffer-file-name ".temp.md"))
300-
(copy-file buffer-file-name grip--preview-file "overwrite"))
289+
(progn
290+
(setq grip--preview-file (concat buffer-file-name ".temp.md"))
291+
(copy-file buffer-file-name grip--preview-file "overwrite"))
301292
(setq grip--preview-file buffer-file-name))
302293
(grip-start-process))
303294

0 commit comments

Comments
 (0)