sbbs.el

Diff
Login

Differences From Artifact [187923b54c]:

To Artifact [a4c9b26bff]:


   649    649     (interactive)
   650    650     (when (search-backward-regexp "\\(\\*\\*\\|==\\|__\\|~~\\)" nil t)
   651    651       (looking-at (concat "\\(" (regexp-quote (match-string 1)) "\\).*?"
   652    652                           "\\(" (regexp-quote (match-string 1)) "\\)"))
   653    653       (replace-match "" nil nil nil 2)
   654    654       (replace-match "" nil nil nil 1)))
   655    655   
   656         -(defun sbbs-compose-create ()
   657         -  "Upload response or thread to board."
   658         -  (interactive)
          656  +(defun sbbs-compose-create (vip)
          657  +  "Upload response or thread to board.
          658  +If VIP is non-nil (or when invoked with a prefix argument), mark
          659  +the post as \"VIP\", ie. don't bump the thread."
          660  +  (interactive "P")
          661  +  (when (and vip sbbs--thread-id)
          662  +    (user-error "A new thread cannot be VIP"))
   659    663     (let ((board sbbs--board)
   660    664           (url-request-method "POST")
   661    665           (url-request-extra-headers
   662    666            '(("Content-Type" . "application/x-www-form-urlencoded")))
   663    667           (url-request-data
   664    668            (url-build-query-string
   665    669             `((epistula ,(buffer-string))
   666    670               (ornamentum "") (name "") (message "")
   667    671               (frontpage ,(if sbbs--thread-id "true" "false"))
          672  +            (vip ,(if vip "true" "false"))
   668    673               . ,(and (not sbbs--thread-id)
   669    674                       `((titulus ,(read-string "Headline: ")))))))
   670    675           (url (if sbbs--thread-id
   671    676                    (sbbs--board-url (format "%d/post" sbbs--thread-id))
   672    677                  (sbbs--board-url "/post"))))
   673    678       (url-retrieve url (lambda (status buf)
   674    679                           (if (plist-get status :error)