From: Taylor R Campbell Date: Fri, 30 Aug 2013 15:30:20 +0000 (+0000) Subject: Make `news-select-buffer' select in other window by default. X-Git-Tag: release-9.2.0~142 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b2f3e8689a959844fc91a1500e472db1a5f645cd;p=mit-scheme.git Make `news-select-buffer' select in other window by default. From Rich Loveland. --- diff --git a/src/edwin/snr.scm b/src/edwin/snr.scm index 14fce5874..51cab4a81 100644 --- a/src/edwin/snr.scm +++ b/src/edwin/snr.scm @@ -2128,22 +2128,26 @@ This unmarks the article indicated by point and any other articles in (update-buffer-news-thread-status buffer thread))))))) (define-command news-select-article - "Select a buffer containing the News article indicated by point." - () - (lambda () - (select-buffer - (let ((buffer (selected-buffer))) - (cond ((news-article-buffer? buffer) - buffer) - ((news-group-buffer? buffer) - (call-with-values - (lambda () - (get-article-buffer buffer (current-news-header) #t)) - (lambda (buffer new?) - new? - buffer))) - (else - (editor-error "No article selected."))))))) + "Select a buffer in the other window containing the News article at point. +With prefix arg, select the buffer in the same window." + "P" + (lambda (same-window?) + (let ((proc (if same-window? + select-buffer + select-buffer-other-window))) + (proc + (let ((buffer (selected-buffer))) + (cond ((news-article-buffer? buffer) + buffer) + ((news-group-buffer? buffer) + (call-with-values + (lambda () + (get-article-buffer buffer (current-news-header) #t)) + (lambda (buffer new?) + new? + buffer))) + (else + (editor-error "No article selected.")))))))) (define-command news-toggle-thread "Expand or collapse the current thread."