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

Fix byte compilation warnings #383

Merged
merged 2 commits into from Feb 23, 2024

Conversation

LaurenceWarne
Copy link
Contributor

Hi, this PR fixes the following byte compilation warnings I encountered on 29.1:

In mc--read-char:
multiple-cursors-core.el:347:2: Warning: reference to free variable ‘multiple-cursors-mode’

In mc--read-quoted-char:
multiple-cursors-core.el:348:2: Warning: reference to free variable ‘multiple-cursors-mode’

In mc--register-read-with-preview:
multiple-cursors-core.el:349:2: Warning: reference to free variable ‘multiple-cursors-mode’

In mc--read-char-from-minibuffer:
multiple-cursors-core.el:350:2: Warning: reference to free variable ‘multiple-cursors-mode’

In toplevel form:
mc-mark-more.el:95:2: Warning: defvar `mc/enclose-search-term' docstring has wrong usage of unescaped single quotes (use \= or different quoting)

In mc/mark-more-like-this-extended:
mc-mark-more.el:501:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting) mc-mark-more.el:522:22: Warning: reference to free variable ‘mc/mark-more-like-this-extended-keymap’

In end of data:
mc-mark-more.el:724:27: Warning: the function ‘sgml-skip-tag-forward’ is not known to be defined. mc-mark-more.el:673:8: Warning: the function ‘sgml-get-context’ is not known to be defined.

In end of data:
mc-hide-unmatched-lines-mode.el:110:1: Warning: the function ‘sgml-skip-tag-forward’ is not known to be defined. mc-hide-unmatched-lines-mode.el:110:1: Warning: the function ‘sgml-get-context’ is not known to be defined.

In end of data:
multiple-cursors-core.el:567:43: Warning: the function ‘sgml-skip-tag-forward’ is not known to be defined. multiple-cursors-core.el:535:25: Warning: the function ‘sgml-get-context’ is not known to be defined.

In end of data:
mc-cycle-cursors.el:124:1: Warning: the function ‘sgml-skip-tag-forward’ is not known to be defined. mc-cycle-cursors.el:124:1: Warning: the function ‘sgml-get-context’ is not known to be defined.

Thanks!

Fix the byte compilation warnings:

In mc--read-char:
multiple-cursors-core.el:347:2: Warning: reference to free variable ‘multiple-cursors-mode’

In mc--read-quoted-char:
multiple-cursors-core.el:348:2: Warning: reference to free variable ‘multiple-cursors-mode’

In mc--register-read-with-preview:
multiple-cursors-core.el:349:2: Warning: reference to free variable ‘multiple-cursors-mode’

In mc--read-char-from-minibuffer:
multiple-cursors-core.el:350:2: Warning: reference to free variable ‘multiple-cursors-mode’

In toplevel form:
mc-mark-more.el:95:2: Warning: defvar `mc/enclose-search-term' docstring has wrong usage of unescaped single quotes (use \= or different quoting)

In mc/mark-more-like-this-extended:
mc-mark-more.el:501:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
mc-mark-more.el:522:22: Warning: reference to free variable ‘mc/mark-more-like-this-extended-keymap’

In end of data:
mc-mark-more.el:724:27: Warning: the function ‘sgml-skip-tag-forward’ is not known to be defined.
mc-mark-more.el:673:8: Warning: the function ‘sgml-get-context’ is not known to be defined.

In end of data:
mc-hide-unmatched-lines-mode.el:110:1: Warning: the function ‘sgml-skip-tag-forward’ is not known to be defined.
mc-hide-unmatched-lines-mode.el:110:1: Warning: the function ‘sgml-get-context’ is not known to be defined.

In end of data:
multiple-cursors-core.el:567:43: Warning: the function ‘sgml-skip-tag-forward’ is not known to be defined.
multiple-cursors-core.el:535:25: Warning: the function ‘sgml-get-context’ is not known to be defined.

In end of data:
mc-cycle-cursors.el:124:1: Warning: the function ‘sgml-skip-tag-forward’ is not known to be defined.
mc-cycle-cursors.el:124:1: Warning: the function ‘sgml-get-context’ is not known to be defined.
mc-mark-more.el Outdated
@@ -29,6 +29,9 @@

(require 'multiple-cursors-core)
(require 'thingatpt)
(require 'sgml-mode)

(defvar mc/mark-more-like-this-extended-keymap (make-sparse-keymap))
Copy link
Collaborator

@leotaku leotaku Feb 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a huge fan of moving mc/mark-more-like-this-extended-keymap to the very top of the file. I would keep it grouped with the code that uses it.

Everything else looks very sensible though, thanks for contributing!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved it to above the first function which references it 🙂

@leotaku leotaku merged commit c870c18 into magnars:master Feb 23, 2024
9 checks passed
@leotaku
Copy link
Collaborator

leotaku commented Feb 23, 2024

This all seems good now, merged. Thank you for your contribution!

@LaurenceWarne LaurenceWarne deleted the fix-byte-comp-warnings branch February 23, 2024 12:37
@LaurenceWarne
Copy link
Contributor Author

Thanks!

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