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

Conversation

@basil-conto
Copy link
Collaborator

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 basil-conto:blc/housekeeping branch 2 times, most recently Aug 6, 2018

basil-conto added 27 commits Aug 6, 2018
counsel.el: Optimise counsel-unicode-char
(counsel--unicode-names): Do allocate candidates twice.
(counsel-unicode-char): Reorder ivy-read args.
counsel.el: Reword docstring of symbol history var
(counsel-describe-symbol-history): Reword docstring.
counsel.el: Simplify regexp unquoting
(counsel-unquote-regex-parens): Simplify.
ivy.el: Replace assoc with assq where appropriate
(ivy-completing-read, ivy--filter, ivy--buffer-list):
Replace assoc with assq.
Use the variable, not function, buffer-file-name
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.el: Add convenience function ivy--parent-dir
(ivy--parent-dir): New function
(ivy-backward-delete-char, ivy-backward-kill-word)
(ivy--reset-state): Use it.
ivy.el (ivy-call): Simplify II
Reduce nesting of conditionals.
ivy.el (ivy-thing-at-point): Simplify
Flatten nested or-let-cond structure.
counsel.el (counsel--M-x-externs): Touch-up
Document return value format and reformat amx-cache transformation.

Re: #1613, #1614, #1615
ivy.el (ivy-switch-buffer): Fix this-command usage
Do not let-bind this-command as per "(elisp) Command Loop Info".
ivy.el: Use delete-dups where appropriate
(ivy--directory-done, ivy--reset-state):
Replace cl-delete-duplicates with delete-dups.
Quote function symbols with #'
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.
Simplify counsel-imenu-categorize-functions
counsel.el (counsel-imenu-categorize-functions): Simplify.
Pacify byte-compiler
ivy.el: Declare inhibit-message before its first use.
Declare Info-read-node-name-1.
swiper.el: Declare inhibit-message for Emacs 24.
ivy.el (ivy-on-del-error-function): Simplify
No need to handle delete-selection-mode here, and this also pacifies
the Emacs 24 byte-compiler.

@basil-conto basil-conto force-pushed the basil-conto:blc/housekeeping branch to b5e8556 Aug 7, 2018

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)

This comment has been minimized.

Copy link
@abo-abo

abo-abo Aug 8, 2018

Owner

Was copy-sequence not needed?

This comment has been minimized.

Copy link
@basil-conto

basil-conto Aug 8, 2018

Author Collaborator

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."

This comment has been minimized.

Copy link
@abo-abo

abo-abo Aug 8, 2018

Owner

Would be nice to add some tests for this.

This comment has been minimized.

Copy link
@basil-conto

basil-conto Aug 8, 2018

Author Collaborator

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.

This comment has been minimized.

Copy link
@basil-conto

basil-conto Aug 9, 2018

Author Collaborator

Done: #1708.

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

1 of 2 checks passed

continuous-integration/travis-ci/push The Travis CI build is in progress
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@abo-abo

This comment has been minimized.

Copy link
Owner

commented Aug 8, 2018

Thanks!

abo-abo added a commit that referenced this pull request Aug 8, 2018
ivy.el (ivy--buffer-list): Fix regression
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 basil-conto:blc/housekeeping branch Aug 8, 2018

basil-conto added a commit to basil-conto/swiper that referenced this pull request Aug 9, 2018
Extend counsel-unquote-regex-parens tests
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
Projects
None yet
2 participants
You can’t perform that action at this time.