about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--exwm-floating.el2
-rw-r--r--exwm-input.el4
-rw-r--r--exwm-layout.el6
-rw-r--r--exwm.el10
4 files changed, 12 insertions, 10 deletions
diff --git a/exwm-floating.el b/exwm-floating.el
index 8b1612e42a42..0210492b18e8 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -401,7 +401,7 @@ This is also used by X window containers.")
   "Toggle the current window between floating and non-floating states."
   (interactive)
   (unless (derived-mode-p 'exwm-mode)
-    (cl-return-from 'exwm-floating-toggle-floating))
+    (cl-return-from exwm-floating-toggle-floating))
   (with-current-buffer (window-buffer)
     (if exwm--floating-frame
         (exwm-floating--unset-floating exwm--id)
diff --git a/exwm-input.el b/exwm-input.el
index 6f96d7173803..4c1ce00b1200 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -745,7 +745,7 @@ EXWM will prompt for the key to send.  This command can be prefixed to send
 multiple keys."
   (interactive "p")
   (unless (derived-mode-p 'exwm-mode)
-    (cl-return-from 'exwm-input-send-next-key))
+    (cl-return-from exwm-input-send-next-key))
   (when (> times 12) (setq times 12))
   (let (key keys)
     (dotimes (i times)
@@ -893,7 +893,7 @@ where both ORIGINAL-KEY and SIMULATED-KEY are key sequences."
   "Fake a key event according to the last input key sequence."
   (interactive "p")
   (unless (derived-mode-p 'exwm-mode)
-    (cl-return-from 'exwm-input-send-simulation-key))
+    (cl-return-from exwm-input-send-simulation-key))
   (let ((keys (gethash (this-single-command-keys)
                        exwm-input--simulation-keys)))
     (dotimes (_ times)
diff --git a/exwm-layout.el b/exwm-layout.el
index 19d14d1140c3..847dd36389dc 100644
--- a/exwm-layout.el
+++ b/exwm-layout.el
@@ -147,7 +147,7 @@
   (interactive)
   (unless (and (or id (derived-mode-p 'exwm-mode))
                (not (exwm-layout--fullscreen-p)))
-    (cl-return-from 'exwm-layout-set-fullscreen))
+    (cl-return-from exwm-layout-set-fullscreen))
   (with-current-buffer (if id (exwm--id->buffer id) (window-buffer))
     ;; Expand the X window to fill the whole screen.
     (with-slots (x y width height) (exwm-workspace--get-geometry exwm--frame)
@@ -174,7 +174,7 @@
   (interactive)
   (unless (and (or id (derived-mode-p 'exwm-mode))
                (exwm-layout--fullscreen-p))
-    (cl-return-from 'exwm-layout-unset-fullscreen))
+    (cl-return-from exwm-layout-unset-fullscreen))
   (with-current-buffer (if id (exwm--id->buffer id) (window-buffer))
     (setq exwm--ewmh-state
           (delq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state))
@@ -200,7 +200,7 @@
   "Toggle fullscreen mode."
   (interactive (list (exwm--buffer->id (window-buffer))))
   (unless (or id (derived-mode-p 'exwm-mode))
-    (cl-return-from 'exwm-layout-toggle-fullscreen))
+    (cl-return-from exwm-layout-toggle-fullscreen))
   (when id
     (with-current-buffer (exwm--id->buffer id)
       (if (exwm-layout--fullscreen-p)
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