0

I have paredit configured to work on javascript files. I also have web-mode enabled

It seems to cause a bug in certain situations.

Here is a stack trace I got by trying to clear all the text in an attribute quote:

I get this error

Wrong type argument: number-or-marker-p, nil

And here is the stack trace:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  logand(nil 4)
  (eq (logand (get-text-property pos (quote tag-attr-beg)) 4) 4)
  (and depth end (setq beg (web-mode-attribute-beginning-position end)) (eq (logand (get-text-property pos (quote tag-attr-beg)) 4) 4))
  (if (and depth end (setq beg (web-mode-attribute-beginning-position end)) (eq (logand (get-text-property pos (quote tag-attr-beg)) 4) 4)) (progn (setq depth (1- (get-text-property beg (quote jsx-depth))))))
  (cond ((null pos) (setq end nil)) ((get-text-property pos (quote tag-attr-end)) (setq end pos)) ((get-text-property pos (quote tag-attr)) (setq end (next-single-property-change pos (quote tag-attr-end))) (if (and depth end (setq beg (web-mode-attribute-beginning-position end)) (eq (logand (get-text-property pos (quote tag-attr-beg)) 4) 4)) (progn (setq depth (1- (get-text-property beg (quote jsx-depth)))))) (cond ((not (get-text-property end (quote tag-attr-end))) (setq end nil)) ((and depth (eq depth (get-text-property end (quote jsx-depth))) (not (eq depth (get-text-property end ...))))) ((and depth (eq (1+ depth) (get-text-property end (quote jsx-depth))))) ((and depth (not (eq (1+ depth) (get-text-property end ...)))) (let ((continue (< end ...))) (while continue (setq end (1+ end)) (setq end (next-single-property-change end ...)) (cond (... ...) (... ...) (... ...))))))) (t (setq end nil)))
  (let (beg end depth) (setq depth (get-text-property pos (quote jsx-depth))) (cond ((null pos) (setq end nil)) ((get-text-property pos (quote tag-attr-end)) (setq end pos)) ((get-text-property pos (quote tag-attr)) (setq end (next-single-property-change pos (quote tag-attr-end))) (if (and depth end (setq beg (web-mode-attribute-beginning-position end)) (eq (logand (get-text-property pos ...) 4) 4)) (progn (setq depth (1- (get-text-property beg ...))))) (cond ((not (get-text-property end (quote tag-attr-end))) (setq end nil)) ((and depth (eq depth (get-text-property end ...)) (not (eq depth ...)))) ((and depth (eq (1+ depth) (get-text-property end ...)))) ((and depth (not (eq ... ...))) (let ((continue ...)) (while continue (setq end ...) (setq end ...) (cond ... ... ...)))))) (t (setq end nil))) end)
  web-mode-attribute-end-position(665)
  (web-mode-go (web-mode-attribute-end-position (point)) 1)
  web-mode-attribute-end()
  (cond ((eobp) nil) ((get-text-property pos (quote block-beg)) (web-mode-block-end)) ((get-text-property pos (quote block-token)) (web-mode-block-token-end)) ((get-text-property pos (quote part-token)) (web-mode-part-token-end)) ((get-text-property pos (quote tag-beg)) (web-mode-element-end)) ((get-text-property pos (quote tag-attr)) (web-mode-attribute-end)) ((get-text-property pos (quote tag-type)) (web-mode-tag-end)) ((get-text-property pos (quote jsx-beg)) (web-mode-jsx-end)) (t (let ((forward-sexp-function nil)) (forward-sexp))))
  (while (< _ --dotimes-limit--) (skip-chars-forward "[:space:]") (setq pos (point)) (cond ((eobp) nil) ((get-text-property pos (quote block-beg)) (web-mode-block-end)) ((get-text-property pos (quote block-token)) (web-mode-block-token-end)) ((get-text-property pos (quote part-token)) (web-mode-part-token-end)) ((get-text-property pos (quote tag-beg)) (web-mode-element-end)) ((get-text-property pos (quote tag-attr)) (web-mode-attribute-end)) ((get-text-property pos (quote tag-type)) (web-mode-tag-end)) ((get-text-property pos (quote jsx-beg)) (web-mode-jsx-end)) (t (let ((forward-sexp-function nil)) (forward-sexp)))) (setq _ (1+ _)))
  (let ((--dotimes-limit-- n) (_ 0)) (while (< _ --dotimes-limit--) (skip-chars-forward "[:space:]") (setq pos (point)) (cond ((eobp) nil) ((get-text-property pos (quote block-beg)) (web-mode-block-end)) ((get-text-property pos (quote block-token)) (web-mode-block-token-end)) ((get-text-property pos (quote part-token)) (web-mode-part-token-end)) ((get-text-property pos (quote tag-beg)) (web-mode-element-end)) ((get-text-property pos (quote tag-attr)) (web-mode-attribute-end)) ((get-text-property pos (quote tag-type)) (web-mode-tag-end)) ((get-text-property pos (quote jsx-beg)) (web-mode-jsx-end)) (t (let ((forward-sexp-function nil)) (forward-sexp)))) (setq _ (1+ _))))
  (let (pos) (let ((--dotimes-limit-- n) (_ 0)) (while (< _ --dotimes-limit--) (skip-chars-forward "[:space:]") (setq pos (point)) (cond ((eobp) nil) ((get-text-property pos (quote block-beg)) (web-mode-block-end)) ((get-text-property pos (quote block-token)) (web-mode-block-token-end)) ((get-text-property pos (quote part-token)) (web-mode-part-token-end)) ((get-text-property pos (quote tag-beg)) (web-mode-element-end)) ((get-text-property pos (quote tag-attr)) (web-mode-attribute-end)) ((get-text-property pos (quote tag-type)) (web-mode-tag-end)) ((get-text-property pos (quote jsx-beg)) (web-mode-jsx-end)) (t (let ((forward-sexp-function nil)) (forward-sexp)))) (setq _ (1+ _)))))
  (if (< n 0) (web-mode-backward-sexp (- n)) (let (pos) (let ((--dotimes-limit-- n) (_ 0)) (while (< _ --dotimes-limit--) (skip-chars-forward "[:space:]") (setq pos (point)) (cond ((eobp) nil) ((get-text-property pos (quote block-beg)) (web-mode-block-end)) ((get-text-property pos (quote block-token)) (web-mode-block-token-end)) ((get-text-property pos (quote part-token)) (web-mode-part-token-end)) ((get-text-property pos (quote tag-beg)) (web-mode-element-end)) ((get-text-property pos (quote tag-attr)) (web-mode-attribute-end)) ((get-text-property pos (quote tag-type)) (web-mode-tag-end)) ((get-text-property pos (quote jsx-beg)) (web-mode-jsx-end)) (t (let (...) (forward-sexp)))) (setq _ (1+ _))))))
  web-mode-forward-sexp(1)
  forward-sexp(1)
  paredit-string-start+end-points()
  paredit-kill-line-in-string()
  paredit-kill(nil)
  call-interactively(paredit-kill nil nil)
  command-execute(paredit-kill)
  • could you post an issue on github please. – fxbois Oct 26 '16 at 8:38
  • sure, I was going to but was unsure which repo to add the issue to. – dagda1 Oct 26 '16 at 9:05
  • here it is : github.com/fxbois/web-mode – fxbois Oct 26 '16 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.