Commit cf738203 authored by Chong Yidong's avatar Chong Yidong
Browse files

(longlines-auto-wrap): Handle argument correctly.

parent 1adf71a4
......@@ -368,10 +368,10 @@ Hard newlines are left intact."
With optional argument ARG, turn on line wrapping if and only if ARG is positive.
If automatic line wrapping is turned on, wrap the entire buffer."
(interactive "P")
(and (null arg)
(null longlines-auto-wrap)
(setq arg 1))
(if (> (prefix-numeric-value arg) 0)
(setq arg (if arg
(> (prefix-numeric-value arg) 0)
(not longlines-auto-wrap)))
(if arg
(let ((mod (buffer-modified-p)))
(setq longlines-auto-wrap t)
(longlines-wrap-region (point-min) (point-max))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment