Emacs: Properly prefix scratch message with ";;" on empty lines

master
Pierre Neidhardt 2017-10-22 11:17:41 +01:00
parent 82992ec9a3
commit fcea63fce0
1 changed files with 3 additions and 2 deletions

View File

@ -152,8 +152,9 @@ Work on buffer or region. Require `tabify-leading'."
(when (executable-find "fortune")
(with-temp-buffer
(shell-command "fortune" t)
(let ((comment-start ";;"))
(comment-region (point-min) (point-max)))
(while (not (eobp))
(insert ";; ")
(forward-line))
(delete-trailing-whitespace (point-min) (point-max))
(concat (buffer-string) "\n")))))
(if (called-interactively-p 'any)