-
-
Notifications
You must be signed in to change notification settings - Fork 338
Various housekeeping #1704
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
Conversation
82f5cfb to
871407d
Compare
(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.
871407d to
b5e8556
Compare
| (let (virtual-buffers) | ||
| (bookmark-maybe-load-default-file) | ||
| (dolist (head (append | ||
| (copy-sequence recentf-list) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
| (list "" (format "%d chars more" diff))))) | ||
|
|
||
| (defun counsel-unquote-regex-parens (str) | ||
| "Unquote regex parenthesis in STR." |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: #1708.
|
Thanks! |
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
I'm sorry about the mega-dump, but each commit in turn should be pretty straight-forward.