From 743e0f41360627cadbc0bb9c9ab66f32656abe01 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Fri, 12 Jan 2024 16:20:29 +0100 Subject: [PATCH] [WIP] --- hackernews.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hackernews.el b/hackernews.el index 176c3d7..82be75e 100644 --- a/hackernews.el +++ b/hackernews.el @@ -627,14 +627,16 @@ Official major mode key bindings: ;;;; Retrieval +;; At top level for Emacs < 24.4. +(defvar json-array-type) +(defvar json-object-type) +(declare-function json-read "json" ()) + (defalias 'hackernews--parse-json (if (fboundp 'json-parse-buffer) (lambda () (json-parse-buffer :object-type 'alist)) (require 'json) - (defvar json-array-type) - (defvar json-object-type) - (declare-function json-read "json") (lambda () (let ((json-array-type 'vector) (json-object-type 'alist))