mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-23 21:17:59 +01:00
Rename variable using ‘exwm-workspace’ package prefix; add docstring
* exwm-workspace.el (exwm-workspace--client-p-hash-table): Rename `exwm--client-p-hash-table'.
This commit is contained in:
parent
182ffbed6c
commit
8905e85d34
1 changed files with 6 additions and 4 deletions
|
@ -165,18 +165,20 @@ NIL if FRAME is not a workspace"
|
||||||
"Return t if FRAME is a workspace."
|
"Return t if FRAME is a workspace."
|
||||||
(memq frame exwm-workspace--list))
|
(memq frame exwm-workspace--list))
|
||||||
|
|
||||||
(defvar exwm--client-p-hash-table
|
(defvar exwm-workspace--client-p-hash-table
|
||||||
(make-hash-table :test 'eq :weakness 'key))
|
(make-hash-table :test 'eq :weakness 'key)
|
||||||
|
"Used to cache the results of calling ‘exwm-workspace--client-p’.")
|
||||||
|
|
||||||
(defsubst exwm-workspace--client-p (&optional frame)
|
(defsubst exwm-workspace--client-p (&optional frame)
|
||||||
"Return non-nil if FRAME is an emacsclient frame."
|
"Return non-nil if FRAME is an emacsclient frame."
|
||||||
(let* ((frame (or frame (selected-frame)))
|
(let* ((frame (or frame (selected-frame)))
|
||||||
(cached-value (gethash frame exwm--client-p-hash-table 'absent)))
|
(cached-value
|
||||||
|
(gethash frame exwm-workspace--client-p-hash-table 'absent)))
|
||||||
(if (eq cached-value 'absent)
|
(if (eq cached-value 'absent)
|
||||||
(puthash frame
|
(puthash frame
|
||||||
(or (frame-parameter frame 'client)
|
(or (frame-parameter frame 'client)
|
||||||
(not (display-graphic-p frame)))
|
(not (display-graphic-p frame)))
|
||||||
exwm--client-p-hash-table)
|
exwm-workspace--client-p-hash-table)
|
||||||
cached-value)))
|
cached-value)))
|
||||||
|
|
||||||
(defvar exwm-workspace--switch-map nil
|
(defvar exwm-workspace--switch-map nil
|
||||||
|
|
Loading…
Reference in a new issue