fuck old shit

pull/4/head
Blake DeMarcy 2017-03-02 20:28:13 -06:00
parent ef0b630ae2
commit ca247bb185
1 changed files with 8 additions and 6 deletions

14
bbj.el
View File

@ -1,12 +1,12 @@
(require 'json) (require 'json)
(require 'cl) (require 'cl)
;; stuff you can touch
(defvar bbj:host "localhost") (defvar bbj:host "localhost")
(defvar bbj:port "7066") (defvar bbj:port "7066")
(defvar bbj:width 80) (defvar bbj:width 80)
;; stuff you shouldnt touch ;; blah blah user servicable parts blah blaheiu hre ;;;;;;;;;;r;r;r;r;;;q;q;;;
(defvar bbj:old-p (eq emacs-major-version 24))
(defvar bbj:logged-in nil) (defvar bbj:logged-in nil)
(defvar bbj:user nil) (defvar bbj:user nil)
(defvar bbj:hash nil) (defvar bbj:hash nil)
@ -364,7 +364,7 @@ and renders the content in the current buffer."
(defun bbj:timestring (epoch) (defun bbj:timestring (epoch)
"Make a cute timestring out of the epoch (for post heads)" "Make a cute timestring out of the epoch (for post heads)"
(format-time-string "%H:%M %a %m/%d/%y" epoch)) (format-time-string "%H:%M %a %m/%d/%y" (seconds-to-time epoch)))
(defun bbj:render-post (object) (defun bbj:render-post (object)
@ -394,9 +394,11 @@ or any of its children."
(defun bbj:render-tag-span (dom) (defun bbj:render-tag-span (dom)
"A slightly modified version of `shr-tag-span' which handles quotes and stuff.." "A slightly modified version of `shr-tag-span' which handles quotes and stuff."
(let ((class (dom-attr dom 'class))) (let ((class (if bbj:old-p
(dolist (sub (dom-children dom)) (assq :class (cdr dom))
(dom-attr dom 'class))))
(dolist (sub (if (consp (car dom)) (cddr (car dom)) (cddr dom)))
(if (stringp sub) (if (stringp sub)
(cond (cond
((equal class "quote") ((equal class "quote")