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

Translated most (all?) doc-strings. #1363

Merged
merged 4 commits into from May 15, 2024
Merged

Conversation

BierLiebHaber
Copy link
Contributor

These are mostly machine translated, but I found them to still be helpful.
If anyone has some better translation I'd be happy to include it.
Especially the editor-variable doc-string is a little unclear to me, how do 'local variables' relate to 'global values'?

@cxxxr
Copy link
Member

cxxxr commented May 12, 2024

Thank you for the PR.

I think this is a difference in expression between Japanese and English, or my Japanese ability.
Could you understand the following explanation?

local: has a closed scope within a buffer, variables in one buffer are not shared with variables in other buffers.
global: has a global scope like defvar.

@BierLiebHaber
Copy link
Contributor Author

Ok, then editor-variables can be both local and global? If so: the global is the default for the local, correct?

How does the changed-value-hook play into it? It it only called when the global is changed or whenever the value is changed?

@cxxxr
Copy link
Member

cxxxr commented May 12, 2024

change-value-hook is called only when the global variable is changed.
Currently, it is not used in any other scope.

@BierLiebHaber
Copy link
Contributor Author

I changed the doc-string of the editor-variable class to be clearer.

One Implementation question:
The kind parameter passed to variable-value is the scope of the variable correct?
Why is the default value for kind different between variable-value and setf variable-value (it's :default for the getter and :global for setf)? Especially since there doesn't appear to be a method speciallizing on the :default kind.

@cxxxr
Copy link
Member

cxxxr commented May 13, 2024

The kind parameter passed to variable-value is the scope of the variable correct?

yes

Why is the default value for kind different between variable-value and setf variable-value (it's :default for the getter and :global for setf)?

Isn't it the same?

(defun variable-value (symbol &optional (kind :default) (where nil wherep))

(defun (setf variable-value) (value symbol &optional (kind :default) (where nil wherep))

@cxxxr
Copy link
Member

cxxxr commented May 13, 2024

Also, Thank you for the changes.

@BierLiebHaber
Copy link
Contributor Author

Ah sorry I meant the variable-value-aux and setf variable-value-aux methods.
here:

(defmethod variable-value-aux ((var editor-variable) (kind (eql :global)) &optional (where nil wherep))

(defmethod (setf variable-value-aux) (value (var editor-variable) (kind (eql :global)) &optional (where nil wherep))

They are both specialized on :global but the [setf] variable-value functions pass :default

Also would it be ok if I rename kind to scope?

@cxxxr
Copy link
Member

cxxxr commented May 13, 2024

Hmm, I don't know, but there doesn't seem to be any particular reason.

Also would it be ok if I rename kind to scope?

Ok, I'd prefer it that way too.

@BierLiebHaber
Copy link
Contributor Author

Ah sorry i figured it out (a simple M-. answered my question 🤦‍♂️).

You can merge this, unless you have any additions/changes.

@cxxxr
Copy link
Member

cxxxr commented May 15, 2024

It's very good!
Thank you very much.

@cxxxr cxxxr merged commit 99f8b81 into lem-project:main May 15, 2024
2 checks passed
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