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

Various housekeeping #1704

Merged
merged 27 commits into from Aug 8, 2018
Merged

Various housekeeping #1704

merged 27 commits into from Aug 8, 2018

Conversation

basil-conto
Copy link
Collaborator

@basil-conto basil-conto commented Aug 6, 2018

I'm sorry about the mega-dump, but each commit in turn should be pretty straight-forward.

@basil-conto basil-conto force-pushed the blc/housekeeping branch 2 times, most recently from 82f5cfb to 871407d Compare August 6, 2018 22:43
(counsel--unicode-names): Do allocate candidates twice.
(counsel-unicode-char): Reorder ivy-read args.
(counsel-describe-symbol-history): Reword docstring.
(counsel-unquote-regex-parens): Simplify.
(ivy-completing-read, ivy--filter, ivy--buffer-list):
Replace assoc with assq.
counsel.el (counsel-git-change-worktree-action)
(counsel-org-agenda-headlines--candidates):
ivy.el (ivy-push-view):
doc/ivy-ox.el (ivy-info-dir):
Replace calls to buffer-file-name with its value.
(ivy--parent-dir): New function
(ivy-backward-delete-char, ivy-backward-kill-word)
(ivy--reset-state): Use it.
Reduce nesting of conditionals.
Flatten nested or-let-cond structure.
Document return value format and reformat amx-cache transformation.

Re: abo-abo#1613, abo-abo#1614, abo-abo#1615
Do not let-bind this-command as per "(elisp) Command Loop Info".
(ivy--directory-done, ivy--reset-state):
Replace cl-delete-duplicates with delete-dups.
counsel.el (counsel-irony-callback, counsel-git-stash)
(counsel-find-file-move, counsel-find-file, counsel-org-goto-all)
(counsel-org-file, counsel-semantic):
ivy.el (ivy-thing-at-point, ivy-alt-done, ivy--sorted-files)
(ivy--reset-state, ivy-completing-read, ivy--exhibit)
(ivy-switch-buffer-other-window):
swiper.el (swiper-multi, swiper-all): #'-quote function symbols.
ivy.el: Declare inhibit-message before its first use.
Declare Info-read-node-name-1.
swiper.el: Declare inhibit-message for Emacs 24.
counsel.el (counsel-imenu-categorize-functions): Simplify.
No need to handle delete-selection-mode here, and this also pacifies
the Emacs 24 byte-compiler.
ivy.el Outdated
@@ -3457,26 +3457,24 @@ CANDS is a list of strings."
(let (virtual-buffers)
(bookmark-maybe-load-default-file)
(dolist (head (append
(copy-sequence recentf-list)
Copy link
Owner

Choose a reason for hiding this comment

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

Was copy-sequence not needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

AFAICT no, given the call to append.

@@ -61,37 +61,19 @@ N is obtained from `counsel-more-chars-alist'."
(list "" (format "%d chars more" diff)))))

(defun counsel-unquote-regex-parens (str)
"Unquote regex parenthesis in STR."
Copy link
Owner

Choose a reason for hiding this comment

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

Would be nice to add some tests for this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wrote this commit a few moons ago, and made sure to test that my refactor was equivalent at the time, but I stupidly didn't commit the tests. Sorry, will do so in a follow-up PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done: #1708.

@abo-abo abo-abo merged commit b5e8556 into abo-abo:master Aug 8, 2018
@abo-abo
Copy link
Owner

abo-abo commented Aug 8, 2018

Thanks!

abo-abo added a commit that referenced this pull request Aug 8, 2018
We rely here on `propertize' making a copy of a string. Since the same
string is used in *Buffer List*, and we don't want to change faces
there.

Introduced: 1fcbd49
Re #1704
@basil-conto basil-conto deleted the blc/housekeeping branch August 8, 2018 18:14
basil-conto added a commit to basil-conto/swiper that referenced this pull request Aug 9, 2018
counsel.el (counsel-unquote-regex-parens):
Improve error message for case that should never happen(TM).
ivy-test.el (counsel-unquote-regex-parens):
Test cons argument and all supported parentheses.

Re: abo-abo#1704
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