Created
September 11, 2013 22:09
-
-
Save mgalgs/6530478 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lazy-search-menu: Wrong number of arguments: (lambda (title info-alist &optional miss-match-exit-p recursion-p protect-function alternate-function execute-last-command-when-miss-match) "One key menu. | |
`TITLE' is the title of menu, can use any string. | |
`INFO-ALIST' is a special alist | |
that contains KEY, DESCRIBE and COMMAND. | |
`MISS-MATCH-EXIT-P' whether to hide popup help window | |
when keystroke can't match in menu. | |
`RECURSION-P' whether recursion execute self | |
when keystroke can't match in menu. | |
`PROTECT-FUNCTION' the protect function | |
that call in `unwind-protect'. | |
`ALTERNATE-FUNCTION' the alternate function execute at last. | |
`EXECUTE-LAST-COMMAND-WHEN-MISS-MATCH' whether to execute the | |
last command when it miss matches in key alist." (let ((self (function (lambda nil (one-key-menu title info-alist miss-match-exit-p recursion-p protect-function alternate-function execute-last-command-when-miss-match)))) last-key) (unwind-protect (let* ((event (read-event (if one-key-menu-call-first-time (progn (setq one-key-menu-call-first-time nil) (if one-key-popup-window ...)) ""))) (key (if (if (<= emacs-major-version 22) (with-no-warnings (char-valid-p event)) (characterp event)) (char-to-string event) (make-vector 1 event))) match-key) (cond ((catch (quote match) (progn (let* (... ... ... ...) (while ... ... ... ... ...) nil)) nil) (one-key-handle-last alternate-function self recursion-p)) ((one-key-match-keystroke key one-key-key-quit) (keyboard-quit)) ((one-key-match-keystroke key one-key-key-hide) (one-key-help-window-toggle title info-alist) (funcall self)) ((one-key-match-keystroke key one-key-key-help) (setq one-key-menu-show-help t) (funcall self)) ((one-key-match-keystroke key one-key-key-edit) (let* ((varname (concat "one-key-menu-" title "-alist")) (file (find-lisp-object-file-name ... ...))) (if file (progn (find-file-other-window file) (one-key-template-mode) (goto-char ...) (search-forward varname nil t) (setq one-key-help-window-configuration nil)) (message "Can't find associated source file!")))) ((one-key-match-keystroke key one-key-key-down) (one-key-help-window-scroll-up-line) (funcall self)) ((one-key-match-keystroke key one-key-key-up) (one-key-help-window-scroll-down-line) (funcall self)) ((one-key-match-keystroke key one-key-key-pgdown) (one-key-help-window-scroll-up) (funcall self)) ((one-key-match-keystroke key one-key-key-pgup) (one-key-help-window-scroll-down) (funcall self)) ...)) (setq one-key-menu-call-first-time t) (setq one-key-menu-show-help nil) (one-key-help-window-close) (if (and protect-function (functionp protect-function)) (call-interactively protect-function)) (if (and execute-last-command-when-miss-match last-key) (progn (one-key-execute-binding-command last-key)))))), 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment