[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/frog-menu ec633cd 02/12: Update example
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/frog-menu ec633cd 02/12: Update example |
Date: |
Thu, 21 May 2020 11:15:11 -0400 (EDT) |
branch: externals/frog-menu
commit ec633cd67e794b931030426689e43521ec5011d8
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Update example
---
README.org | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/README.org b/README.org
index a406b13..dc31a0d 100644
--- a/README.org
+++ b/README.org
@@ -77,22 +77,30 @@ Afterwards calling =M-x flyspell-correct-wrapper= will
prompt you with a
And here is yet another example I use to navigate the menubar:
#+begin_src elisp
+(defun tmm-init-km-list+ (menu)
+ (setq tmm-km-list nil)
+ (map-keymap (lambda (k v) (tmm-get-keymap (cons k v))) menu)
+ (setq tmm-km-list (nreverse tmm-km-list))
+ ;; filter unenabled items
+ (setq tmm-km-list
+ (cl-remove-if
+ (lambda (item)
+ (eq (cddr item) 'ignore)) tmm-km-list)))
+
(defun frog-tmm ()
"Adapted from `counsel-tmm'."
(interactive)
- (require 'tmm)
(run-hooks 'menu-bar-update-hook)
(setq tmm-table-undef nil)
(frog-tmm-prompt (tmm-get-keybind [menu-bar])))
+
(defun frog-tmm-prompt (menu)
"Adapted from `counsel-tmm-prompt'."
(let (out
choice
chosen-string)
- (setq tmm-km-list nil)
- (map-keymap (lambda (k v) (tmm-get-keymap (cons k v))) menu)
- (setq tmm-km-list (nreverse tmm-km-list))
+ (setq tmm-km-list (tmm-init-km-list+ menu))
(setq out (frog-menu-read "Menu: " (mapcar #'car tmm-km-list)))
(setq choice (cdr (assoc out tmm-km-list)))
(setq chosen-string (car choice))
- [elpa] externals/frog-menu updated (927ff01 -> 3d99c10), Clemens Radermacher, 2020/05/21
- [elpa] externals/frog-menu 1bcc95f 01/12: Add menubar example, Clemens Radermacher, 2020/05/21
- [elpa] externals/frog-menu 06d5f17 03/12: Add mode menu entry command for example, Clemens Radermacher, 2020/05/21
- [elpa] externals/frog-menu ec633cd 02/12: Update example,
Clemens Radermacher <=
- [elpa] externals/frog-menu 9b2fd00 06/12: Require tmm for example, Clemens Radermacher, 2020/05/21
- [elpa] externals/frog-menu 4ef6586 09/12: Give frog-menu-posframe-background-face a default background color, Clemens Radermacher, 2020/05/21
- [elpa] externals/frog-menu 3d99c10 12/12: Bump version, Clemens Radermacher, 2020/05/21
- [elpa] externals/frog-menu 6898f09 04/12: Fix example, Clemens Radermacher, 2020/05/21
- [elpa] externals/frog-menu 0430a4f 05/12: Update example, Clemens Radermacher, 2020/05/21
- [elpa] externals/frog-menu ac85040 07/12: Add posframe border option as suggested by #7, Clemens Radermacher, 2020/05/21
- [elpa] externals/frog-menu 94c99cf 08/12: Add support for all collection formats of completing-read, Clemens Radermacher, 2020/05/21
- [elpa] externals/frog-menu 94a24ff 10/12: Fix hash collection types, Clemens Radermacher, 2020/05/21
- [elpa] externals/frog-menu d8e9325 11/12: Fix compiler errors, Clemens Radermacher, 2020/05/21