diff options
author | Lars Magne Ingebrigtsen <larsi@gnus.org> | 1997-09-24 01:50:24 +0000 |
---|---|---|
committer | Lars Magne Ingebrigtsen <larsi@gnus.org> | 1997-09-24 01:50:24 +0000 |
commit | a8151ef7e5caf46b41fc52f8189b07d1fa6c184e (patch) | |
tree | 8eb82a1990da4afe2e247c1397e42a20128f0568 /lisp/gnus/gnus-salt.el | |
parent | 5f016f400343a57d641642ce114f90d3a15082e1 (diff) | |
download | emacs-a8151ef7e5caf46b41fc52f8189b07d1fa6c184e.tar.gz |
*** empty log message ***
Diffstat (limited to 'lisp/gnus/gnus-salt.el')
-rw-r--r-- | lisp/gnus/gnus-salt.el | 116 |
1 files changed, 71 insertions, 45 deletions
diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index c8f39b3cec2..1f680e29416 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -36,22 +36,32 @@ (defvar gnus-pick-mode nil "Minor mode for providing a pick-and-read interface in Gnus summary buffers.") -(defvar gnus-pick-display-summary nil - "*Display summary while reading.") - -(defvar gnus-pick-mode-hook nil - "Hook run in summary pick mode buffers.") - -(defvar gnus-mark-unpicked-articles-as-read nil - "*If non-nil, mark all unpicked articles as read.") - -(defvar gnus-pick-elegant-flow t - "If non-nil, gnus-pick-start-reading will run gnus-summary-next-group when no articles have been picked.") - -(defvar gnus-summary-pick-line-format +(defcustom gnus-pick-display-summary nil + "*Display summary while reading." + :type 'boolean + :group 'gnus-summary-pick) + +(defcustom gnus-pick-mode-hook nil + "Hook run in summary pick mode buffers." + :type 'hook + :group 'gnus-summary-pick) + +(defcustom gnus-mark-unpicked-articles-as-read nil + "*If non-nil, mark all unpicked articles as read." + :type 'boolean + :group 'gnus-summary-pick) + +(defcustom gnus-pick-elegant-flow t + "If non-nil, gnus-pick-start-reading will run gnus-summary-next-group when no articles have been picked." + :type 'boolean + :group 'gnus-summary-pick) + +(defcustom gnus-summary-pick-line-format "%-5P %U\%R\%z\%I\%(%[%4L: %-20,20n%]%) %s\n" "*The format specification of the lines in pick buffers. -It accepts the same format specs that `gnus-summary-line-format' does.") +It accepts the same format specs that `gnus-summary-line-format' does." + :type 'string + :group 'gnus-summary-pick) ;;; Internal variables. @@ -122,11 +132,7 @@ It accepts the same format specs that `gnus-summary-line-format' does.") ;; Set up the menu. (when (gnus-visual-p 'pick-menu 'menu) (gnus-pick-make-menu-bar)) - (unless (assq 'gnus-pick-mode minor-mode-alist) - (push '(gnus-pick-mode " Pick") minor-mode-alist)) - (unless (assq 'gnus-pick-mode minor-mode-map-alist) - (push (cons 'gnus-pick-mode gnus-pick-mode-map) - minor-mode-map-alist)) + (gnus-add-minor-mode 'gnus-pick-mode " Pick" gnus-pick-mode-map) (run-hooks 'gnus-pick-mode-hook)))) (defun gnus-pick-setup-message () @@ -160,7 +166,7 @@ If given a prefix, mark all unpicked articles as read." (if gnus-pick-elegant-flow (progn (when (or catch-up gnus-mark-unpicked-articles-as-read) - (gnus-summary-limit-mark-excluded-as-read)) + (gnus-summary-catchup nil t)) (if (gnus-group-quit-config gnus-newsgroup-name) (gnus-summary-exit) (gnus-summary-next-group))) @@ -329,11 +335,7 @@ This must be bound to a button-down mouse event." ;; Set up the menu. (when (gnus-visual-p 'binary-menu 'menu) (gnus-binary-make-menu-bar)) - (unless (assq 'gnus-binary-mode minor-mode-alist) - (push '(gnus-binary-mode " Binary") minor-mode-alist)) - (unless (assq 'gnus-binary-mode minor-mode-map-alist) - (push (cons 'gnus-binary-mode gnus-binary-mode-map) - minor-mode-map-alist)) + (gnus-add-minor-mode 'gnus-binary-mode " Binary" gnus-binary-mode-map) (run-hooks 'gnus-binary-mode-hook)))) (defun gnus-binary-display-article (article &optional all-header) @@ -352,16 +354,22 @@ This must be bound to a button-down mouse event." ;;; gnus-tree-mode ;;; -(defvar gnus-tree-line-format "%(%[%3,3n%]%)" - "Format of tree elements.") +(defcustom gnus-tree-line-format "%(%[%3,3n%]%)" + "Format of tree elements." + :type 'string + :group 'gnus-summary-tree) -(defvar gnus-tree-minimize-window t +(defcustom gnus-tree-minimize-window t "If non-nil, minimize the tree buffer window. If a number, never let the tree buffer grow taller than that number of -lines.") +lines." + :type 'boolean + :group 'gnus-summary-tree) -(defvar gnus-selected-tree-face 'modeline - "*Face used for highlighting selected articles in the thread tree.") +(defcustom gnus-selected-tree-face 'modeline + "*Face used for highlighting selected articles in the thread tree." + :type 'face + :group 'gnus-summary-tree) (defvar gnus-tree-brackets '((?\[ . ?\]) (?\( . ?\)) (?\{ . ?\}) (?< . ?>)) @@ -370,16 +378,24 @@ lines.") (defvar gnus-tree-parent-child-edges '(?- ?\\ ?|) "Characters used to connect parents with children.") -(defvar gnus-tree-mode-line-format "Gnus: %%b %S %Z" - "*The format specification for the tree mode line.") +(defcustom gnus-tree-mode-line-format "Gnus: %%b %S %Z" + "*The format specification for the tree mode line." + :type 'string + :group 'gnus-summary-tree) -(defvar gnus-generate-tree-function 'gnus-generate-vertical-tree +(defcustom gnus-generate-tree-function 'gnus-generate-vertical-tree "*Function for generating a thread tree. Two predefined functions are available: -`gnus-generate-horizontal-tree' and `gnus-generate-vertical-tree'.") +`gnus-generate-horizontal-tree' and `gnus-generate-vertical-tree'." + :type '(radio (function-item gnus-generate-vertical-tree) + (function-item gnus-generate-horizontal-tree) + (function :tag "Other" nil)) + :group 'gnus-summary-tree) -(defvar gnus-tree-mode-hook nil - "*Hook run in tree mode buffers.") +(defcustom gnus-tree-mode-hook nil + "*Hook run in tree mode buffers." + :type 'hook + :group 'gnus-summary-tree) ;;; Internal variables. @@ -412,6 +428,7 @@ Two predefined functions are available: "\r" gnus-tree-select-article gnus-mouse-2 gnus-tree-pick-article "\C-?" gnus-tree-read-summary-keys + "h" gnus-tree-show-summary "\C-c\C-i" gnus-info-find-node) @@ -462,6 +479,14 @@ Two predefined functions are available: (goto-char (or (gnus-overlay-end gnus-selected-tree-overlay) 1))) (gnus-tree-minimize)))) +(defun gnus-tree-show-summary () + "Reconfigure windows to show summary buffer." + (interactive) + (if (not (gnus-buffer-live-p gnus-summary-buffer)) + (error "There is no summary buffer for this tree buffer") + (gnus-configure-windows 'article) + (gnus-summary-goto-subject gnus-current-article))) + (defun gnus-tree-select-article (article) "Select the article under point, if any." (interactive (list (gnus-tree-article-number))) @@ -648,7 +673,9 @@ Two predefined functions are available: "Generate a horizontal tree." (let* ((dummy (stringp (car thread))) (do (or dummy - (memq (mail-header-number (car thread)) gnus-tmp-limit))) + (and (car thread) + (memq (mail-header-number (car thread)) + gnus-tmp-limit)))) col beg) (if (not do) ;; We don't want this article. @@ -720,13 +747,12 @@ Two predefined functions are available: (delete-char -1) (insert (cadr gnus-tree-parent-child-edges)) (setq beg (point)) + (forward-char -1) ;; Draw "-" lines leftwards. - (while (progn - (unless (bolp) - (forward-char -2)) - (= (following-char) ? )) - (delete-char 1) - (insert (car gnus-tree-parent-child-edges))) + (while (= (char-after (1- (point))) ? ) + (delete-char -1) + (insert (car gnus-tree-parent-child-edges)) + (forward-char -1)) (goto-char beg) (gnus-tree-forward-line 1))) (setq dummyp nil) @@ -926,7 +952,7 @@ The following commands are available: \\{gnus-carpal-mode-map}" (interactive) (kill-all-local-variables) - (setq mode-line-modified "-- ") + (setq mode-line-modified (cdr gnus-mode-line-modified)) (setq major-mode 'gnus-carpal-mode) (setq mode-name "Gnus Carpal") (setq mode-line-process nil) |