Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Helm M-[ issue
This plagued ergoemacs-mode for a long time... But I fixed it :)

See Issue #321.

You may want to be careful of M-[ M-O and ESC in the future as well. Emacs suggests you don't bind these keys at all:

http://www.gnu.org/software/emacs/manual/html_node/elisp/Translation-Keymaps.html

```
... it is better to avoid binding commands to key sequences where the end of the key sequence is a prefix of a key translation. The main such problematic suffixes/prefixes are <ESC>, M-O (which is really <ESC> O) and M-[ (which is really <ESC> [).
```
  • Loading branch information
mattfidler committed Nov 9, 2013
1 parent 0df7418 commit 83b089a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion helm.el
Expand Up @@ -4179,11 +4179,23 @@ If PREV is non-nil move to precedent."
prev)))
(helm-mark-current-line)))

(defvar helm-prev-visible-mark-timeout 0.02)
;;;###autoload
(defun helm-prev-visible-mark ()
"Move previous helm visible mark."
(interactive)
(helm-next-visible-mark t))
(if window-system
(helm-next-visible-mark t)
(let ((current-keys (key-description (this-command-keys)))
(next-key (with-timeout (helm-prev-visible-mark-timeout nil)
(eval (macroexpand `(key-description [,(read-key)]))))))
(cond
(next-key
(setq unread-command-events
(listify-key-sequence
(read-kbd-macro (concat current-keys " " next-key)))))
(t
(helm-next-visible-mark t))))))

;; Utility: Selection Paste
;;;###autoload
Expand Down

0 comments on commit 83b089a

Please sign in to comment.