Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Highlight references to line numbers using the line number color #26

Closed
hackerb9 opened this issue Dec 2, 2022 · 0 comments · Fixed by #37
Closed

Highlight references to line numbers using the line number color #26

hackerb9 opened this issue Dec 2, 2022 · 0 comments · Fixed by #37
Assignees

Comments

@hackerb9
Copy link
Contributor

hackerb9 commented Dec 2, 2022

One feature Telnet23's highlighting has that basic-mode.el should steal acquire is highlighting line numbers when they are referenced by statements like GOTO 10 in the line number color.

Note that Telnet23's regexps only handle numbers directly after THEN, ELSE, GO\s*TO, and GOSUB. There are other ways that BASIC can refer to line numbers.

These should all have the numbers highlighted as line numbers:

  • ON var GOSUB 10, 20, 30
  • ON var GO TO 10, 20, 30
  • RESTORE 10
  • RESUME 10
  • RETURN 10
  • RUN 10
  • LIST -500
  • LLIST 10
  • RENUM 1000,10
  • DELETE 10-40
  • IF ERL=10 THEN...

Exceptions:

  • RENUM [newnum] [,[oldnum] [,increment]]
    Increment should not be highlighted.

Originally posted by @hackerb9 in #21 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants