diff options
| author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-06 16:00:00 +0200 | 
|---|---|---|
| committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-06 16:00:00 +0200 | 
| commit | aa6e9c55152ac1301efbdbdce9aa7fc3e8fea7c9 (patch) | |
| tree | 84f82b715928eed39d22e2534b6ccd94af5fdfae /lisp/mastodon-toot.el | |
| parent | 9bada1a9e3fe2e6a8691e17c697ac56d96eca359 (diff) | |
eval-when-compile for with-mastodon-buffer, and re-indent
Diffstat (limited to 'lisp/mastodon-toot.el')
| -rw-r--r-- | lisp/mastodon-toot.el | 45 | 
1 files changed, 23 insertions, 22 deletions
| diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 1265132..a2fa35f 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -44,13 +44,15 @@  (require 'facemenu)  (require 'text-property-search) +(eval-when-compile +  (require 'mastodon-tl)) +  (defvar mastodon-instance-url)  (defvar mastodon-tl--buffer-spec)  (defvar mastodon-tl--enable-proportional-fonts)  (defvar mastodon-profile-account-settings)  (autoload 'iso8601-parse "iso8601") -(autoload 'with-mastodon-buffer "mastodon")  (autoload 'mastodon-auth--user-acct "mastodon-auth")  (autoload 'mastodon-http--api "mastodon-http")  (autoload 'mastodon-http--build-array-params-alist "mastodon-http") @@ -902,27 +904,26 @@ instance to edit a toot."    (interactive)    (let ((id (mastodon-tl--property 'base-toot-id))          (history (mastodon-tl--property 'edit-history))) -    (with-mastodon-buffer -     "*mastodon-toot-edits*" #'special-mode :other-window -     (let ((count 1)) -       (mapc (lambda (x) -               (insert (propertize (if (= count 1) -                                       (format "%s [original]:\n" count) -                                     (format "%s:\n" count)) -                                   'face font-lock-comment-face) -                       (mastodon-toot--insert-toot-iter x) -                       "\n") -               (cl-incf count)) -             history)) -     (setq-local header-line-format -                 (propertize -                  (format "Edits to toot by %s:" -                          (alist-get 'username -                                     (alist-get 'account (car history)))) -                  'face font-lock-comment-face)) -     (mastodon-tl--set-buffer-spec (buffer-name (current-buffer)) -                                   (format "statuses/%s/history" id) -                                   nil)))) +    (with-mastodon-buffer "*mastodon-toot-edits*" #'special-mode :other-window +      (let ((count 1)) +        (mapc (lambda (x) +                (insert (propertize (if (= count 1) +                                        (format "%s [original]:\n" count) +                                      (format "%s:\n" count)) +                                    'face font-lock-comment-face) +                        (mastodon-toot--insert-toot-iter x) +                        "\n") +                (cl-incf count)) +              history)) +      (setq-local header-line-format +                  (propertize +                   (format "Edits to toot by %s:" +                           (alist-get 'username +                                      (alist-get 'account (car history)))) +                   'face font-lock-comment-face)) +      (mastodon-tl--set-buffer-spec (buffer-name (current-buffer)) +                                    (format "statuses/%s/history" id) +                                    nil))))  (defun mastodon-toot--insert-toot-iter (it)    "Insert iteration IT of toot." | 
