Push mark when using ido-imenu
;; Push mark when using ido-imenu | |
(defvar push-mark-before-goto-char nil) | |
(defadvice goto-char (before push-mark-first activate) | |
(when push-mark-before-goto-char | |
(push-mark))) | |
(defun ido-imenu-push-mark () | |
(interactive) | |
(let ((push-mark-before-goto-char t)) | |
(ido-imenu))) |
This comment has been minimized.
This comment has been minimized.
Why not just advice ido-imenu? (defadvice ido-imenu (before push-mark activate)
(push-mark))
|
This comment has been minimized.
This comment has been minimized.
Good question -- isn't advicing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
It turns out that the ido-imenu command in use in the screencast is not in Emacs 24. I have no idea where it came from either, but here's the code for that aswell: https://gist.github.com/2360578