X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;ds=sidebyside;f=lisp%2Fgnus-sum.el;h=c77fd1c4aa3249f6373a8e3e9d3af2ca5c13b64c;hb=f8c04a9fc670e7a6a3cf49b5240c6302fb0b5fba;hp=cc1c3823c9fb5fe242d781dbbd846f948576bd55;hpb=ca9880f98c58290a72dc5ad8efbe966bdea725a1;p=gnus diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index cc1c3823c..c77fd1c4a 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -3109,16 +3109,6 @@ The following commands are available: ;; Simple nil-valued local variable. (set (make-local-variable local) nil))))) -(defun gnus-summary-clear-local-variables () - (let ((locals gnus-summary-local-variables)) - (while locals - (if (consp (car locals)) - (and (symbolp (caar locals)) - (set (caar locals) nil)) - (and (symbolp (car locals)) - (set (car locals) nil))) - (setq locals (cdr locals))))) - ;; Summary data functions. (defmacro gnus-data-number (data) @@ -6939,11 +6929,13 @@ displayed, no centering will be performed." ;; Various summary commands (defun gnus-summary-select-article-buffer () - "Reconfigure windows to show article buffer." + "Reconfigure windows to show the article buffer." (interactive) (if (not (gnus-buffer-live-p gnus-article-buffer)) (error "There is no article buffer for this summary buffer") - (gnus-configure-windows 'article) + (unless (get-buffer-window gnus-article-buffer) + (gnus-summary-show-article)) + (gnus-configure-windows 'article t) (select-window (get-buffer-window gnus-article-buffer)))) (defun gnus-summary-universal-argument (arg) @@ -7129,13 +7121,6 @@ If FORCE (the prefix), also save the .newsrc file(s)." (progn (gnus-deaden-summary) (setq mode nil)) - ;; We set all buffer-local variables to nil. It is unclear why - ;; this is needed, but if we don't, buffer-local variables are - ;; not garbage-collected, it seems. This would the lead to en - ;; ever-growing Emacs. - (gnus-summary-clear-local-variables) - (let ((gnus-summary-local-variables gnus-newsgroup-variables)) - (gnus-summary-clear-local-variables)) (when (get-buffer gnus-article-buffer) (bury-buffer gnus-article-buffer)) ;; Return to group mode buffer. @@ -7194,9 +7179,6 @@ If FORCE (the prefix), also save the .newsrc file(s)." (if (not gnus-kill-summary-on-exit) (gnus-deaden-summary) (gnus-close-group group) - (gnus-summary-clear-local-variables) - (let ((gnus-summary-local-variables gnus-newsgroup-variables)) - (gnus-summary-clear-local-variables)) (gnus-kill-buffer gnus-summary-buffer)) (unless gnus-single-article-buffer (setq gnus-article-current nil)) @@ -7844,7 +7826,8 @@ If at the beginning of the article, go to the next article." (defun gnus-summary-scroll-up (lines) "Scroll up (or down) one line current article. -Argument LINES specifies lines to be scrolled up (or down if negative)." +Argument LINES specifies lines to be scrolled up (or down if negative). +If no article is selected, then the current article will be selected first." (interactive "p") (gnus-configure-windows 'article) (gnus-summary-show-thread) @@ -7860,7 +7843,8 @@ Argument LINES specifies lines to be scrolled up (or down if negative)." (defun gnus-summary-scroll-down (lines) "Scroll down (or up) one line current article. -Argument LINES specifies lines to be scrolled down (or up if negative)." +Argument LINES specifies lines to be scrolled down (or up if negative). +If no article is selected, then the current article will be selected first." (interactive "p") (gnus-summary-scroll-up (- lines)))