Debugger entered--Lisp error: (args-out-of-range "-mode" 5)
aref("-mode" 5)
(string (aref line i))
(parinferlib--close-paren\? (string (aref line i)))
(if (parinferlib--close-paren\? (string (aref line i))) (progn (setq remove-count (1+ remove-count))))
(while (< i new-start-x) (if (parinferlib--close-paren\? (string (aref line i))) (progn (setq remove-count (1+ remove-count)))) (setq i (1+ i)))
(let* ((cursor-x (gethash :cursorX result)) (new-start-x (max start-x cursor-x)) (new-end-x (max end-x cursor-x)) (line-no (gethash :lineNo result)) (lines (gethash :lines result)) (line (aref lines line-no)) (remove-count 0) (i start-x)) (while (< i new-start-x) (if (parinferlib--close-paren\? (string (aref line i))) (progn (setq remove-count (1+ remove-count)))) (setq i (1+ i))) (if (> remove-count 0) (progn (let* ((openers (gethash :parenTrailOpeners result)) (new-openers (nbutlast openers remove-count))) (puthash :parenTrailOpeners new-openers result)))) (puthash :parenTrailStartX new-start-x result) (puthash :parenTrailEndX new-end-x result))
(progn (let* ((cursor-x (gethash :cursorX result)) (new-start-x (max start-x cursor-x)) (new-end-x (max end-x cursor-x)) (line-no (gethash :lineNo result)) (lines (gethash :lines result)) (line (aref lines line-no)) (remove-count 0) (i start-x)) (while (< i new-start-x) (if (parinferlib--close-paren\? (string (aref line i))) (progn (setq remove-count (1+ remove-count)))) (setq i (1+ i))) (if (> remove-count 0) (progn (let* ((openers (gethash :parenTrailOpeners result)) (new-openers (nbutlast openers remove-count))) (puthash :parenTrailOpeners new-openers result)))) (puthash :parenTrailStartX new-start-x result) (puthash :parenTrailEndX new-end-x result)))
(if cursor-clamping\? (progn (let* ((cursor-x (gethash :cursorX result)) (new-start-x (max start-x cursor-x)) (new-end-x (max end-x cursor-x)) (line-no (gethash :lineNo result)) (lines (gethash :lines result)) (line (aref lines line-no)) (remove-count 0) (i start-x)) (while (< i new-start-x) (if (parinferlib--close-paren\? (string (aref line i))) (progn (setq remove-count (1+ remove-count)))) (setq i (1+ i))) (if (> remove-count 0) (progn (let* ((openers ...) (new-openers ...)) (puthash :parenTrailOpeners new-openers result)))) (puthash :parenTrailStartX new-start-x result) (puthash :parenTrailEndX new-end-x result))))
(let* ((start-x (gethash :parenTrailStartX result)) (end-x (gethash :parenTrailEndX result)) (cursor-clamping\? (and (parinferlib--cursor-on-right\? result start-x) (not (parinferlib--cursor-in-comment\? result))))) (if cursor-clamping\? (progn (let* ((cursor-x (gethash :cursorX result)) (new-start-x (max start-x cursor-x)) (new-end-x (max end-x cursor-x)) (line-no (gethash :lineNo result)) (lines (gethash :lines result)) (line (aref lines line-no)) (remove-count 0) (i start-x)) (while (< i new-start-x) (if (parinferlib--close-paren\? (string ...)) (progn (setq remove-count ...))) (setq i (1+ i))) (if (> remove-count 0) (progn (let* (... ...) (puthash :parenTrailOpeners new-openers result)))) (puthash :parenTrailStartX new-start-x result) (puthash :parenTrailEndX new-end-x result)))))
parinferlib--clamp-paren-trail-to-cursor(#s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data (:mode :indent :origText "-mode\n;; Keywords: Parinfer\n\n;; This file is not part of GNU Emacs.\n\n;; This program is free software; you can redistribute it and/or\n;; modify it under the terms of the GNU General Public License\n;; as published by the Free Software Foundation; either version 3\n;; of the License, or (at your option) any later version.\n\n;; This program is distributed in the hope that it will be useful,\n;; but WITHOUT ANY WARRANTY; without even the implied warranty of\n;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n;; GNU General Public License for more details.\n\n;; You should have received a copy of the GNU General Public License\n;; along with GNU Emacs; see the file COPYING. If not, write to the\n;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n;; Boston, MA 02110-1301, USA.\n\n;;; Commentary:\n\n;; Extensions of parinfer\n\n;;; Code:\n\n" :origLines ["-mode" ";; Keywords: Parinfer" "" ";; This file is not part of GNU Emacs." "" ";; This program is free software; you can redistribute it and/or" ";; modify it under the terms of the GNU General Public License" ";; as published by the Free Software Foundation; either version 3" ";; of the License, or (at your option) any later version." "" ";; This program is distributed in the hope that it will be useful," ";; but WITHOUT ANY WARRANTY; without even the implied warranty of" ";; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" ";; GNU General Public License for more details." "" ";; You should have received a copy of the GNU General Public License" ";; along with GNU Emacs; see the file COPYING. If not, write to the" ";; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor," ";; Boston, MA 02110-1301, USA." "" ";;; Commentary:" "" ";; Extensions of parinfer" "" ";;; Code:" "" ""] :origCursorX 53 :lines ["-mode" nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] :lineNo 0 :ch "" :x 5 :parenStack nil :tabStops nil :parenTrailLineNo 0 :parenTrailStartX 5 :parenTrailEndX 5 :parenTrailOpeners nil :cursorX 52 :cursorLine 0 :cursorDx nil :previewCursorScope nil :canPreviewCursorScope nil :isInCode t :isEscaping nil :isInStr nil :isInComment nil :commentX nil :quoteDanger nil :trackingIndent nil :skipChar nil :success nil :maxIndent nil :indentDelta 0 :error nil :errorPosCache nil ...)))
(progn (parinferlib--clamp-paren-trail-to-cursor result) (parinferlib--pop-paren-trail result))
(cond (in-str\? (parinferlib--invalidate-paren-trail result)) ((equal mode :indent) (progn (parinferlib--clamp-paren-trail-to-cursor result) (parinferlib--pop-paren-trail result))) ((and (equal mode :paren) (not (equal line-no cursor-line))) (parinferlib--clean-paren-trail result)))
(let* ((in-str\? (gethash :isInStr result)) (mode (gethash :mode result)) (line-no (gethash :lineNo result)) (cursor-line (gethash :cursorLine result))) (cond (in-str\? (parinferlib--invalidate-paren-trail result)) ((equal mode :indent) (progn (parinferlib--clamp-paren-trail-to-cursor result) (parinferlib--pop-paren-trail result))) ((and (equal mode :paren) (not (equal line-no cursor-line))) (parinferlib--clean-paren-trail result))))
parinferlib--finish-new-paren-trail(#s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data (:mode :indent :origText "-mode\n;; Keywords: Parinfer\n\n;; This file is not part of GNU Emacs.\n\n;; This program is free software; you can redistribute it and/or\n;; modify it under the terms of the GNU General Public License\n;; as published by the Free Software Foundation; either version 3\n;; of the License, or (at your option) any later version.\n\n;; This program is distributed in the hope that it will be useful,\n;; but WITHOUT ANY WARRANTY; without even the implied warranty of\n;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n;; GNU General Public License for more details.\n\n;; You should have received a copy of the GNU General Public License\n;; along with GNU Emacs; see the file COPYING. If not, write to the\n;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n;; Boston, MA 02110-1301, USA.\n\n;;; Commentary:\n\n;; Extensions of parinfer\n\n;;; Code:\n\n" :origLines ["-mode" ";; Keywords: Parinfer" "" ";; This file is not part of GNU Emacs." "" ";; This program is free software; you can redistribute it and/or" ";; modify it under the terms of the GNU General Public License" ";; as published by the Free Software Foundation; either version 3" ";; of the License, or (at your option) any later version." "" ";; This program is distributed in the hope that it will be useful," ";; but WITHOUT ANY WARRANTY; without even the implied warranty of" ";; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" ";; GNU General Public License for more details." "" ";; You should have received a copy of the GNU General Public License" ";; along with GNU Emacs; see the file COPYING. If not, write to the" ";; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor," ";; Boston, MA 02110-1301, USA." "" ";;; Commentary:" "" ";; Extensions of parinfer" "" ";;; Code:" "" ""] :origCursorX 53 :lines ["-mode" nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] :lineNo 0 :ch "" :x 5 :parenStack nil :tabStops nil :parenTrailLineNo 0 :parenTrailStartX 5 :parenTrailEndX 5 :parenTrailOpeners nil :cursorX 52 :cursorLine 0 :cursorDx nil :previewCursorScope nil :canPreviewCursorScope nil :isInCode t :isEscaping nil :isInStr nil :isInComment nil :commentX nil :quoteDanger nil :trackingIndent nil :skipChar nil :success nil :maxIndent nil :indentDelta 0 :error nil :errorPosCache nil ...)))
(progn (parinferlib--finish-new-paren-trail result))
(if (equal (gethash :lineNo result) (gethash :parenTrailLineNo result)) (progn (parinferlib--finish-new-paren-trail result)))
parinferlib--process-line(#s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data (:mode :indent :origText "-mode\n;; Keywords: Parinfer\n\n;; This file is not part of GNU Emacs.\n\n;; This program is free software; you can redistribute it and/or\n;; modify it under the terms of the GNU General Public License\n;; as published by the Free Software Foundation; either version 3\n;; of the License, or (at your option) any later version.\n\n;; This program is distributed in the hope that it will be useful,\n;; but WITHOUT ANY WARRANTY; without even the implied warranty of\n;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n;; GNU General Public License for more details.\n\n;; You should have received a copy of the GNU General Public License\n;; along with GNU Emacs; see the file COPYING. If not, write to the\n;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n;; Boston, MA 02110-1301, USA.\n\n;;; Commentary:\n\n;; Extensions of parinfer\n\n;;; Code:\n\n" :origLines ["-mode" ";; Keywords: Parinfer" "" ";; This file is not part of GNU Emacs." "" ";; This program is free software; you can redistribute it and/or" ";; modify it under the terms of the GNU General Public License" ";; as published by the Free Software Foundation; either version 3" ";; of the License, or (at your option) any later version." "" ";; This program is distributed in the hope that it will be useful," ";; but WITHOUT ANY WARRANTY; without even the implied warranty of" ";; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" ";; GNU General Public License for more details." "" ";; You should have received a copy of the GNU General Public License" ";; along with GNU Emacs; see the file COPYING. If not, write to the" ";; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor," ";; Boston, MA 02110-1301, USA." "" ";;; Commentary:" "" ";; Extensions of parinfer" "" ";;; Code:" "" ""] :origCursorX 53 :lines ["-mode" nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] :lineNo 0 :ch "" :x 5 :parenStack nil :tabStops nil :parenTrailLineNo 0 :parenTrailStartX 5 :parenTrailEndX 5 :parenTrailOpeners nil :cursorX 52 :cursorLine 0 :cursorDx nil :previewCursorScope nil :canPreviewCursorScope nil :isInCode t :isEscaping nil :isInStr nil :isInComment nil :commentX nil :quoteDanger nil :trackingIndent nil :skipChar nil :success nil :maxIndent nil :indentDelta 0 :error nil :errorPosCache nil ...)) "-mode")
(while (< i lines-length) (parinferlib--process-line result (aref orig-lines i)) (setq i (1+ i)))
(catch (quote parinferlib-error) (while (< i lines-length) (parinferlib--process-line result (aref orig-lines i)) (setq i (1+ i))) (parinferlib--finalize-result result) nil)
(let* ((result (parinferlib--create-initial-result text mode options)) (orig-lines (gethash :origLines result)) (lines-length (length orig-lines)) (i 0) (err (catch (quote parinferlib-error) (while (< i lines-length) (parinferlib--process-line result (aref orig-lines i)) (setq i (1+ i))) (parinferlib--finalize-result result) nil))) (if err (progn (parinferlib--process-error result err))) result)
parinferlib--process-text("-mode\n;; Keywords: Parinfer\n\n;; This file is not part of GNU Emacs.\n\n;; This program is free software; you can redistribute it and/or\n;; modify it under the terms of the GNU General Public License\n;; as published by the Free Software Foundation; either version 3\n;; of the License, or (at your option) any later version.\n\n;; This program is distributed in the hope that it will be useful,\n;; but WITHOUT ANY WARRANTY; without even the implied warranty of\n;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n;; GNU General Public License for more details.\n\n;; You should have received a copy of the GNU General Public License\n;; along with GNU Emacs; see the file COPYING. If not, write to the\n;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n;; Boston, MA 02110-1301, USA.\n\n;;; Commentary:\n\n;; Extensions of parinfer\n\n;;; Code:\n\n" :indent (:cursor-x 53 :cursor-line 0 :preview-cursor-scope nil))
(let ((result (parinferlib--process-text text :indent options))) (parinferlib--public-result result))
parinferlib-indent-mode("-mode\n;; Keywords: Parinfer\n\n;; This file is not part of GNU Emacs.\n\n;; This program is free software; you can redistribute it and/or\n;; modify it under the terms of the GNU General Public License\n;; as published by the Free Software Foundation; either version 3\n;; of the License, or (at your option) any later version.\n\n;; This program is distributed in the hope that it will be useful,\n;; but WITHOUT ANY WARRANTY; without even the implied warranty of\n;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n;; GNU General Public License for more details.\n\n;; You should have received a copy of the GNU General Public License\n;; along with GNU Emacs; see the file COPYING. If not, write to the\n;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n;; Boston, MA 02110-1301, USA.\n\n;;; Commentary:\n\n;; Extensions of parinfer\n\n;;; Code:\n\n" (:cursor-x 53 :cursor-line 0 :preview-cursor-scope nil))
(let* ((opts (plist-get context :opts)) (text (plist-get context :text)) (result (parinferlib-indent-mode text opts))) (parinfer--apply-result result context))
parinfer--execute-instantly((:text "-mode\n;; Keywords: Parinfer\n\n;; This file is not part of GNU Emacs.\n\n;; This program is free software; you can redistribute it and/or\n;; modify it under the terms of the GNU General Public License\n;; as published by the Free Software Foundation; either version 3\n;; of the License, or (at your option) any later version.\n\n;; This program is distributed in the hope that it will be useful,\n;; but WITHOUT ANY WARRANTY; without even the implied warranty of\n;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n;; GNU General Public License for more details.\n\n;; You should have received a copy of the GNU General Public License\n;; along with GNU Emacs; see the file COPYING. If not, write to the\n;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n;; Boston, MA 02110-1301, USA.\n\n;;; Commentary:\n\n;; Extensions of parinfer\n\n;;; Code:\n\n" :opts (:cursor-x 53 :cursor-line 0 :preview-cursor-scope nil) :orig (:start 166 :end 1028 :window-start-pos 1 :line-number 6)))
(if (> (length text) parinfer-delay-invoke-threshold) (setq parinfer--delay-timer (run-with-idle-timer parinfer-delay-invoke-idle nil (function parinfer-indent-instantly))) (parinfer--execute-instantly context))
(let ((text (plist-get context :text))) (if (> (length text) parinfer-delay-invoke-threshold) (setq parinfer--delay-timer (run-with-idle-timer parinfer-delay-invoke-idle nil (function parinfer-indent-instantly))) (parinfer--execute-instantly context)))
parinfer--execute((:text "-mode\n;; Keywords: Parinfer\n\n;; This file is not part of GNU Emacs.\n\n;; This program is free software; you can redistribute it and/or\n;; modify it under the terms of the GNU General Public License\n;; as published by the Free Software Foundation; either version 3\n;; of the License, or (at your option) any later version.\n\n;; This program is distributed in the hope that it will be useful,\n;; but WITHOUT ANY WARRANTY; without even the implied warranty of\n;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n;; GNU General Public License for more details.\n\n;; You should have received a copy of the GNU General Public License\n;; along with GNU Emacs; see the file COPYING. If not, write to the\n;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n;; Boston, MA 02110-1301, USA.\n\n;;; Commentary:\n\n;; Extensions of parinfer\n\n;;; Code:\n\n" :opts (:cursor-x 53 :cursor-line 0 :preview-cursor-scope nil) :orig (:start 166 :end 1028 :window-start-pos 1 :line-number 6)))
(let ((context (parinfer--prepare))) (parinfer--execute context))
parinfer-indent()
(cond ((eq (quote paren) parinfer--mode) (parinfer-paren)) ((eq (quote indent) parinfer--mode) (parinfer-indent)) (t "nothing"))
(progn (fset (quote message) (function format)) (cond ((eq (quote paren) parinfer--mode) (parinfer-paren)) ((eq (quote indent) parinfer--mode) (parinfer-indent)) (t "nothing")))
(unwind-protect (progn (fset (quote message) (function format)) (cond ((eq (quote paren) parinfer--mode) (parinfer-paren)) ((eq (quote indent) parinfer--mode) (parinfer-indent)) (t "nothing"))) (fset (quote message) old))
(let* ((old (symbol-function (quote message)))) (unwind-protect (progn (fset (quote message) (function format)) (cond ((eq (quote paren) parinfer--mode) (parinfer-paren)) ((eq (quote indent) parinfer--mode) (parinfer-indent)) (t "nothing"))) (fset (quote message) old)))
(if (and pos (not (eq pos (point)))) (let ((current-pos (point))) (goto-char pos) (parinfer--invoke-parinfer) (goto-char current-pos)) (let* ((old (symbol-function (quote message)))) (unwind-protect (progn (fset (quote message) (function format)) (cond ((eq (quote paren) parinfer--mode) (parinfer-paren)) ((eq (quote indent) parinfer--mode) (parinfer-indent)) (t "nothing"))) (fset (quote message) old))))
parinfer--invoke-parinfer()
(progn (if (eq (quote paren) parinfer--mode) (if (string-match-p "^[[:space:]]+$" (buffer-substring-no-properties (line-beginning-position) (point))) (delete-indentation) (backward-delete-char 1)) (backward-delete-char 1)) (progn (setq parinfer--text-modified t) (if parinfer-debug (progn (message "parinfer: set parinfer--text-modified to %S." parinfer--text-modified)))) (parinfer--invoke-parinfer))
parinfer-backward-delete-char()
funcall-interactively(parinfer-backward-delete-char)
#<subr call-interactively>(parinfer-backward-delete-char nil nil)
ad-Advice-call-interactively(#<subr call-interactively> parinfer-backward-delete-char nil nil)
apply(ad-Advice-call-interactively #<subr call-interactively> (parinfer-backward-delete-char nil nil))
call-interactively(parinfer-backward-delete-char nil nil)
command-execute(parinfer-backward-delete-char)