Git Product home page Git Product logo

terra-mode's People

Contributors

edam avatar edwardbetts avatar elliottslaughter avatar gerrywastaken avatar guoxx avatar holomorph avatar immerrr avatar jd avatar jorams avatar legumbre avatar marsam avatar ptrv avatar ramnes avatar robertcochran avatar rolpereira avatar rrthomas avatar schnouki avatar sergeyklay avatar tarsius avatar v2e4lisp avatar velkyel avatar veprbl avatar vhallac avatar zonuexe avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terra-mode's Issues

Terra-mode is using a now-removed (as of Emacs 27.1) rx.el function, rx-form

A new implementation of rx.el was released in Emacs 27.1, removing the rx-form function altogether. Terra-mode still depends on this function, however, resulting in the mode crashing on load. According to the commit, it was changed shortly after the release of Emacs 26.3, on 2019-09-25. The error message now being thrown is as follows:

Debugger entered--Lisp error: (void-function rx-form)
  (rx-form `(seq symbol-start ,form symbol-end) rx-parent)
  terra--rx-symbol((symbol (regexp "[[:alpha:]_]+[[:alnum:]_]*")))
  rx--translate-compat-form((terra--rx-symbol 1 nil) (symbol (regexp "[[:alpha:]_]+[[:alnum:]_]*")))
  rx--translate-form((symbol (regexp "[[:alpha:]_]+[[:alnum:]_]*")))
  rx--translate((symbol (regexp "[[:alpha:]_]+[[:alnum:]_]*")))
  rx-to-string((symbol (regexp "[[:alpha:]_]+[[:alnum:]_]*")) nogroup)
  (let ((rx-constituents terra-rx-constituents)) (rx-to-string form no-group))
  terra-rx-to-string((symbol (regexp "[[:alpha:]_]+[[:alnum:]_]*")) nogroup)
  (setcdr form (terra-rx-to-string (cadr form-definition) 'nogroup))
  (progn (setcdr form (terra-rx-to-string (cadr form-definition) 'nogroup)))
  (if (and (listp form-definition) (eq ':rx (car form-definition))) (progn (setcdr form (terra-rx-to-string (cadr form-definition) 'nogroup))))
  (when (and (listp form-definition) (eq ':rx (car form-definition))) (setcdr form (terra-rx-to-string (cadr form-definition) 'nogroup)))
  (let ((name (car form)) (form-definition (cdr form))) (when (and (listp form-definition) (eq ':rx (car form-definition))) (setcdr form (terra-rx-to-string (cadr form-definition) 'nogroup))) (push form terra-rx-constituents))
  terra--new-rx-form((terra-name :rx (symbol (regexp "[[:alpha:]_]+[[:alnum:]_]*"))))
  mapc(terra--new-rx-form ((symbol terra--rx-symbol 1 nil) (ws . "[ \11]*") (ws+ . "[ \11]+") (terra-name :rx (symbol (regexp "[[:alpha:]_]+[[:alnum:]_]*"))) (terra-funcname :rx (seq terra-name (* ws "." ws terra-name) (opt ws ":" ws terra-name))) (terra-funcheader :rx (seq (or (seq (symbol "function" "struct" "terra") ws (group-n 1 terra-funcname)) (seq (group-n 1 terra-funcname) ws "=" ws (symbol "function" "struct" "terra"))))) (terra-number :rx (seq (or (seq (+ digit) (opt ".") (* digit)) (seq (* digit) (opt ".") (+ digit))) (opt (regexp "[eE][+-]?[0-9]+")))) (terra-assignment-op :rx (seq "=" (or buffer-end (not (any "="))))) (terra-token :rx (or "+" "-" "*" "/" "%" "^" "#" "==" "~=" "<=" ">=" "<" ">" "=" ";" ":" "," "." ".." "..." "`" "@")) (terra-keyword :rx (symbol "and" "break" "do" "else" "elseif" "end" "for" "function" "goto" "if" "in" "local" "not" "or" "repeat" "return" "then" "until" "while" "defer" "escape" "emit" "import" "quote" "struct" "terra" "var"))))
  (progn (defvar terra-rx-constituents) (defvar rx-parent) (defun terra-rx-to-string (form &optional no-group) "Terra-specific replacement for `rx-to-string'.\n\nSe..." (let ((rx-constituents terra-rx-constituents)) (rx-to-string form no-group))) (defmacro terra-rx (&rest regexps) "Terra-specific replacement for `rx'.\n\nSee `rx' doc..." (cond ((null regexps) (error "No regexp")) ((cdr regexps) (terra-rx-to-string `(and ,@regexps) t)) (t (terra-rx-to-string (car regexps) t)))) (defun terra--new-rx-form (form) "Add FORM definition to `terra-rx' macro.\n\nFORM is ..." (let ((name (car form)) (form-definition (cdr form))) (when (and (listp form-definition) (eq ':rx (car form-definition))) (setcdr form (terra-rx-to-string (cadr form-definition) 'nogroup))) (push form terra-rx-constituents))) (defun terra--rx-symbol (form) (setq form (cdr form)) (setq form (if (eq 1 (length form)) (car form) (append '(or) form))) (rx-form `(seq symbol-start ,form symbol-end) rx-parent)) (setq terra-rx-constituents (copy-sequence rx-constituents)) (unless (assq 'group-n rx-constituents) (defun terra--rx-group-n (form) (concat (format "\\(?%d:" (nth 1 form)) (rx-form `(seq ,@...) ':) "\\)")) (push '(group-n terra--rx-group-n 1 nil) terra-rx-constituents)) (mapc #'terra--new-rx-form `((symbol terra--rx-symbol 1 nil) (ws . "[ \11]*") (ws+ . "[ \11]+") (terra-name :rx (symbol (regexp "[[:alpha:]_]+[[:alnum:]_]*"))) (terra-funcname :rx (seq terra-name (* ws "." ws terra-name) (opt ws ":" ws terra-name))) (terra-funcheader :rx (seq (or (seq ... ws ...) (seq ... ws "=" ws ...)))) (terra-number :rx (seq (or (seq ... ... ...) (seq ... ... ...)) (opt (regexp "[eE][+-]?[0-9]+")))) (terra-assignment-op :rx (seq "=" (or buffer-end (not ...)))) (terra-token :rx (or "+" "-" "*" "/" "%" "^" "#" "==" "~=" "<=" ">=" "<" ">" "=" ";" ":" "," "." ".." "..." "`" "@")) (terra-keyword :rx (symbol "and" "break" "do" "else" "elseif" "end" "for" "function" "goto" "if" "in" "local" "not" "or" "repeat" "return" "then" "until" "while" "defer" "escape" "emit" "import" "quote" "struct" "terra" "var")))))
  eval((progn (defvar terra-rx-constituents) (defvar rx-parent) (defun terra-rx-to-string (form &optional no-group) "Terra-specific replacement for `rx-to-string'.\n\nSe..." (let ((rx-constituents terra-rx-constituents)) (rx-to-string form no-group))) (defmacro terra-rx (&rest regexps) "Terra-specific replacement for `rx'.\n\nSee `rx' doc..." (cond ((null regexps) (error "No regexp")) ((cdr regexps) (terra-rx-to-string `(and ...) t)) (t (terra-rx-to-string (car regexps) t)))) (defun terra--new-rx-form (form) "Add FORM definition to `terra-rx' macro.\n\nFORM is ..." (let ((name (car form)) (form-definition (cdr form))) (when (and (listp form-definition) (eq ':rx (car form-definition))) (setcdr form (terra-rx-to-string (cadr form-definition) 'nogroup))) (push form terra-rx-constituents))) (defun terra--rx-symbol (form) (setq form (cdr form)) (setq form (if (eq 1 (length form)) (car form) (append '(or) form))) (rx-form `(seq symbol-start ,form symbol-end) rx-parent)) (setq terra-rx-constituents (copy-sequence rx-constituents)) (unless (assq 'group-n rx-constituents) (defun terra--rx-group-n (form) (concat (format "\\(?%d:" (nth 1 form)) (rx-form `(seq ...) ':) "\\)")) (push '(group-n terra--rx-group-n 1 nil) terra-rx-constituents)) (mapc #'terra--new-rx-form `((symbol terra--rx-symbol 1 nil) (ws . "[ \11]*") (ws+ . "[ \11]+") (terra-name :rx (symbol (regexp "[[:alpha:]_]+[[:alnum:]_]*"))) (terra-funcname :rx (seq terra-name (* ws "." ws terra-name) (opt ws ":" ws terra-name))) (terra-funcheader :rx (seq (or ... ...))) (terra-number :rx (seq (or ... ...) (opt ...))) (terra-assignment-op :rx (seq "=" (or buffer-end ...))) (terra-token :rx (or "+" "-" "*" "/" "%" "^" "#" "==" "~=" "<=" ">=" "<" ">" "=" ";" ":" "," "." ".." "..." "`" "@")) (terra-keyword :rx (symbol "and" "break" "do" "else" "elseif" "end" "for" "function" "goto" "if" "in" "local" "not" "or" "repeat" "return" "then" "until" "while" "defer" "escape" "emit" "import" "quote" "struct" "terra" "var"))))) nil)
  #f(compiled-function (&rest body) "Like `progn', but evaluates the body at compile time and at\nload time.  In interpreted code, this is entirely equivalent to\n`progn', except that the value of the expression may be (but is\nnot necessarily) computed at load time if eager macro expansion\nis enabled." #<bytecode 0x1fdfc4090ad3>)((defvar terra-rx-constituents) (defvar rx-parent) (defun terra-rx-to-string (form &optional no-group) "Terra-specific replacement for `rx-to-string'.\n\nSe..." (let ((rx-constituents terra-rx-constituents)) (rx-to-string form no-group))) (defmacro terra-rx (&rest regexps) "Terra-specific replacement for `rx'.\n\nSee `rx' doc..." (cond ((null regexps) (error "No regexp")) ((cdr regexps) (terra-rx-to-string `(and ,@regexps) t)) (t (terra-rx-to-string (car regexps) t)))) (defun terra--new-rx-form (form) "Add FORM definition to `terra-rx' macro.\n\nFORM is ..." (let ((name (car form)) (form-definition (cdr form))) (when (and (listp form-definition) (eq ':rx (car form-definition))) (setcdr form (terra-rx-to-string (cadr form-definition) 'nogroup))) (push form terra-rx-constituents))) (defun terra--rx-symbol (form) (setq form (cdr form)) (setq form (if (eq 1 (length form)) (car form) (append '(or) form))) (rx-form `(seq symbol-start ,form symbol-end) rx-parent)) (setq terra-rx-constituents (copy-sequence rx-constituents)) (unless (assq 'group-n rx-constituents) (defun terra--rx-group-n (form) (concat (format "\\(?%d:" (nth 1 form)) (rx-form `(seq ,@...) ':) "\\)")) (push '(group-n terra--rx-group-n 1 nil) terra-rx-constituents)) (mapc #'terra--new-rx-form `((symbol terra--rx-symbol 1 nil) (ws . "[ \11]*") (ws+ . "[ \11]+") (terra-name :rx (symbol (regexp "[[:alpha:]_]+[[:alnum:]_]*"))) (terra-funcname :rx (seq terra-name (* ws "." ws terra-name) (opt ws ":" ws terra-name))) (terra-funcheader :rx (seq (or (seq ... ws ...) (seq ... ws "=" ws ...)))) (terra-number :rx (seq (or (seq ... ... ...) (seq ... ... ...)) (opt (regexp "[eE][+-]?[0-9]+")))) (terra-assignment-op :rx (seq "=" (or buffer-end (not ...)))) (terra-token :rx (or "+" "-" "*" "/" "%" "^" "#" "==" "~=" "<=" ">=" "<" ">" "=" ";" ":" "," "." ".." "..." "`" "@")) (terra-keyword :rx (symbol "and" "break" "do" "else" "elseif" "end" "for" "function" "goto" "if" "in" "local" "not" "or" "repeat" "return" "then" "until" "while" "defer" "escape" "emit" "import" "quote" "struct" "terra" "var")))))
  (eval-and-compile (defvar terra-rx-constituents) (defvar rx-parent) (defun terra-rx-to-string (form &optional no-group) "Terra-specific replacement for `rx-to-string'.\n\nSe..." (let ((rx-constituents terra-rx-constituents)) (rx-to-string form no-group))) (defmacro terra-rx (&rest regexps) "Terra-specific replacement for `rx'.\n\nSee `rx' doc..." (cond ((null regexps) (error "No regexp")) ((cdr regexps) (terra-rx-to-string `(and ,@regexps) t)) (t (terra-rx-to-string (car regexps) t)))) (defun terra--new-rx-form (form) "Add FORM definition to `terra-rx' macro.\n\nFORM is ..." (let ((name (car form)) (form-definition (cdr form))) (when (and (listp form-definition) (eq ':rx (car form-definition))) (setcdr form (terra-rx-to-string (cadr form-definition) 'nogroup))) (push form terra-rx-constituents))) (defun terra--rx-symbol (form) (setq form (cdr form)) (setq form (if (eq 1 (length form)) (car form) (append '(or) form))) (rx-form `(seq symbol-start ,form symbol-end) rx-parent)) (setq terra-rx-constituents (copy-sequence rx-constituents)) (unless (assq 'group-n rx-constituents) (defun terra--rx-group-n (form) (concat (format "\\(?%d:" (nth 1 form)) (rx-form `(seq ,@...) ':) "\\)")) (push '(group-n terra--rx-group-n 1 nil) terra-rx-constituents)) (mapc #'terra--new-rx-form `((symbol terra--rx-symbol 1 nil) (ws . "[ \11]*") (ws+ . "[ \11]+") (terra-name :rx (symbol (regexp "[[:alpha:]_]+[[:alnum:]_]*"))) (terra-funcname :rx (seq terra-name (* ws "." ws terra-name) (opt ws ":" ws terra-name))) (terra-funcheader :rx (seq (or (seq ... ws ...) (seq ... ws "=" ws ...)))) (terra-number :rx (seq (or (seq ... ... ...) (seq ... ... ...)) (opt (regexp "[eE][+-]?[0-9]+")))) (terra-assignment-op :rx (seq "=" (or buffer-end (not ...)))) (terra-token :rx (or "+" "-" "*" "/" "%" "^" "#" "==" "~=" "<=" ">=" "<" ">" "=" ";" ":" "," "." ".." "..." "`" "@")) (terra-keyword :rx (symbol "and" "break" "do" "else" "elseif" "end" "for" "function" "goto" "if" "in" "local" "not" "or" "repeat" "return" "then" "until" "while" "defer" "escape" "emit" "import" "quote" "struct" "terra" "var")))))
  eval-buffer(#<buffer  *load*> nil "/home/seylerius/.emacs.d/.local/straight/build/ter..." nil t)  ; Reading at buffer position 8058
  load-with-code-conversion("/home/seylerius/.emacs.d/.local/straight/build/ter..." "/home/seylerius/.emacs.d/.local/straight/build/ter..." nil t)
  terra-mode()

(Error shortened somewhat)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.