diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2018-03-10T09·28+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2018-03-10T09·28+0800 |
commit | 3f6c609a2b1580d77a9863e205718cbba3872bcb (patch) | |
tree | 1c482e4d6f610633953ff8db19b3160f76e7179a /exwm.el | |
parent | cb8706f91c1c343a9bf392c9deaadc0c42d4dba6 (diff) |
Fix regressions
(exwm-init): Do not signal an error on startup. * exwm-floating.el (exwm-floating-toggle-floating): * exwm-input (exwm-input-send-next-key) (exwm-input-send-simulation-key): * exwm-layout (exwm-layout-set-fullscreen) (exwm-layout-unset-fullscreen, exwm-layout-toggle-fullscreen): Fix incorrect use of `cl-return-from'.
Diffstat (limited to 'exwm.el')
-rw-r--r-- | exwm.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/exwm.el b/exwm.el index 379500b41206..359489ff342a 100644 --- a/exwm.el +++ b/exwm.el @@ -757,7 +757,7 @@ manager. If t, replace it, if nil, abort and ask the user if `ask'." (setq exwm--wmsn-window new-owner)))) ;;;###autoload -(defun exwm-init (&optional frame) +(cl-defun exwm-init (&optional frame) "Initialize EXWM." (interactive) (if frame @@ -765,9 +765,11 @@ manager. If t, replace it, if nil, abort and ask the user if `ask'." (select-frame-set-input-focus frame) (setq frame (selected-frame))) (when (not (eq 'x (framep frame))) - (user-error "Not running under X environment")) + (message "[EXWM] Not running under X environment") + (cl-return-from exwm-init)) (when exwm--connection - (user-error "EXWM already running")) + (exwm--log "EXWM already running") + (cl-return-from exwm-init)) (condition-case err (progn (exwm-enable 'undo) ;never initialize again @@ -809,7 +811,7 @@ manager. If t, replace it, if nil, abort and ask the user if `ask'." ((quit error) (exwm-exit) ;; Rethrow error - (signal (car err) (cdr err))))) + (warn "[EXWM] EXWM fails to start (%s: %s)" (car err) (cdr err))))) ;;;###autoload |