Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix error when trying to expand latex symbol at beginning of buffer #218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dhanak
Copy link
Contributor

@dhanak dhanak commented Dec 16, 2024

With company-mode, the following error is thrown when typing (anything but a latex sequence) at the start of the buffer:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  =(92 nil)
  (if (= 92 (char-before)) (progn (- (point) 1)))
  (save-excursion (while (not (or (bobp) (= 92 (char-before)) (member (char-syntax (char-before)) '(32 60 62 92)))) (backward-char)) (if (= 92 (char-before)) (progn (- (point) 1))))
  julia--latexsub-start-symbol()
  julia-mode-latexsub-completion-at-point-around()
  completion--capf-wrapper(julia-mode-latexsub-completion-at-point-around optimist)
  company--capf-wrapper(julia-mode-latexsub-completion-at-point-around optimist)

This change fixes that.

With company-mode, the following error is thrown when typing (anything
but a latex sequence) at the start of the buffer:

```
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  =(92 nil)
  (if (= 92 (char-before)) (progn (- (point) 1)))
  (save-excursion (while (not (or (bobp) (= 92 (char-before)) (member (char-syntax (char-before)) '(32 60 62 92)))) (backward-char)) (if (= 92 (char-before)) (progn (- (point) 1))))
  julia--latexsub-start-symbol()
  julia-mode-latexsub-completion-at-point-around()
  completion--capf-wrapper(julia-mode-latexsub-completion-at-point-around optimist)
  company--capf-wrapper(julia-mode-latexsub-completion-at-point-around optimist)
```

This change fixes that.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant