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

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

Re: no justify-region


From: Kevin Rodgers
Subject: Re: no justify-region
Date: Thu, 13 Jul 2006 08:56:07 -0600
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

Dan Jacobson wrote:
"M-x apropos justify" shows there is unjustify-region but no
justify-region.

Wait, Info says "A numeric argument to `M-q' causes it to "justify"
the text as well as filling it."

Well, OK, but many users will just do "M-x justi TAB" and find only
justify-current-line and assume the bigwigs never said anything much
justifiable.

(defun justify-region (from to &optional justify nosqueeze to-eop)
"Fill and justify each of the paragraphs in the region between FROM and TO.
A prefix arg means to read JUSTIFY (default: full) interactively.

Optional arguments JUSTIFY, NOSQUEEZE, and TO-EOP are as for `fill-region'."
  (interactive (progn
                 (barf-if-buffer-read-only)
                 (list (region-beginning) (region-end)
                       (if current-prefix-arg
                           (intern (completing-read "Justify (default: full): "
                                                    '("full"
                                                      "left"
                                                      "right"
                                                      "center")
                                                    nil t nil nil "full"))))))
  (fill-region from to (or justify 'full) nosqueeze to-eop))


--
Kevin





reply via email to

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