help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Select an entire paragraph


From: Joe Corneli
Subject: Re: Select an entire paragraph
Date: Thu, 18 Aug 2005 16:55:42 -0500

   Is there a way to <snip>

If `mark-paragraph' doesn't do it for you, try `copy-paragraph', below.

(defun copy-paragraph ()
  "Save body of current paragraph to kill ring."
  (interactive)
  (save-excursion
    (let ((beg (progn (forward-paragraph -1)
                      (point)))
          (end (progn (forward-paragraph 1)
                      (point))))
      (kill-ring-save beg end))))


,----  M-x apropos
| forward-paragraph
|   Command: Move forward to end of paragraph.
| [...]
| mark-paragraph
|   Command: Put point at beginning of this paragraph, mark at end.
`----> use it




reply via email to

[Prev in Thread] Current Thread [Next in Thread]