about summary refs log tree commit diff
path: root/exwm-workspace.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2018-07-14T16·00+0800
committerChris Feng <chris.w.feng@gmail.com>2018-07-14T16·00+0800
commitbc5f0b3ffac4d262d4b8537baae0baf72402d079 (patch)
tree53aef68c2b48afe8c907808ad98235ece354306a /exwm-workspace.el
parent1364f80f09668a16358aa8f509266bae41d55685 (diff)
; Use `derived-mode-p'.
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r--exwm-workspace.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 935d9d14a2..6535e11f27 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -506,7 +506,7 @@ for internal use only."
    (list
     (cond
      ((null current-prefix-arg)
-      (unless (and (eq major-mode 'exwm-mode)
+      (unless (and (derived-mode-p 'exwm-mode)
                    ;; The prompt is invisible in fullscreen mode.
                    (exwm-layout--fullscreen-p))
         (let ((exwm-workspace--prompt-add-allowed t)
@@ -644,7 +644,7 @@ Passing a workspace frame as the first option is for internal use only."
 (defun exwm-workspace-swap (workspace1 workspace2)
   "Interchange position of WORKSPACE1 with that of WORKSPACE2."
   (interactive
-   (unless (and (eq major-mode 'exwm-mode)
+   (unless (and (derived-mode-p 'exwm-mode)
                 ;; The prompt is invisible in fullscreen mode.
                 (exwm-layout--fullscreen-p))
      (let (w1 w2)
@@ -684,7 +684,7 @@ before it."
   (interactive
    (cond
     ((null current-prefix-arg)
-     (unless (and (eq major-mode 'exwm-mode)
+     (unless (and (derived-mode-p 'exwm-mode)
                   ;; The prompt is invisible in fullscreen mode.
                   (exwm-layout--fullscreen-p))
        (list exwm-workspace--current
@@ -921,7 +921,7 @@ INDEX must not exceed the current number of workspaces."
                  (rename-buffer (concat " " (buffer-name)))))))))))
   (when buffer-or-name
     (with-current-buffer buffer-or-name
-      (if (eq major-mode 'exwm-mode)
+      (if (derived-mode-p 'exwm-mode)
           ;; EXWM buffer.
           (if (eq exwm--frame exwm-workspace--current)
               ;; On the current workspace.