[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/free-keys 982aea30d1 09/19: Add docstrings & readme
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/free-keys 982aea30d1 09/19: Add docstrings & readme |
Date: |
Sat, 29 Jan 2022 08:02:52 -0500 (EST) |
branch: elpa/free-keys
commit 982aea30d15f48a818615a57ba892c20a566464b
Author: Matus Goljer <dota.keys@gmail.com>
Commit: Matus Goljer <dota.keys@gmail.com>
Add docstrings & readme
---
free-keys.el | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/free-keys.el b/free-keys.el
index 1b19c76743..3c060ae630 100644
--- a/free-keys.el
+++ b/free-keys.el
@@ -8,6 +8,7 @@
;; Created: 3rd November 2013
;; Keywords: convenience
;; Package-Requires: ((cl-lib "0.3"))
+;; URL: https://github.com/Fuco1/free-keys
;; This file is not part of GNU Emacs.
@@ -28,6 +29,8 @@
;; Show free keybindings for modkeys or prefixes. Based on code
;; located here: https://gist.github.com/bjorne/3796607
+;;
+;; For complete description see https://github.com/Fuco1/free-keys
;;; Code:
@@ -58,6 +61,10 @@
"Buffer from which `free-keys' was called.")
(defun free-keys--print-in-columns (key-list &optional columns)
+ "Print the KEY-LIST into as many columns as will fit into COLUMNS characters.
+
+The columns are ordered according to variable `free-keys-keys',
+advancing down-right. The margin between each column is 5 characters."
(setq columns (or columns 80))
(let* ((len (+ 5 (length (car key-list))))
(cols (/ columns len))
@@ -73,19 +80,37 @@
(cl-incf cur-row)))))
(defun free-keys-set-prefix (prefix)
- "Change the prefix and update the display."
+ "Change the prefix in current *Free keys* buffer to PREFIX and
+update the display."
(interactive "sPrefix: ")
(free-keys prefix free-keys-original-buffer))
(defun free-keys-change-buffer (buffer)
+ "Change the buffer for which the bindings are displayed to
+BUFFER and update the display."
(interactive "bShow free bindings for buffer: ")
(free-keys nil (get-buffer-create buffer)))
(defun free-keys-revert-buffer (_ _)
+ "Revert the *Free keys* buffer.
+
+This simply calls `free-keys'."
(free-keys nil free-keys-original-buffer))
+;; TODO: split this function into something cleaner.
+
;;;###autoload
(defun free-keys (&optional prefix buffer)
+ "Display free keys in current buffer.
+
+A free key is a key that has no associated key-binding as
+determined by function `key-binding'.
+
+By default, keys on `free-keys-keys' list with no prefix sequence
+are considered, possibly together with modifier keys from
+`free-keys-modifiers'. You can change the prefix sequence by
+hitting 'p' in the *Free keys* buffer. Prefix is supplied in
+format recognized by `kbd', for example \"C-x\"."
(interactive (list (when current-prefix-arg
(read-from-minibuffer "Prefix: "))))
(setq prefix (or prefix ""))
- [nongnu] elpa/free-keys 3b4a18417b 06/19: Add revert function, (continued)
- [nongnu] elpa/free-keys 3b4a18417b 06/19: Add revert function, ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys a975b8fe62 15/19: Suppress byte-compile warning, ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys 11241fd518 07/19: Display keys for which keybinding is 'undefined., ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys f5db0a1e43 02/19: Add the note about `bind-key`, fix typos, ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys f5d882d4c7 11/19: Better display of empty keys (no empty groups, fixed nil modifiers), ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys 8c9ea744c1 08/19: Move header help into header-line-format, ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys 79205af5f5 01/19: Initial commit, ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys 452d26a3fc 03/19: Do not autoload the major-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys aca6032c3e 05/19: Merge pull request #1 from syohex/support-for-old-emacs, ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys 9cc42a07a6 04/19: Support old emacs(<= 24.2), ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys 982aea30d1 09/19: Add docstrings & readme,
ELPA Syncer <=
- [nongnu] elpa/free-keys 845d7bc367 10/19: Update readme, ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys e23ec255d4 13/19: Add option to ignore certain keybindings (shadowed by WM etc.), ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys 368820cb36 16/19: Merge pull request #2 from syohex/byte-compile-warning, ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys edfd69dc36 17/19: [Fix #3] Add an option to specify multi-character keys, ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys 6f9172376a 18/19: Bump version to 1.0, ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys 7348ce6819 19/19: Merge pull request #6 from phikal/patch-1, ELPA Syncer, 2022/01/29
- [nongnu] elpa/free-keys f42c5c9480 14/19: Change type of free-keys-ignored-bindings to make customisation easier, ELPA Syncer, 2022/01/29