help-mode: fix links to already open buffers
This commit is contained in:
parent
f1a4db0f61
commit
ea13be53b1
1 changed files with 6 additions and 3 deletions
|
@ -72,7 +72,8 @@
|
||||||
(let ((location
|
(let ((location
|
||||||
(find-function-search-for-symbol fun nil file)))
|
(find-function-search-for-symbol fun nil file)))
|
||||||
(doom/popup-save
|
(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)
|
(if (cdr location)
|
||||||
(goto-char (cdr location))
|
(goto-char (cdr location))
|
||||||
(message "Unable to find location in file")))))
|
(message "Unable to find location in file")))))
|
||||||
|
@ -84,7 +85,8 @@
|
||||||
(setq file (help-C-file-name var 'var)))
|
(setq file (help-C-file-name var 'var)))
|
||||||
(let ((location (find-variable-noselect var file)))
|
(let ((location (find-variable-noselect var file)))
|
||||||
(doom/popup-save
|
(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)
|
(if (cdr location)
|
||||||
(goto-char (cdr location))
|
(goto-char (cdr location))
|
||||||
(message "Unable to find location in file")))))
|
(message "Unable to find location in file")))))
|
||||||
|
@ -96,7 +98,8 @@
|
||||||
(let ((location
|
(let ((location
|
||||||
(find-function-search-for-symbol fun 'defface file)))
|
(find-function-search-for-symbol fun 'defface file)))
|
||||||
(doom/popup-save
|
(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)
|
(if (cdr location)
|
||||||
(goto-char (cdr location))
|
(goto-char (cdr location))
|
||||||
(message "Unable to find location in file"))))))
|
(message "Unable to find location in file"))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue