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

chore: Document functions in echo.lisp #685

Merged
merged 2 commits into from
Jun 5, 2023

Conversation

jcs090218
Copy link
Member

This patch also fixed some indentation issues.

src/echo.lisp Outdated
Return t if success.

The first argument is a format control string, and the rest are data to be
formatted under control of the string."
(log-message string args)
(apply #'message-without-log string args)
t)
Copy link
Member Author

Choose a reason for hiding this comment

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

In Emacs, this function returns the string instead of t. WDYT? 🤔

Copy link
Member

Choose a reason for hiding this comment

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

nice catch!
Probably a remnant of the practice of returning a T on success.
Since the purpose of this function is to display a message and not to return a value, (values) might be more appropriate.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, I am still new to the development. What do you want me to change to accomplish? 🤔 Thanks!

Copy link
Member

@cxxxr cxxxr Jun 5, 2023

Choose a reason for hiding this comment

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

You may want to change t to (values)

The (values) means that no values are returned

(values 1 2 3) => 1, 2, 3 values
(values 1) => 1
(values) => No value

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah! Learned new knowledge! Sorry, I was being dumb! Thank you!

Just updated the code! 🚀

Copy link
Member

Choose a reason for hiding this comment

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

Thank you so much!
It is very helpful that you have written the documentation.

@cxxxr cxxxr merged commit fa87e79 into lem-project:main Jun 5, 2023
1 check passed
@jcs090218 jcs090218 deleted the chore/doc-echo branch June 5, 2023 03:10
@cxxxr cxxxr mentioned this pull request Jul 11, 2023
6 tasks
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