[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7150aa9 14/21: Announce which-key-enable-extended-define-k
From: |
Justin Burkett |
Subject: |
[elpa] master 7150aa9 14/21: Announce which-key-enable-extended-define-key in README |
Date: |
Mon, 8 Jan 2018 22:46:56 -0500 (EST) |
branch: master
commit 7150aa97954483517aa8395e94c39af9b49516fc
Author: Justin Burkett <address@hidden>
Commit: Justin Burkett <address@hidden>
Announce which-key-enable-extended-define-key in README
---
README.org | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/README.org b/README.org
index edde2a4..4b4f96b 100644
--- a/README.org
+++ b/README.org
@@ -2,6 +2,12 @@
[[http://melpa.org/#/which-key][http://melpa.org/packages/which-key-badge.svg]]
[[http://stable.melpa.org/#/which-key][file:http://stable.melpa.org/packages/which-key-badge.svg]]
[[https://travis-ci.org/justbur/emacs-which-key][file:https://travis-ci.org/justbur/emacs-which-key.svg?branch=master]]
** Recent Changes
+
+*** 2017-12-13: Added =which-key-enable-extended-define-key=
+ Allows for a concise syntax to specify replacement text using =define-key=
+ or alternatives that use =define-key= internally. See the docstring and
+ [[#custom-string-replacement-options][Custom String Replacement]].
+
*** 2017-11-13: Added =which-key-show-major-mode=
Shows active bindings in current major-mode map.
** Introduction
@@ -18,6 +24,7 @@
** Table of Contents :TOC_3:
- [[#which-key][which-key]]
- [[#recent-changes][Recent Changes]]
+ - [[#2017-12-13-added-which-key-enable-extended-define-key][2017-12-13:
Added =which-key-enable-extended-define-key=]]
- [[#2017-11-13-added-which-key-show-major-mode][2017-11-13: Added
=which-key-show-major-mode=]]
- [[#introduction][Introduction]]
- [[#install][Install]]
@@ -221,6 +228,24 @@
idea of behind each alist is that you specify a selection string in the
=car= of each cons cell and the replacement string in the =cdr=.
+**** Automatic
+ A newer option is to set =which-key-enable-extended-define-key= which
+ advises =define-key= to allow which-key to pre-process its arguments. The
+ statement
+
+ #+BEGIN_SRC emacs-lisp
+ (define-key some-map "f" '("foo" . long-name-for-command-foo))
+ #+END_SRC
+
+ is valid in Emacs. Setting this variable makes which-key automatically
+ replace the corresponding command name with the text in the string. A nice
+ example is in naming prefixes. The following binds "b" to =nil= and names
+ the binding as a prefix.
+
+ #+BEGIN_SRC emacs-lisp
+ (define-key some-map "b" '("bar-prefix"))
+ #+END_SRC
+
**** "Key-Based" replacement
Using this method, the description of a key is replaced using a string
that
you provide. Here's an example
- [elpa] master 78a2943 08/21: Fix ordering of default replacement-alist, (continued)
- [elpa] master 78a2943 08/21: Fix ordering of default replacement-alist, Justin Burkett, 2018/01/08
- [elpa] master 159f0f9 07/21: Add notes about paging commands not working with minibuffer, Justin Burkett, 2018/01/08
- [elpa] master f516b84 09/21: Add which-key-enable-extended-define-key customization option, Justin Burkett, 2018/01/08
- [elpa] master 3ff8f48 10/21: Allow null DEF in which-key--process-define-key-args, Justin Burkett, 2018/01/08
- [elpa] master 555c5c1 13/21: Demote errors in which-key--process-define-key-args, Justin Burkett, 2018/01/08
- [elpa] master 0a212c7 11/21: Fix travis build, Justin Burkett, 2018/01/08
- [elpa] master c7e5f76 18/21: Merge pull request #183 from tarsiiformes/silencio, Justin Burkett, 2018/01/08
- [elpa] master 6247cb5 16/21: Simplify implementation of define-key based replacements, Justin Burkett, 2018/01/08
- [elpa] master 1694c6d 15/21: Improve which-key--process-define-key-args, Justin Burkett, 2018/01/08
- [elpa] master b6d04b3 12/21: Fix .travis.yml, Justin Burkett, 2018/01/08
- [elpa] master 7150aa9 14/21: Announce which-key-enable-extended-define-key in README,
Justin Burkett <=
- [elpa] master 7559a79 20/21: Version 3.1.0, Justin Burkett, 2018/01/08
- [elpa] master ef384e7 19/21: Fix and improve define-key based replacements, Justin Burkett, 2018/01/08
- [elpa] master cd8d24d 17/21: Define which-key--current-key-list before using it, Justin Burkett, 2018/01/08
- [elpa] master 1234342 06/21: Re-indent README, Justin Burkett, 2018/01/08
- [elpa] master 56b0fc8 21/21: Merge commit '7559a79e95aada65601f7413a1c3f08bfa34557b', Justin Burkett, 2018/01/08