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 lexical-dynamic warnings #284

Merged
merged 1 commit into from
Oct 16, 2022
Merged

Fix lexical-dynamic warnings #284

merged 1 commit into from
Oct 16, 2022

Conversation

matsl
Copy link
Collaborator

@matsl matsl commented Oct 13, 2022

What

Fix lexical-dynamic warnings.

Why

kotl/kview.el:807:54: Warning: Lexical argument shadows the dynamic variable fill-prefix
kotl/kview.el:1399:10: Warning: Variable ‘pos’ left uninitialized
hmouse-sh.el:276:29: Warning: Lexical argument shadows the dynamic variable hmouse-middle-flag
hmouse-sh.el:472:30: Warning: Lexical argument shadows the dynamic variable hmouse-middle-flag
hpath.el:1656:27: Warning: Variable ‘modifier’ left uninitialized

hmouse-sh.el Show resolved Hide resolved
kotl/kview.el Show resolved Hide resolved
@@ -1653,7 +1653,7 @@ form is what is returned for PATH."
(file-readable-p path))
(setq path (hpath:call
(lambda (path non-exist)
(let (modifier
(let ((modifier nil)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@rswgnu modifier is strange. Never set and used in call to two later concat calls. Code might be possible to clean up more so leaving this for you to look into if modifier can be removed and the concat calls simplified?

@@ -1395,8 +1395,7 @@ new outlines is also set to this new value."
(- sep-len-increase) ?\ )))
(while (re-search-forward indent nil t)
(delete-region
(+ (match-beginning 0) 2) (match-end 0)))))))
pos)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

pos does not look like it is used so removing it.

Copy link
Owner

Choose a reason for hiding this comment

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

You are right that it is not really used but it is sent in a call about 2 lines down but then the value is ignored in the called function as well. Let's push your updates and then I'll finish the changes here after.

@matsl matsl requested a review from rswgnu October 13, 2022 20:58
@@ -1395,8 +1395,7 @@ new outlines is also set to this new value."
(- sep-len-increase) ?\ )))
(while (re-search-forward indent nil t)
(delete-region
(+ (match-beginning 0) 2) (match-end 0)))))))
pos)
Copy link
Owner

Choose a reason for hiding this comment

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

You are right that it is not really used but it is sent in a call about 2 lines down but then the value is ignored in the called function as well. Let's push your updates and then I'll finish the changes here after.

@matsl matsl force-pushed the fix_lexical_dynamic_warnings branch from 972ed4d to daa3031 Compare October 16, 2022 16:36
@matsl matsl merged commit 709fa69 into master Oct 16, 2022
@matsl matsl deleted the fix_lexical_dynamic_warnings branch October 16, 2022 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants