From ea13be53b1b0ec64dc8cadf9d5b84e0570912566 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 8 Jun 2016 14:40:01 -0400 Subject: [PATCH] help-mode: fix links to already open buffers --- core/core-popup.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/core-popup.el b/core/core-popup.el index 97282b25a..eb8ba1d63 100644 --- a/core/core-popup.el +++ b/core/core-popup.el @@ -72,7 +72,8 @@ (let ((location (find-function-search-for-symbol fun nil file))) (doom/popup-save - (switch-to-buffer (car location) nil t)) + (switch-to-buffer (car location) nil t) + (awhen (cdr location) (goto-char it))) (if (cdr location) (goto-char (cdr location)) (message "Unable to find location in file"))))) @@ -84,7 +85,8 @@ (setq file (help-C-file-name var 'var))) (let ((location (find-variable-noselect var file))) (doom/popup-save - (switch-to-buffer (car location) nil t)) + (switch-to-buffer (car location) nil t) + (awhen (cdr location) (goto-char it))) (if (cdr location) (goto-char (cdr location)) (message "Unable to find location in file"))))) @@ -96,7 +98,8 @@ (let ((location (find-function-search-for-symbol fun 'defface file))) (doom/popup-save - (switch-to-buffer (car location) nil t)) + (switch-to-buffer (car location) nil t) + (awhen (cdr location) (goto-char it))) (if (cdr location) (goto-char (cdr location)) (message "Unable to find location in file"))))))