Skip to content

Commit

Permalink
tweak(super-save): remove the hack (merged upstream)
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Dec 8, 2023
1 parent 192503a commit 3bbe563
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
2 changes: 1 addition & 1 deletion local/straight/versions/default.el
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
("straight.el" . "b3760f5829dba37e855add7323304561eb57a3d4")
("string-inflection" . "50ad54970b3cc79b6b83979bde9889ad9a9e1a9c")
("sudo-edit" . "74eb1e6986461baed9a9269566ff838530b4379b")
("super-save" . "7f5e7f9d6e301e8f329e1ba735aef503077eeed3")
("super-save" . "21132222967f13c47e80b4f6b7cbf31c026a2712")
("svg-lib" . "718d0f76d842919c8bf7fb23dd9cceca69ce9500")
("systemd-mode" . "8742607120fbc440821acbc351fda1e8e68a8806")
("tablist" . "fcd37147121fabdf003a70279cf86fbe08cfac6f")
Expand Down
23 changes: 4 additions & 19 deletions modules/me-editor.el
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,10 @@
:hook (minemacs-first-file . super-save-mode)
:custom
(super-save-silent t)
(super-save-delete-trailing-whitespaces 'except-current-line)
:config
;; TEMP: Add support for auto-saving all buffers (until bbatsov/super-save/pull/44 gets merged)
(defvar super-save-all-buffers t)
(advice-add
'super-save-command :override
(lambda ()
"Save the current buffer if needed."
(dolist (buf (if super-save-all-buffers (buffer-list) (list (current-buffer))))
(with-current-buffer buf
(when (super-save-p)
(super-save-delete-trailing-whitespaces-maybe)
(if super-save-silent
(with-temp-message ""
(let ((inhibit-message t)
(inhibit-redisplay t)
(message-log-max nil))
(basic-save-buffer)))
(basic-save-buffer))))))))
(super-save-all-buffers t)
(super-save-idle-duration 15)
(super-save-auto-save-when-idle t)
(super-save-delete-trailing-whitespaces 'except-current-line))

;; Bind `+yank-region-as-paragraph' (autoloaded from "me-lib.el")
(+nvmap! "gy" #'+kill-region-as-paragraph)
Expand Down

0 comments on commit 3bbe563

Please sign in to comment.