restclient.el icon indicating copy to clipboard operation
restclient.el copied to clipboard

and: Symbol’s function definition is void: lexical-let

Open alekks1137 opened this issue 5 years ago • 2 comments

Emacs: 27.1 ~/.emacs (require 'restclient) (add-to-list 'load-path "~/.emacs.d/site-lisp") (require 'restclient-jq)

Error: Debugger entered--Lisp error: (void-function lexical-let) (lexical-let ((var-name (match-string 1 args)) (jq-patt (match-string 2 args))) #'(lambda nil (let ((resp-val (restclient-jq-get-var jq-patt))) (restclient-remove-var var-name) (restclient-set-var var-name resp-val) (message "restclient var [%s = "%s"] " var-name resp-val)))) (and (string-match "\(:[^: \n]+\) \(.\)$" args) (lexical-let ((var-name (match-string 1 args)) (jq-patt (match-string 2 args))) #'(lambda nil (let ((resp-val (restclient-jq-get-var jq-patt))) (restclient-remove-var var-name) (restclient-set-var var-name resp-val) (message "restclient var [%s = "%s"] " var-name resp-val))))) (progn (and (string-match "\(:[^: \n]+\) \(.\)$" args) (lexical-let ((var-name (match-string 1 args)) (jq-patt (match-string 2 args))) #'(lambda nil (let ((resp-val ...)) (restclient-remove-var var-name) (restclient-set-var var-name resp-val) (message "restclient var [%s = "%s"] " var-name resp-val)))))) (unwind-protect (progn (and (string-match "\(:[^: \n]+\) \(.\)$" args) (lexical-let ((var-name (match-string 1 args)) (jq-patt (match-string 2 args))) #'(lambda nil (let (...) (restclient-remove-var var-name) (restclient-set-var var-name resp-val) (message "restclient var [%s = "%s"] " var-name resp-val)))))) (set-match-data save-match-data-internal 'evaporate)) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (and (string-match "\(:[^: \n]+\) \(.\)$" args) (lexical-let ((var-name (match-string 1 args)) (jq-patt (match-string 2 args))) #'(lambda nil (let ... ... ... ...))))) (set-match-data save-match-data-internal 'evaporate))) restclient-jq-json-var-function(":token .userToken" 263) restclient-parse-hook("jq-set-var" 263 ":token .userToken") restclient-http-parse-current-and-do(restclient-http-do nil nil) restclient-http-send-current() funcall-interactively(restclient-http-send-current) call-interactively(restclient-http-send-current nil nil) command-execute(restclient-http-send-current) Anyone has some hint how to solve this?

alekks1137 avatar Sep 08 '20 10:09 alekks1137

It seems restclient-jq depends on cl. Try evaluating this somewhere:

(require 'cl-lib)

glucas avatar Feb 09 '21 02:02 glucas

Adding (eval-when-compile (require 'cl)) to .emacs seems to solve the issue... Thanks anyways

alekks1137 avatar Feb 09 '21 06:02 alekks1137