@cindex continuation lines, visual wrap prefix
@findex visual-wrap-prefix-mode
+@findex global-visual-wrap-prefix-mode
Normally, the first character of each continuation line is
positioned at the beginning of the screen line where it is displayed.
-The minor mode @code{visual-wrap-prefix-mode} arranges that
-continuation lines be prefixed by slightly adjusted versions of the
-fill prefixes (@pxref{Fill Prefix}) of their respective logical lines,
-so that indentation characters or the prefixes of source code comments
-are replicated across every continuation line, and the appearance of
-such comments or indentation is not broken. These prefixes are only
-shown on display, and does not change the buffer text in any way.
+The minor mode @code{visual-wrap-prefix-mode} and its global
+counterpart @code{global-visual-wrap-prefix-mode} (@pxref{Minor
+Modes}) arranges that continuation lines be prefixed by slightly
+adjusted versions of the fill prefixes (@pxref{Fill Prefix}) of their
+respective logical lines, so that indentation characters or the
+prefixes of source code comments are replicated across every
+continuation line, and the appearance of such comments or indentation
+is not broken. These prefixes are only shown on display, and does not
+change the buffer text in any way.
Sometimes, you may need to edit files containing many long logical
lines, and it may not be practical to break them all up by adding
surrounding context, such that continuation lines are indented on
display as if they were filled with 'M-q' or similar. Unlike 'M-q',
the indentation only happens on display, and doesn't change the buffer
-text in any way.
+text in any way. The global minor mode
+'global-visual-wrap-prefix-mode' enables this minor mode in all
+buffers.
(This minor mode is the 'adaptive-wrap' ELPA package renamed and
lightly edited for inclusion in Emacs.)
;;;###autoload
(define-minor-mode visual-wrap-prefix-mode
- "Display continuation lines with prefixes from surrounding context."
+ "Display continuation lines with prefixes from surrounding context.
+To enable this minor mode across all buffers, enable
+`global-visual-wrap-prefix-mode'."
:lighter ""
:group 'visual-line
(if visual-wrap-prefix-mode
(widen)
(remove-text-properties (point-min) (point-max) '(wrap-prefix nil))))))
+;;;###autoload
+(define-globalized-minor-mode global-visual-wrap-prefix-mode
+ visual-wrap-prefix-mode visual-wrap-prefix-mode
+ :init-value nil
+ :group 'visual-line)
+
(provide 'visual-wrap)
;;; visual-wrap.el ends here