Skip to content

Instantly share code, notes, and snippets.

@priyadarshan
Forked from magnars/gist:2350388
Created May 8, 2012 17:30
Show Gist options
  • Save priyadarshan/2637666 to your computer and use it in GitHub Desktop.
Save priyadarshan/2637666 to your computer and use it in GitHub Desktop.
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)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment