Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[Refactor] parse-keymap

Use `push'. Explicitly pass the output variable `commands'.
  • Loading branch information...
commit 068339e7e6af525d6b94ebd74870828f7372981e 1 parent 45fb863
@purcell purcell authored committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 smex.el
View
8 smex.el
@@ -436,16 +436,16 @@ Returns nil when reaching the end of the list."
(defun smex-extract-commands-from-keymap (map)
(let (commands)
- (smex-parse-keymap map)
+ (smex-parse-keymap map commands)
commands))
-(defun smex-parse-keymap (map)
+(defun smex-parse-keymap (map commands)
(map-keymap (lambda (binding element)
(if (and (listp element) (eq 'keymap (car element)))
- (smex-parse-keymap element)
+ (smex-parse-keymap element commands)
; Strings are commands, too. Reject them.
(if (and (symbolp element) (commandp element))
- (setq commands (cons element commands)))))
+ (push element commands))))
map))
(defun smex-extract-commands-from-features (mode)
Please sign in to comment.
Something went wrong with that request. Please try again.