David Reitter wrote: > I've advised my switch-to-buffer to open buffers in new frames in order > to take advantage of my native window manager. > > Turns out that this doesn't work at all for links to source code in > help mode. When a link to a source definition is clicked in a help > buffer (suppose you have done C-h f <function>), the source file opens > in SOME other window - probably the one that the help buffer was called > from. > > Now I don't like that at all, and I've gone through the sources to find > out how a link is followed, but I'm still clueless. > > Why doesn't link-following go through switch-to-buffer-other-window?
Because it goes through pop-to-buffer (see describe-function-1 in help.el): (if file-name (progn (princ " in `") ;; We used to add .el to the file name, ;; but that's completely wrong when the user used load-file. (princ file-name) (princ "'") ;; Make a hyperlink to the library. (with-current-buffer "*Help*" (save-excursion (re-search-backward "`\\([^`']+\\)'" nil t) (help-xref-button 1 #'(lambda (fun file) (require 'find-func) ;; Don't use find-function-noselect because it follows ;; aliases (which fails for built-in functions). (let* ((location (find-function-search-for-symbol fun nil file))) (pop-to-buffer (car location)) (goto-char (cdr location)))) (list function file-name) "mouse-2, RET: find function's definition"))))) -- Kevin Rodgers _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs