[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Have `define-key` return the keymap

From: Tianxiang Xiong
Subject: Have `define-key` return the keymap
Date: Sat, 13 May 2017 01:19:17 -0700

Would there be any issues with / objections to having `define-key` return the keymap it adds a key to? It currently returns `nil`, making it a statement (bleh!) rather than a function.

If `define-key` returned the keymap, calls to it could be chained together in convenient ways, e.g.

(thread-first (make-sparse-keymap)
  (define-key (kbd "a") #'foo)
  (define-key (kbd "b") #'bar))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]