Merge branch 'master' of git@github.com:jsntn/emacs.d.git

This commit is contained in:
Jason TIAN 2023-10-12 22:04:23 +08:00
commit 2f8913ef99

View file

@ -106,7 +106,7 @@ to HTML files."
(erase-buffer) (erase-buffer)
(insert (mapconcat 'identity lines "\n"))) (insert (mapconcat 'identity lines "\n")))
(if sudo (if sudo
(let ((sudo-command (concat "sudo tee " (shell-quote-argument file))) (let* ((sudo-command (concat "sudo tee " (shell-quote-argument file)))
(cmd (concat "echo " (shell-quote-argument (buffer-string)) " | " sudo-command))) (cmd (concat "echo " (shell-quote-argument (buffer-string)) " | " sudo-command)))
(shell-command cmd)) (shell-command cmd))
(write-region (point-min) (point-max) file)))) (write-region (point-min) (point-max) file))))