mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(gnus-simplify-mode-line): New function to simplify the
mode line in a safer manner. (gnus-group-mode, gnus-browse-mode, gnus-summary-mode, gnus-article-mode, gnus-server-mode): Use the function.
This commit is contained in:
parent
8bb6fec9b4
commit
a828a776d8
1 changed files with 15 additions and 25 deletions
40
lisp/gnus.el
40
lisp/gnus.el
|
|
@ -2842,6 +2842,16 @@ that that variable is buffer-local to the summary buffers."
|
|||
"Return the quit-config of GROUP."
|
||||
(nth 1 (assoc 'quit-config (gnus-find-method-for-group group))))
|
||||
|
||||
(defun gnus-simplify-mode-line ()
|
||||
"Make mode lines a bit simpler."
|
||||
(setq mode-line-modified "-- ")
|
||||
(if (listp mode-line-format)
|
||||
(progn
|
||||
(make-local-variable 'mode-line-format)
|
||||
(setq mode-line-format (copy-sequence mode-line-format))
|
||||
(and (equal (nth 3 mode-line-format) " ")
|
||||
(setcar (nthcdr 3 mode-line-format) "")))))
|
||||
|
||||
;;; List and range functions
|
||||
|
||||
(defun gnus-last-element (list)
|
||||
|
|
@ -3218,11 +3228,7 @@ The following commands are available:
|
|||
(interactive)
|
||||
(if gnus-visual (gnus-group-make-menu-bar))
|
||||
(kill-all-local-variables)
|
||||
(setq mode-line-modified "-- ")
|
||||
(make-local-variable 'mode-line-format)
|
||||
(setq mode-line-format (copy-sequence mode-line-format))
|
||||
(and (equal (nth 3 mode-line-format) " ")
|
||||
(setcar (nthcdr 3 mode-line-format) ""))
|
||||
(gnus-simplify-mode-line)
|
||||
(setq major-mode 'gnus-group-mode)
|
||||
(setq mode-name "Group")
|
||||
(gnus-group-set-mode-line)
|
||||
|
|
@ -5158,11 +5164,7 @@ buffer.
|
|||
(interactive)
|
||||
(kill-all-local-variables)
|
||||
(if gnus-visual (gnus-browse-make-menu-bar))
|
||||
(setq mode-line-modified "-- ")
|
||||
(make-local-variable 'mode-line-format)
|
||||
(setq mode-line-format (copy-sequence mode-line-format))
|
||||
(and (equal (nth 3 mode-line-format) " ")
|
||||
(setcar (nthcdr 3 mode-line-format) ""))
|
||||
(gnus-simplify-mode-line)
|
||||
(setq major-mode 'gnus-browse-mode)
|
||||
(setq mode-name "Browse Server")
|
||||
(setq mode-line-process nil)
|
||||
|
|
@ -5643,11 +5645,7 @@ The following commands are available:
|
|||
(set (car locals) nil))
|
||||
(setq locals (cdr locals))))
|
||||
(gnus-make-thread-indent-array)
|
||||
(setq mode-line-modified "-- ")
|
||||
(make-local-variable 'mode-line-format)
|
||||
(setq mode-line-format (copy-sequence mode-line-format))
|
||||
(and (equal (nth 3 mode-line-format) " ")
|
||||
(setcar (nthcdr 3 mode-line-format) ""))
|
||||
(gnus-simplify-mode-line)
|
||||
(setq major-mode 'gnus-summary-mode)
|
||||
(setq mode-name "Summary")
|
||||
(make-local-variable 'minor-mode-alist)
|
||||
|
|
@ -10769,11 +10767,7 @@ The following commands are available:
|
|||
(interactive)
|
||||
(if gnus-visual (gnus-article-make-menu-bar))
|
||||
(kill-all-local-variables)
|
||||
(setq mode-line-modified "-- ")
|
||||
(make-local-variable 'mode-line-format)
|
||||
(setq mode-line-format (copy-sequence mode-line-format))
|
||||
(and (equal (nth 3 mode-line-format) " ")
|
||||
(setcar (nthcdr 3 mode-line-format) ""))
|
||||
(gnus-simplify-mode-line)
|
||||
(setq mode-name "Article")
|
||||
(setq major-mode 'gnus-article-mode)
|
||||
(make-local-variable 'minor-mode-alist)
|
||||
|
|
@ -13617,11 +13611,7 @@ The following commands are available:
|
|||
(interactive)
|
||||
(if gnus-visual (gnus-server-make-menu-bar))
|
||||
(kill-all-local-variables)
|
||||
(setq mode-line-modified "-- ")
|
||||
(make-local-variable 'mode-line-format)
|
||||
(setq mode-line-format (copy-sequence mode-line-format))
|
||||
(and (equal (nth 3 mode-line-format) " ")
|
||||
(setcar (nthcdr 3 mode-line-format) ""))
|
||||
(gnus-simplify-mode-line)
|
||||
(setq major-mode 'gnus-server-mode)
|
||||
(setq mode-name "Server")
|
||||
; (gnus-group-set-mode-line)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue