From: Jim Blandy Date: Wed, 20 Feb 1991 08:29:50 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: emacs-19.34~15635 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fe79ff619909a3e7ffd82e32ede5670bad458fec;p=emacs.git *** empty log message *** --- diff --git a/lisp/mouse.el b/lisp/mouse.el index 924bc71d837..9c9bc4921b6 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -82,9 +82,28 @@ Display cursor at that position for a second." (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")