app/twitter: error handling for =twitter

This commit is contained in:
Henrik Lissner 2017-04-11 18:48:35 -04:00
parent bdf84afe68
commit 3edd12a650

View file

@ -5,12 +5,18 @@
(interactive) (interactive)
(+workspace-switch "Twitter" t) (+workspace-switch "Twitter" t)
(delete-other-windows) (delete-other-windows)
(call-interactively 'twit) (condition-case ex
(switch-to-buffer (car twittering-initial-timeline-spec-string)) (progn
(dolist (name (cdr twittering-initial-timeline-spec-string)) (call-interactively 'twit)
(split-window-horizontally) (unless (get-buffer (car twittering-initial-timeline-spec-string))
(switch-to-buffer name)) (error "Failed to open twitter"))
(balance-windows)) (switch-to-buffer (car twittering-initial-timeline-spec-string))
(dolist (name (cdr twittering-initial-timeline-spec-string))
(split-window-horizontally)
(switch-to-buffer name))
(balance-windows))
('error
(+twitter/quit-all))))
;;;###autoload ;;;###autoload
(defun +twitter/quit () (defun +twitter/quit ()