- Hydra body can be omitted. If you do this, you can bind the functions
that `defhydra' produced (in the example above, `lispy-knight/body')
yourself. It can be useful e.g. if you want to call these functions
conditionally.
- Each Hydra gets a nice name, like `hydra-windmove/windmove-left'
instead of the old `hydra-C-M-o-windmove-left'.
Oleh Krehel [Thu, 22 Jan 2015 12:11:05 +0000 (13:11 +0100)]
Avoid evaling METHOD.
* hydra.el (hydra-create): Update.
METHOD doesn't need to be evaled: it's either nil, a lambda, or assume
that it's a valid keymap without evaling. This will prevent eager
macroexpansion failure for this argument.
There still is a problem with eager macroexpansion failure in HEADS
argument.
Oleh Krehel [Tue, 20 Jan 2015 22:31:55 +0000 (23:31 +0100)]
Allow to add one head that disables the Hydra
* hydra.el (hydra-last): Store the lambda to disable the Hydra.
(hydra-create): Update.
Sometimes, I have nothing particualr on my mind to do, but I want to
stop the Hydra. I could just type "C-g", but it's possible to have
something more convenient. For instance:
Oleh Krehel [Tue, 20 Jan 2015 16:46:48 +0000 (17:46 +0100)]
Allow to use minor-mode-maps and more
* hydra.el (hydra-create): Add a third optional argument. When it's not
supplied, the behavior should remain the same. Otherwise, it's a
lambda that's used instead of `global-set-key', with the same semantics.
Dmitry Gutov [Mon, 12 Jan 2015 17:06:31 +0000 (20:06 +0300)]
Split company--process-candidates into -pre and -post
* Call the -pre function before saving to cache.
* Copy the candidates list first thing inside the -post function.
* Replace `company-apply-predicate' with `cl-delete-if-not': it's faster.
Andrey Kotlarski [Thu, 1 Jan 2015 18:35:15 +0000 (20:35 +0200)]
* packages/vlf: Version 1.7
* vlf.el (hexl-bits): Declare.
(vlf-query-replace): New autoload.
(vlf-mode-map): Add key for `vlf-query-replace`.
(vlf-mode): Show VLF info in mode-line instead in buffer name.
Fix hexl-mode switch within read-only buffer.
(vlf-next-batch, vlf-prev-batch, vlf-set-batch-size)
(vlf-beginning-of-file, vlf-end-of-file, vlf-jump-to-chunk):
Adjust hexl-mode tune.
(vlf-hexl-mode-exit): New advice.
(vlf-move-to-batch): Don't pass `minimal` flag.
* vlf-write.el (vlf-save-in-place): New user option.
(vlf-write): Improve speed of remote file save.
(vlf-file-shift-back, vlf-shift-batch, vlf-file-shift-forward)
(vlf-shift-batches): Add optional file parameter.
* vlf-tune.el (vlf-tune-max): Fix default value in case RAM is
improperly calculated.
(vlf-tune-step): Refine.
(vlf-tune-write-bps, vlf-tune-hexl-bps, vlf-tune-dehexlify-bps):
Use global variables.
(vlf-start-pos, hexl-bits, hexl-max-address, hexl-line-displen)
(dehexlify-buffer): Declare.
(vlf-tune-copy-profile, vlf-hexl-adjust-addresses): New
functions.
(vlf-tune-initialize-measurement): Use global vlf-tune-max and
vlf-tune-step values.
(vlf-tune-insert-file-contents-literally, vlf-tune-write): Add
optional file parameter.
(vlf-tune-hexlify): Set hexl-max-address. Adjust line addresses
according to global position in file.
(vlf-tune-dehexlify): Use `dehexlify-buffer`.
(vlf-tune-get-value, vlf-tune-score): Fix fallback constants.
(vlf-tune-linear): Search only known measures.
(vlf-tune-batch): Add optional file parameter. Tune
conservatively for remote files.
(vlf-tune-optimal-load): Fix possibly incorrect value for minimum
boundary.
* vlf-setup.el: Rename vlf-integrate.el.
* vlf-search.el (hexl-bits): Declare.
(vlf-re-search): Add optional `highlight` parameter. Improve
precision where next chunk should start.
(vlf-goto-match): Simplify.
(vlf-re-search-forward, vlf-re-search-backward): Adjust
`vlf-re-search` calls. Restore batch size on interrupt.
(vlf-goto-line): Disable using literary insert because doesn't
work for all encodings.
(vlf-goto-line-hexl): New specialization.
(vlf-query-replace): New command.
* vlf-occur.el (hexl-bits): Declare.
(vlf-occur-visit): Enable multi-line matches. Copy profiling info
when opening new buffer.
(vlf-occur-other-buffer): Use `vlf-tune-copy-profile` to move vlf
profiling info around.
(vlf-occur): Use another buffer when undo information is present.
(vlf-build-occur): Enable multi-line matches. Count lines
separately. Be more precise on boundary line matches. Fix
last batch overlap.
(vlf-occur-save, vlf-occur-load): Support multi-line matches.
* vlf-ediff.el (tramp-verbose): Declare.
(vlf-next-chunk, vlf-prev-chunk): Don't pass minimal flag on
insert.
(vlf-ediff-next): Lower tramp verbosity. Don't update buffer name.
* vlf-base.el
(vlf-before-chunk-update, vlf-after-chunk-update): Rename.
(hexl-bits): Declare.
(vlf-verify-size): Add optional file parameter.
(vlf-update-buffer-name): Remove.
(vlf-move-to-chunk): Remove `minimal` parameter. Force modulo of
hexl-bits chunk boundaries when hexl-mode is active.
(vlf-move-to-chunk-1): Use `vlf-move-to-chunk-2` in more cases.
(vlf-move-to-chunk-2): Skip boundary adjustments when possible.
Use literary insert when hexl-mode is active.
(vlf-insert-file-contents): Minor adjustment.
(vlf-adjust-start): Don't profile micro inserts.
(vlf-byte-position): New function.