[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/olivetti 2304ddc 124/134: Refactoring style: if -> when
From: |
Stefan Monnier |
Subject: |
[elpa] externals/olivetti 2304ddc 124/134: Refactoring style: if -> when for condition cases without else |
Date: |
Thu, 25 Apr 2019 09:57:43 -0400 (EDT) |
branch: externals/olivetti
commit 2304ddc458d745281d54cbf6db5cf018a1df3ca8
Author: Paul W. Rankin <address@hidden>
Commit: Paul W. Rankin <address@hidden>
Refactoring style: if -> when for condition cases without else
---
olivetti.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/olivetti.el b/olivetti.el
index 36899ca..5dbe87d 100644
--- a/olivetti.el
+++ b/olivetti.el
@@ -200,7 +200,7 @@ care that the maximum size is 0."
right-margin (max (round (- margin-total right-fringe)) 0))
(set-window-parameter window 'split-window 'olivetti-split-window)
(set-window-margins window left-margin right-margin))
- (if olivetti-hide-mode-line (olivetti-set-mode-line))))
+ (when olivetti-hide-mode-line (olivetti-set-mode-line))))
(defun olivetti-reset-all-windows ()
"Remove Olivetti's parameters and margins from all windows.
@@ -212,8 +212,8 @@ Cycle through all windows displaying current buffer and call
(defun olivetti-reset-window (window)
"Remove Olivetti's parameters and margins from WINDOW."
- (if (eq (window-parameter window 'split-window) 'olivetti-split-window)
- (set-window-parameter window 'split-window nil))
+ (when (eq (window-parameter window 'split-window) 'olivetti-split-window)
+ (set-window-parameter window 'split-window nil))
(set-window-margins window nil))
(defun olivetti-split-window (&optional window size side pixelwise)
@@ -390,9 +390,9 @@ hidden."
(remove-hook hook 'olivetti-set-environment t))
(olivetti-reset-all-windows)
(olivetti-set-mode-line 'exit)
- (if (and olivetti-recall-visual-line-mode-entry-state
- (not olivetti--visual-line-mode))
- (visual-line-mode 0))
+ (when (and olivetti-recall-visual-line-mode-entry-state
+ (not olivetti--visual-line-mode))
+ (visual-line-mode 0))
(kill-local-variable 'split-window-preferred-function)
(kill-local-variable 'olivetti--visual-line-mode)))
- [elpa] externals/olivetti 9d318be 069/134: Added README to Commentary, (continued)
- [elpa] externals/olivetti 9d318be 069/134: Added README to Commentary, Stefan Monnier, 2019/04/25
- [elpa] externals/olivetti d2c54ac 072/134: Add change-major-mode-hook to reset margins, Stefan Monnier, 2019/04/25
- [elpa] externals/olivetti 5ac4444 085/134: Use GitHub repo screenshot, Stefan Monnier, 2019/04/25
- [elpa] externals/olivetti cefceed 089/134: Added note about buggy display-line-numbers-mode, Stefan Monnier, 2019/04/25
- [elpa] externals/olivetti 9d9f9ce 090/134: Added hints, Stefan Monnier, 2019/04/25
- [elpa] externals/olivetti 988d326 092/134: Use HTTPS for README links, Stefan Monnier, 2019/04/25
- [elpa] externals/olivetti dd9162f 112/134: Documentation improvements, Stefan Monnier, 2019/04/25
- [elpa] externals/olivetti 3facf2b 115/134: Change hooks:, Stefan Monnier, 2019/04/25
- [elpa] externals/olivetti e70adca 121/134: Add safe custom variable properties, Stefan Monnier, 2019/04/25
- [elpa] externals/olivetti 3df740c 122/134: Change top-level customization group wp -> text, Stefan Monnier, 2019/04/25
- [elpa] externals/olivetti 2304ddc 124/134: Refactoring style: if -> when for condition cases without else,
Stefan Monnier <=
- [elpa] externals/olivetti 687f2df 129/134: Require Emacs 24.5, Stefan Monnier, 2019/04/25
- [elpa] externals/olivetti 506b1d9 132/134: Update README/Commentary -- add Emacs 27.x window.c bug, Stefan Monnier, 2019/04/25
- [elpa] externals/olivetti 6917a16 130/134: Remove olivetti-hide-mode-line function & related code, Stefan Monnier, 2019/04/25