emacs-evil / emacs-evil/evil

Two questions and two comment suggestions, for the file evil-commands.el

Open
#705 2 comments 0 reactions 0 assignees View on GitHub
enhancement trivial
Dominant language
Emacs Lisp
Stars
3.9k
Forks
307
PR merge metrics
No merged PRs in 30d

Description

Originally reported by: **duianto (Bitbucket: [duianto](https://bitbucket.org/duianto), GitHub: [duianto](https://github.com/duianto))**

----------------------------------------

These questions / suggestions came up when a quick spell check was done on the file:
evil-commands.el.

## Question 1 ##
There's a french comment:
`;; ceci n'est pas une pipe`

before this function:

https://bitbucket.org/lyro/evil/src/cd608c2c6b54afd8f8378752dccd705635de28e7/evil-commands.el?at=default&fileviewer=file-view-default#evil-commands.el-654
`;; ceci n'est pas une pipe`
`(evil-define-motion evil-goto-column (count)`
` "Go to column COUNT on the current line.`
`Columns are counted from zero."`
` :type exclusive`
` (move-to-column (or count 0)))`

should it be translated to english?
Google translates it as:
"this is not a pipe"

or if it isn't relevant, then it probably should be removed.

## Question 2 ##
The comments in the window rotation functions below, are identical:
` "Rotates the windows according to the currenty cyclic ordering."`

https://bitbucket.org/lyro/evil/src/cd608c2c6b54afd8f8378752dccd705635de28e7/evil-commands.el?at=default&fileviewer=file-view-default#evil-commands.el-3861

`(evil-define-command evil-window-rotate-upwards ()`
` "Rotates the windows according to the currenty cyclic ordering."`

https://bitbucket.org/lyro/evil/src/cd608c2c6b54afd8f8378752dccd705635de28e7/evil-commands.el?at=default&fileviewer=file-view-default#evil-commands.el-3874
`(evil-define-command evil-window-rotate-downwards ()`
` "Rotates the windows according to the currenty cyclic ordering."`

The "y" in "currenty" should be removed, and the comment should probably be rewritten to explain in which direction the function rotates.

And the function names probably should be renamed as well, upwards and downwards can be confused with counting up to the next window number and down to the previous window number. Currently the `..-downwards` function rotates forwards to the next window number and `..-upwards` rotates backwards to the previous window number.

### Possible new function names: ###
`evil-window-rotate-forward`
and
`evil-window-rotate-backward`

## Two comment suggestions ##

In the last sentence of the comments in both window split functions,
this part is a bit difficult to follow:
"... then all children of the parent of the splitted window are rebalanced".

### Before: ###
https://bitbucket.org/lyro/evil/src/cd608c2c6b54afd8f8378752dccd705635de28e7/evil-commands.el?at=default&fileviewer=file-view-default#evil-commands.el-3621

`(evil-define-command evil-window-split (&optional count file)`
``` "Splits the current window horizontally, COUNT lines height,
editing a certain FILE. The new window will be created below
when `evil-split-window-below' is non-nil. If COUNT and
`evil-auto-balance-windows' are both non-nil then all children
of the parent of the splitted window are rebalanced."```

and

https://bitbucket.org/lyro/evil/src/cd608c2c6b54afd8f8378752dccd705635de28e7/evil-commands.el?at=default&fileviewer=file-view-default#evil-commands.el-3636

`(evil-define-command evil-window-vsplit (&optional count file)`
``` "Splits the current window vertically, COUNT columns width,
editing a certain FILE. The new window will be created to the
right when `evil-vsplit-window-right' is non-nil. If COUNT and
`evil-auto-balance-windows'are both non-nil then all children
of the parent of the splitted window are rebalanced."```

### After:

Possible rewrite of the `evil-window-split` functions comment:

```"Splits the current window horizontally. Optionally COUNT lines high, and/or editing a FILE. The new window will be created below when `evil-split-window-below' is non-nil. The split windows are rebalanced if both COUNT and `evil-auto-balance-windows' are non-nil.```

and

Possible rewrite of the `evil-window-vsplit` functions comment:

```"Splits the current window vertically. Optionally COUNT columns wide, and/or editing a FILE. The new window will be created to the right when `evil-vsplit-window-right' is non-nil. The split windows are rebalanced if both COUNT and `evil-auto-balance-windows' are non-nil.```

I don't know how to pass a FILE to a function, so i'm unable to test it, but if a COUNT and a FILE argument can't be passed to a function at the same time. then "and/or" should be changed to "or".

----------------------------------------
- Bitbucket: https://bitbucket.org/lyro/evil/issue/705

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.