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