branch: master
commit 9413acb435721737d446ea66f2c3c6611d2f23f1
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    counsel.el (counsel--find-symbol): Allow to jump back with pop-tag-mark
    
    Using "C-." in:
    
    - counsel-describe-function
    - counsel-describe-variable
    - counsel-load-library
    
    will change the current buffer. The buffer and point can be restored
    with "M-*" (`pop-tag-mark').
    
    I also recommend this binding:
    
        (global-set-key (kbd "M-,") 'pop-tag-mark)
---
 counsel.el |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/counsel.el b/counsel.el
index bf901fb..7332e89 100644
--- a/counsel.el
+++ b/counsel.el
@@ -33,6 +33,7 @@
 ;;; Code:
 
 (require 'swiper)
+(require 'etags)
 
 (defvar counsel-completion-beg nil
   "Completion bounds start.")
@@ -169,6 +170,7 @@
 
 (defun counsel--find-symbol (x)
   "Find symbol definition that corresponds to string X."
+  (ring-insert find-tag-marker-ring (point-marker))
   (let ((full-name (get-text-property 0 'full-name x)))
     (if full-name
         (find-library full-name)

Reply via email to