Oleh Krehel [Fri, 17 Apr 2015 11:29:41 +0000 (13:29 +0200)]
Add sorting for file completion
* ivy.el (ivy-alt-done): Exit with current directory when on first
element, which is always "./", thanks to sorting.
(ivy--cd): Update.
(ivy--sorted-files): New defun for sorting file names. "./" and "../"
are always the first, then come the directories, then the files.
(ivy-read): Update.
Oleh Krehel [Fri, 17 Apr 2015 10:53:43 +0000 (12:53 +0200)]
Add "/" and "~" shortcuts while finding files
* ivy.el (ivy--cd): New defun.
(ivy-backward-delete-char): Use `ivy--cd'.
(ivy--exhibit): When the file completion text ends in "/" or "~", move to
those dirs.
Oleh Krehel [Thu, 16 Apr 2015 19:20:42 +0000 (21:20 +0200)]
Ivy-mode now works better with `find-file'
* ivy.el (ivy-minibuffer-map): Bind "C-j" to visit a directory without
exiting the minibuffer.
(ivy--directory): New defvar.
(ivy-done): Expand file names.
(ivy-alt-done): New defun.
(ivy-backward-delete-char): When completing file names, visit the parent dir.
(ivy-read): Add the predicate argument, similar to `completing-read'.
All code that uses `ivy-read' needs to be updated. Move the collection/predicate stuff here.
(ivy-completing-read): Update.
(ivy--insert-prompt): Display the current directory when completing file names.
Oleh Krehel [Thu, 16 Apr 2015 16:26:52 +0000 (18:26 +0200)]
Add require-match functionality
* ivy.el (ivy-require-match): New defvar.
(ivy-done): When nothing matches, and `ivy-require-match' isn't t, use
the current text anyway.
(ivy-completing-read): Update.
Oleh Krehel [Thu, 16 Apr 2015 13:05:45 +0000 (15:05 +0200)]
Declare the hint early to avoid compile warnings
* hydra.el (hydra-fontify-head-greyscale): Update unused arg.
(hydra--make-defun): Update.
(hydra--head-name): Take one less arg.
(defhydra): Update hint position.
* hydra-init.el: Byte compile more stuff.
* hydra-test.el: Update tests.
* Makefile: Rename compile target to "run", update "compile".
Stefan Monnier [Wed, 15 Apr 2015 21:18:37 +0000 (17:18 -0400)]
* js2-mode.el (js2-mode): Use cursor-sensor-mode if available.
(js2-export-node): Fix apparent paren typo.
(js2-get-token-internal-1): Remove unused var `quote-char'.
(js2-clear-face): Also remove cursor-sensor-functions.
(js2-parse-primary-expr): Remove unused var `pn'.
(js2-parse-legacy-array-comp): Remove unused var `first'.
(js2-mode-show-node, js2-mode-show-warn-or-err): Use cursor-sensor-functions
if available.
(js2-mode-hide-overlay, js2-echo-error): Adapt to new calling convention.
(js2-echo-help): Declare obsolete.
(js2-mode-extend-comment): Look for the appropriate property.
With this code, `hydra-zoom/body' will display the hint not immediately
but after 1.0 seconds. If you manage to exit the hydra by then, the hint
will not be displayed. Other functions will display the hint
immediately.
Oleh Krehel [Tue, 14 Apr 2015 11:34:09 +0000 (13:34 +0200)]
Work around `overriding-terminal-local-map' being terminal-local
* hydra.el (hydra-disable): Try to reset `overriding-terminal-local-map'
for each frame, so that it doesn't happen that the hydra is cancelled
in one frame, but not in the other. `hydra-curr-on-exit' is called in
the first frame for which there's a transient map.
(hydra--clearfun): Disable when `overriding-terminal-local-map' is nil.
Oleh Krehel [Mon, 13 Apr 2015 12:08:43 +0000 (14:08 +0200)]
hydra.el (hydra--head-color): Simplify
* hydra.el (hydra-face-red):
(hydra-face-blue):
(hydra-face-amaranth):
(hydra-face-pink):
(hydra-face-teal): Improve docstrings.
(hydra--head-color): Simplify.
(defhydra): Use copy-sequence on inherited heads. Move :cmd-name setting
to the very end, when :exit is already set.
Just flatten these two functions to their 25.2 bodies, and don't call
the `set-transient-map' variants, since the map remains anyway because
of `hydra-base-map'.
Oleh Krehel [Mon, 13 Apr 2015 09:33:01 +0000 (11:33 +0200)]
Finalize head inheritance
* hydra.el (hydra--body-exit): New defun.
(defhydra): Ensure that each head doesn't need the :exit info from the
body any more by putting the aggregated :exit in the head's own plist.
* hydra-test.el: Update tests.
Each hydra will now declare its own heads as a variable `foo/heads`.
It's possible to inherit them like this:
Oleh Krehel [Tue, 31 Mar 2015 15:48:50 +0000 (17:48 +0200)]
Move away from setting "t" in keymaps
* hydra.el (hydra-curr-on-exit): New defvar.
(hydra-curr-foreign-keys): New defvar.
(hydra-clearfun): New defun.
(hydra-amaranth-warn): New defun.
(hydra-set-transient-map): Use own defun instead of `set-transient-map'.
(hydra--universal-argument): Update.
(hydra--make-defun): Update.
(hydra--handle-nonhead): Remove.
(defhydra): Update.
Oleh Krehel [Thu, 9 Apr 2015 14:08:23 +0000 (16:08 +0200)]
Add four more commands
* counsel.el (counsel-describe-variable): New defun.
(counsel-describe-function): New defun.
(counsel-info-lookup-symbol): New defun.
(counsel-unicode-char): New defun.
Michael Albinus [Thu, 9 Apr 2015 08:33:32 +0000 (10:33 +0200)]
Rename debbugs-reference.el to debbugs-browse.el
* debbugs-browse.el: Rename from debbugs-reference.el. Rename
also all symbols accordingly.
(debbugs-browse-function): New customer option.
(debbugs-browse-url): Use it.
Michael Albinus [Wed, 8 Apr 2015 09:30:09 +0000 (11:30 +0200)]
Minor improvements to debbugs-reference.el
* debbugs-reference.el (debbugs-browse-url): Check URL pointing to
debbugs.gnu.org.
(debbugs-reference-mode, debbugs-reference-prog-mode):
Use `add-function' and `remove-function'.
packages/javaimp/javaimp.el: Support additional source directories.
* packages/javaimp/javaimp.el (javaimp-additional-source-dirs): New defcustom.
(javaimp-make-mod): Add build-dir.
(javaimp-get-mod-build-dir): New defun.
(javaimp-maven-build-children): Use module build directory
(javaimp-get-module-classes): Add classes in 'additional-source-dirs' to project classes.