(lambda nil
(hydra-keyboard-quit)
nil)
- nil))
+ nil)
+ (setq this-command
+ (quote first-error)))
(defun hydra-error/next-error nil
"Create a hydra with a \"M-g\" body and the heads:
(lambda nil
(hydra-keyboard-quit)
nil)
- nil))
+ nil)
+ (setq this-command
+ (quote next-error)))
(defun hydra-error/previous-error nil
"Create a hydra with a \"M-g\" body and the heads:
(lambda nil
(hydra-keyboard-quit)
nil)
- nil))
+ nil)
+ (setq this-command
+ (quote previous-error)))
(unless (keymapp
(lookup-key
global-map
(hydra-keyboard-quit)
(call-interactively
(function
- toggle-truncate-lines)))
+ toggle-truncate-lines))
+ (setq this-command
+ (quote toggle-truncate-lines)))
(defun hydra-toggle/auto-fill-mode-and-exit nil
"Create a hydra with no body and the heads:
(hydra-default-pre)
(hydra-keyboard-quit)
(call-interactively
- (function auto-fill-mode)))
+ (function auto-fill-mode))
+ (setq this-command
+ (quote auto-fill-mode)))
(defun hydra-toggle/abbrev-mode-and-exit nil
"Create a hydra with no body and the heads:
(hydra-default-pre)
(hydra-keyboard-quit)
(call-interactively
- (function abbrev-mode)))
+ (function abbrev-mode))
+ (setq this-command
+ (quote abbrev-mode)))
(defun hydra-toggle/nil nil
"Create a hydra with no body and the heads:
(lambda nil
(hydra-keyboard-quit)
(set-cursor-color "#ffffff"))
- (quote warn)))
+ (quote warn))
+ (setq this-command
+ (quote next-line)))
(defun hydra-vi/previous-line nil
"Create a hydra with no body and the heads:
(lambda nil
(hydra-keyboard-quit)
(set-cursor-color "#ffffff"))
- (quote warn)))
+ (quote warn))
+ (setq this-command
+ (quote previous-line)))
(defun hydra-vi/nil nil
"Create a hydra with no body and the heads:
(list 'quote body-foreign-keys)))
,body-after-exit
,(when body-timeout
- `(hydra-timeout ,body-timeout))))))))
+ `(hydra-timeout ,body-timeout)))))
+ ,@(when (and (symbolp (cadr head))
+ (not (memq (cadr head) '(nil body))))
+ `((setq this-command ',(cadr head)))))))
(defmacro hydra--make-funcall (sym)
"Transform SYM into a `funcall' to call it."
(body-inherit (plist-get body-plist :inherit))
(body-foreign-keys (hydra--body-foreign-keys body))
(body-exit (hydra--body-exit body)))
- (hydra--make-funcall body-before-exit)
- (hydra--make-funcall body-after-exit)
(dolist (base body-inherit)
(setq heads (append heads (copy-sequence (eval base)))))
(dolist (h heads)
heads)
(hydra--make-funcall body-pre)
(hydra--make-funcall body-body-pre)
+ (hydra--make-funcall body-before-exit)
+ (hydra--make-funcall body-after-exit)
(when (memq body-foreign-keys '(run warn))
(unless (cl-some
(lambda (h)