2017-06-08 11:47:56 +02:00
|
|
|
;;; app/twitter/autoload.el -*- lexical-binding: t; -*-
|
2017-04-09 21:55:33 -04:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun =twitter ()
|
|
|
|
(interactive)
|
2017-06-14 21:10:16 +02:00
|
|
|
(+workspace-switch "*Twitter*" t)
|
2017-04-09 21:55:33 -04:00
|
|
|
(delete-other-windows)
|
2017-04-11 18:48:35 -04:00
|
|
|
(condition-case ex
|
|
|
|
(progn
|
2017-06-08 11:47:56 +02:00
|
|
|
(call-interactively #'twit)
|
2017-04-11 18:48:35 -04:00
|
|
|
(unless (get-buffer (car twittering-initial-timeline-spec-string))
|
|
|
|
(error "Failed to open twitter"))
|
|
|
|
(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))))
|
2017-04-09 21:55:33 -04:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +twitter/quit ()
|
|
|
|
(interactive)
|
2017-04-10 22:26:33 -04:00
|
|
|
(when (eq major-mode 'twittering-mode)
|
|
|
|
(twittering-kill-buffer)
|
|
|
|
(+workspace/close-window-or-workspace)))
|
2017-04-09 21:55:33 -04:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +twitter/quit-all ()
|
|
|
|
(interactive)
|
2017-04-10 22:26:33 -04:00
|
|
|
(+workspace/delete "Twitter")
|
|
|
|
(dolist (buf (doom-buffers-in-mode 'twittering-mode))
|
|
|
|
(with-current-buffer buf
|
|
|
|
(twittering-kill-buffer))))
|
2017-04-09 21:55:33 -04:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +twitter/rerender-all ()
|
|
|
|
(interactive)
|
|
|
|
(dolist (buf (doom-buffers-in-mode 'twittering-mode))
|
|
|
|
(with-current-buffer buf
|
|
|
|
(twittering-rerender-timeline-all buf))))
|