# HG changeset patch # User Jim Blandy # Date 667038590 0 # Node ID b6358b876c71f0a2d24e6f580e25af30da463edd # Parent 8428fd468956eaa0fbf55dd5c8f08d33fd2b856c *** empty log message *** diff -r 8428fd468956 -r b6358b876c71 lisp/mouse.el --- a/lisp/mouse.el Thu Feb 07 21:38:20 1991 +0000 +++ b/lisp/mouse.el Wed Feb 20 08:29:50 1991 +0000 @@ -82,9 +82,28 @@ (unwind-protect (progn (mouse-set-point event) (push-mark nil t) - (sleep-for 1)) + (sit-for 1)) (goto-char point-save)))) +(defun mouse-fill-paragraph (event) + "Fill the paragraph at the mouse position." + (interactive "@e") + (save-excursion + (mouse-set-point event) + (fill-paragraph))) + +(defun mouse-fill-paragraph-with-prefix (event) + "Fill the paragraph at the mouse position with specified fill prefix. +Click at the end of the fill prefix that you want; +The text before the mouse position, on the same line, is used as the prefix." + (interactive "@e") + (save-excursion + (mouse-set-point event) + (let ((fill-prefix (buffer-substring (save-excursion (beginning-of-line) + (point)) + (point)))) + (fill-paragraph)))) + (defun mouse-scroll (event) "Scroll point to the mouse position." (interactive "@e")