Detect dotted lists and don't walk them
This commit is contained in:
@ -252,13 +252,18 @@ This function keeps the sortedness intact."
|
|||||||
"Returns a window config list appliable for SLOT."
|
"Returns a window config list appliable for SLOT."
|
||||||
(list slot (window-state-get nil t) tag))
|
(list slot (window-state-get nil t) tag))
|
||||||
|
|
||||||
|
(defun eyebrowse--dotted-list-p (list)
|
||||||
|
"Non-nil if LIST is terminated by a non-nil value."
|
||||||
|
(cdr (last list)))
|
||||||
|
|
||||||
(defun eyebrowse--walk-window-config (window-config function)
|
(defun eyebrowse--walk-window-config (window-config function)
|
||||||
"Walk through WINDOW-CONFIG and apply FUNCTION to each leaf."
|
"Walk through WINDOW-CONFIG and apply FUNCTION to each leaf."
|
||||||
(dolist (item window-config)
|
(dolist (item window-config)
|
||||||
(when (consp item)
|
(when (consp item)
|
||||||
(when (symbolp (car item))
|
(when (symbolp (car item))
|
||||||
(funcall function item))
|
(funcall function item))
|
||||||
(when (consp (cdr item))
|
(when (and (consp (cdr item))
|
||||||
|
(not (eyebrowse--dotted-list-p (cdr item))))
|
||||||
(eyebrowse--walk-window-config (cdr item) function)))))
|
(eyebrowse--walk-window-config (cdr item) function)))))
|
||||||
|
|
||||||
(defun eyebrowse--fixup-window-config (window-config)
|
(defun eyebrowse--fixup-window-config (window-config)
|
||||||
|
|||||||
Reference in New Issue
Block a user