Skip to content

Commit

Permalink
null check centaur-tabs-make-tabset
Browse files Browse the repository at this point in the history
Squashes ema2159#227

I'm not sure if this is the best fix (I'm just solving the immediate
problem). Input is appreciated.
  • Loading branch information
realark committed Jun 17, 2024
1 parent 6cf05e5 commit d1e9184
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions centaur-tabs-functions.el
Original file line number Diff line number Diff line change
Expand Up @@ -357,14 +357,15 @@ The result is a list just as long as the number of existing tab sets."
(defun centaur-tabs-make-tabset (name &rest objects)
"Make a new tab set whose name is the string NAME.
It is initialized with tabs build from the list of OBJECTS."
(let* ((tabset (intern name centaur-tabs-tabsets))
(tabs (mapcar #'(lambda (object)
(centaur-tabs-make-tab object tabset))
objects)))
(set tabset tabs)
(centaur-tabs-put-cache tabset 'select (car tabs))
(put tabset 'start 0)
tabset))
(when name ; some buffers don't have a tabset (e.g. org-agenda)
(let* ((tabset (intern name centaur-tabs-tabsets))
(tabs (mapcar #'(lambda (object)
(centaur-tabs-make-tab object tabset))
objects)))
(set tabset tabs)
(centaur-tabs-put-cache tabset 'select (car tabs))
(put tabset 'start 0)
tabset)))

(defsubst centaur-tabs-get-tabset (name)
"Return the tab set whose name is the string NAME.
Expand Down

0 comments on commit d1e9184

Please sign in to comment.