841 |
nil |
nil |
842 |
j))) |
j))) |
843 |
|
|
844 |
(defun set-justification (begin end value &optional whole-par) |
(defun set-justification (begin end style &optional whole-par) |
845 |
"Set the region's justification style. |
"Set the region's justification style to STYLE. |
846 |
The kind of justification to use is prompted for. |
This commands prompts for the kind of justification to use. |
847 |
If the mark is not active, this command operates on the current paragraph. |
If the mark is not active, this command operates on the current paragraph. |
848 |
If the mark is active, the region is used. However, if the beginning and end |
If the mark is active, it operates on the region. However, if the |
849 |
of the region are not at paragraph breaks, they are moved to the beginning and |
beginning and end of the region are not at paragraph breaks, they are |
850 |
end of the paragraphs they are in. |
moved to the beginning and end \(respectively) of the paragraphs they |
851 |
|
are in. |
852 |
|
|
853 |
If `use-hard-newlines' is true, all hard newlines are taken to be paragraph |
If `use-hard-newlines' is true, all hard newlines are taken to be paragraph |
854 |
breaks. |
breaks. |
855 |
|
|
883 |
|
|
884 |
(narrow-to-region (point-min) end) |
(narrow-to-region (point-min) end) |
885 |
(unjustify-region begin (point-max)) |
(unjustify-region begin (point-max)) |
886 |
(put-text-property begin (point-max) 'justification value) |
(put-text-property begin (point-max) 'justification style) |
887 |
(fill-region begin (point-max) nil t)))) |
(fill-region begin (point-max) nil t)))) |
888 |
|
|
889 |
(defun set-justification-none (b e) |
(defun set-justification-none (b e) |
895 |
|
|
896 |
(defun set-justification-left (b e) |
(defun set-justification-left (b e) |
897 |
"Make paragraphs in the region left-justified. |
"Make paragraphs in the region left-justified. |
898 |
|
This means they are flush at the left margin and ragged on the right. |
899 |
This is usually the default, but see the variable `default-justification'. |
This is usually the default, but see the variable `default-justification'. |
900 |
If the mark is not active, this applies to the current paragraph." |
If the mark is not active, this applies to the current paragraph." |
901 |
(interactive (list (if mark-active (region-beginning) (point)) |
(interactive (list (if mark-active (region-beginning) (point)) |
904 |
|
|
905 |
(defun set-justification-right (b e) |
(defun set-justification-right (b e) |
906 |
"Make paragraphs in the region right-justified. |
"Make paragraphs in the region right-justified. |
907 |
Flush at the right margin and ragged on the left. |
This means they are flush at the right margin and ragged on the left. |
908 |
If the mark is not active, this applies to the current paragraph." |
If the mark is not active, this applies to the current paragraph." |
909 |
(interactive (list (if mark-active (region-beginning) (point)) |
(interactive (list (if mark-active (region-beginning) (point)) |
910 |
(if mark-active (region-end) (point)))) |
(if mark-active (region-end) (point)))) |