diff options
| author | Basil L. Contovounesios | 2023-09-26 10:12:28 +0200 |
|---|---|---|
| committer | Basil L. Contovounesios | 2023-09-26 10:13:31 +0200 |
| commit | 8d7e498366aaa6bbbbe6f2c18c55b3f0737a7fb9 (patch) | |
| tree | 603835a9de945655dcc2644001be9a9b9e6fdd5a | |
| parent | ff2a02afa63e2e12842c8ebde9274aed5e7b7182 (diff) | |
| download | emacs-8d7e498366aaa6bbbbe6f2c18c55b3f0737a7fb9.tar.gz emacs-8d7e498366aaa6bbbbe6f2c18c55b3f0737a7fb9.zip | |
Fix ediff-toggle-multiframe cond clauses
* lisp/vc/ediff-util.el (ediff-toggle-multiframe): Remove duplicate
cond clause. Fix parentheses so that trailing 'message' is
contained in fallback clause. Fix indentation.
| -rw-r--r-- | lisp/vc/ediff-util.el | 52 |
1 files changed, 22 insertions, 30 deletions
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index 00200f1d1da..be698370b97 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el | |||
| @@ -1269,36 +1269,28 @@ which see." | |||
| 1269 | (or (display-graphic-p) | 1269 | (or (display-graphic-p) |
| 1270 | (user-error "Emacs is not running as a window application")) | 1270 | (user-error "Emacs is not running as a window application")) |
| 1271 | 1271 | ||
| 1272 | (cond ((eq ediff-window-setup-function #'ediff-setup-windows-multiframe) | 1272 | (cond ((eq ediff-window-setup-function #'ediff-setup-windows-multiframe) |
| 1273 | (setq ediff-multiframe nil) | 1273 | (setq ediff-multiframe nil) |
| 1274 | (setq window-setup-func #'ediff-setup-windows-plain) | 1274 | (setq window-setup-func #'ediff-setup-windows-plain) |
| 1275 | (message "ediff is now in `plain' mode")) | 1275 | (message "ediff is now in `plain' mode")) |
| 1276 | ((eq ediff-window-setup-function #'ediff-setup-windows-plain) | 1276 | (t ; (eq ediff-window-setup-function #'ediff-setup-windows-plain) |
| 1277 | (if (and (ediff-buffer-live-p ediff-control-buffer) | 1277 | (if (and (ediff-buffer-live-p ediff-control-buffer) |
| 1278 | (window-live-p ediff-control-window)) | 1278 | (window-live-p ediff-control-window)) |
| 1279 | (set-window-dedicated-p ediff-control-window nil)) | 1279 | (set-window-dedicated-p ediff-control-window nil)) |
| 1280 | (setq ediff-multiframe t) | 1280 | (setq ediff-multiframe t) |
| 1281 | (setq window-setup-func #'ediff-setup-windows-multiframe) | 1281 | (setq window-setup-func #'ediff-setup-windows-multiframe) |
| 1282 | (message "ediff is now in `multiframe' mode")) | 1282 | (message "ediff is now in `multiframe' mode"))) |
| 1283 | (t | 1283 | |
| 1284 | (if (and (ediff-buffer-live-p ediff-control-buffer) | 1284 | ;; change default |
| 1285 | (window-live-p ediff-control-window)) | 1285 | (setq-default ediff-window-setup-function window-setup-func) |
| 1286 | (set-window-dedicated-p ediff-control-window nil)) | 1286 | ;; change in all active ediff sessions |
| 1287 | (setq ediff-multiframe t) | 1287 | (mapc (lambda (buf) (ediff-with-current-buffer buf |
| 1288 | (setq window-setup-func #'ediff-setup-windows-multiframe)) | 1288 | (setq ediff-window-setup-function window-setup-func |
| 1289 | (message "ediff is now in `multiframe' mode")) | 1289 | ediff-window-B nil))) |
| 1290 | 1290 | ediff-session-registry) | |
| 1291 | ;; change default | 1291 | (when (ediff-in-control-buffer-p) |
| 1292 | (setq-default ediff-window-setup-function window-setup-func) | 1292 | (set-window-dedicated-p (selected-window) nil) |
| 1293 | ;; change in all active ediff sessions | 1293 | (ediff-recenter 'no-rehighlight)))) |
| 1294 | (mapc (lambda(buf) (ediff-with-current-buffer buf | ||
| 1295 | (setq ediff-window-setup-function window-setup-func | ||
| 1296 | ediff-window-B nil))) | ||
| 1297 | ediff-session-registry) | ||
| 1298 | (if (ediff-in-control-buffer-p) | ||
| 1299 | (progn | ||
| 1300 | (set-window-dedicated-p (selected-window) nil) | ||
| 1301 | (ediff-recenter 'no-rehighlight))))) | ||
| 1302 | 1294 | ||
| 1303 | 1295 | ||
| 1304 | ;;;###autoload | 1296 | ;;;###autoload |