diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2020-08-08 13:49:41 +0200 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-08-09 20:51:16 -0300 |
| commit | dfb1b8eb89e814f4bf6f6e62b700c72aa1b4659a (patch) | |
| tree | 7922098afb904290e399f03f45fd7ad61de31304 /emacs/coolj.el | |
| parent | 18d289c86309ae796e6f027c289b17ccdd38f220 (diff) | |
emacs: Use 'and' instead of 'when' when the return value matters
Also do so for some 'if' forms that lack an ELSE part.
Even go as far as using 'and' and 'not' instead of 'unless'.
Diffstat (limited to 'emacs/coolj.el')
| -rw-r--r-- | emacs/coolj.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/emacs/coolj.el b/emacs/coolj.el index 961db606..39a8de2b 100644 --- a/emacs/coolj.el +++ b/emacs/coolj.el @@ -107,12 +107,12 @@ not need to be wrapped, move point to the next line and return t." If the line should not be broken, return nil; point remains on the line." (move-to-column fill-column) - (if (and (re-search-forward "[^ ]" (line-end-position) 1) - (> (current-column) fill-column)) - ;; This line is too long. Can we break it? - (or (coolj-find-break-backward prefix) - (progn (move-to-column fill-column) - (coolj-find-break-forward))))) + (and (re-search-forward "[^ ]" (line-end-position) 1) + (> (current-column) fill-column) + ;; This line is too long. Can we break it? + (or (coolj-find-break-backward prefix) + (progn (move-to-column fill-column) + (coolj-find-break-forward))))) (defun coolj-find-break-backward (prefix) "Move point backward to the first available breakpoint and return t. |
