:exit BINDINGS - Within the scope of :repeat-map will bind the
key in the repeat map, but will not set the
'repeat-map property of the bound command.
+:continue BINDINGS - Within the scope of :repeat-map forces the
+ same behaviour as if no special keyword had
+ been used (that is, the command is bound, and
+ it's 'repeat-map property set)
:filter FORM - optional form to determine when bindings apply
The rest of the arguments are conses of keybinding string and a
override-global-map))))
(setq repeat-map (cadr args))
(setq map repeat-map))
+ ((eq :continue (car args))
+ (setq repeat-type :continue
+ arg-change-func 'cdr))
((eq :exit (car args))
(setq repeat-type :exit
arg-change-func 'cdr))
`((bind-key ,(car form) ,fun nil ,filter))))))
first))
(when next
- (bind-keys-form (if pkg
- (cons :package (cons pkg next))
- next) map)))))))
+ (bind-keys-form `(,@(when repeat-map `(:repeat-map ,repeat-map))
+ ,@(if pkg
+ (cons :package (cons pkg next))
+ next)) map)))))))
;;;###autoload
(defmacro bind-keys (&rest args)
:exit BINDINGS - Within the scope of :repeat-map will bind the
key in the repeat map, but will not set the
'repeat-map property of the bound command.
+:continue BINDINGS - Within the scope of :repeat-map forces the
+ same behaviour as if no special keyword had
+ been used (that is, the command is bound, and
+ it's 'repeat-map property set)
:filter FORM - optional form to determine when bindings apply
The rest of the arguments are conses of keybinding string and a
;; :filter SEXP
;; :menu-name STRING
;; :package SYMBOL
- ;; :exit used within :repeat-map
+ ;; :continue and :exit are used within :repeat-map
((or (and (eq x :map) (symbolp (cadr arg)))
(and (eq x :prefix) (stringp (cadr arg)))
(and (eq x :prefix-map) (symbolp (cadr arg)))
(and (eq x :prefix-docstring) (stringp (cadr arg)))
(and (eq x :repeat-map) (symbolp (cadr arg)))
+ (eq x :continue)
(eq x :exit)
(and (eq x :repeat-docstring) (stringp (cadr arg)))
(eq x :filter)