Skip to content

Commit

Permalink
screenshot: cleanup the code
Browse files Browse the repository at this point in the history
  • Loading branch information
freesteph committed May 1, 2021
1 parent f402d4b commit b18ffae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/take-screenshot.el
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
:width 'normal
:height 180)

(setq org-startup-folded nil)
(setq frame-resize-pixelwise t)
(setf org-startup-folded nil
frame-resize-pixelwise t)

(require 'package)
(package-initialize)
Expand Down Expand Up @@ -90,11 +90,11 @@
(message (error-message-string err)))))

(defun fetch-and-load-theme-inner (theme-name)
"Get and install THEME-NAME of package type KIND and VERSION before taking a screenshot of it."
"Get and install THEME-NAME."
(peach--ensure-clean-install theme-name)
(let ((current-themes (custom-available-themes)))
(peach--install theme-name)
(let ((possible-themes (set-difference (custom-available-themes) current-themes)))
(let ((possible-themes (seq-difference (custom-available-themes) current-themes)))
(if (seq-empty-p possible-themes)
(signal 'peach-no-theme-to-load (list theme-name)))
(toggle-frame-fullscreen)
Expand Down

0 comments on commit b18ffae

Please sign in to comment.