From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59253 Path: main.gmane.org!not-for-mail From: Nelson Ferreira Newsgroups: gmane.emacs.gnus.general Subject: Re: Abbreviating modeline items related to Gnus Date: Mon, 22 Nov 2004 22:53:14 -0500 Organization: - none - Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1101182328 20303 80.91.229.6 (23 Nov 2004 03:58:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 Nov 2004 03:58:48 +0000 (UTC) Original-X-From: ding-owner+M7793@lists.math.uh.edu Tue Nov 23 04:58:33 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CWRp3-0005Lm-00 for ; Tue, 23 Nov 2004 04:58:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1CWRkI-0001sm-00; Mon, 22 Nov 2004 21:53:38 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1CWRk9-0001sh-00 for ding@lists.math.uh.edu; Mon, 22 Nov 2004 21:53:29 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1CWRk7-0004xp-5G for ding@lists.math.uh.edu; Mon, 22 Nov 2004 21:53:27 -0600 Original-Received: from main.gmane.org (main.gmane.org [80.91.229.2]) by justine.libertine.org (Postfix) with ESMTP id 948DD3A0036 for ; Mon, 22 Nov 2004 21:53:24 -0600 (CST) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CWRk2-0006cJ-00 for ; Tue, 23 Nov 2004 04:53:22 +0100 Original-Received: from pool-68-237-105-140.ny325.east.verizon.net ([68.237.105.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Nov 2004 04:53:21 +0100 Original-Received: from nelson.ferreira by pool-68-237-105-140.ny325.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Nov 2004 04:53:21 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 733 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: pool-68-237-105-140.ny325.east.verizon.net User-Agent: Gnus/5.110003 (No Gnus v0.3) XEmacs/21.5 (chestnut, linux) Cancel-Lock: sha1:JjpYHi0I/foaZpSkToGhzh01EWY= Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: main.gmane.org gmane.emacs.gnus.general:59253 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59253 --=-=-= Answering my own email :) "njsf" == Nelson Ferreira writes: njsf> Hi all, I did some searching on the info for Gnus and the njsf> reference about mode lines that I found only spoke about njsf> chopping Gnus contribution to it by setting njsf> gnus-mode-non-string-length. Ok, so in addition to this I found the following: ;------------------- ; gnus-article-mode-line-format ; User Option: *The format specification for the article mode line. ; gnus-category-mode-line-format ; Variable: The format specification for the category mode line. ; gnus-group-mode-line-format ; User Option: *The format specification for the group mode line. ; gnus-server-mode-line-format ; User Option: The format specification for the server mode line. ; gnus-summary-mode-line-format ; User Option: *The format specification for the summary mode line. ;------------------- [...] I am also attaching a patch to allow customizing of all Gnus related major and minor modes for any interested. Best regards, Nelson --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gnus-modename.patch Content-Description: the patch diff -u -u -b -r7.2 dig.el --- dig.el 20 May 2004 08:02:38 -0000 7.2 +++ dig.el 23 Nov 2004 03:44:38 -0000 @@ -47,6 +47,12 @@ :type 'file :group 'dig) +(defcustom dig-mode-name "dig" + "Dig Mode name for the modeline" + :type 'string + :group 'dig + :group 'gnus-mode-names) + (defcustom dig-dns-server nil "DNS server to query. If nil, use system defaults." @@ -139,7 +145,7 @@ "Major mode for displaying dig output." (interactive) (kill-all-local-variables) - (setq mode-name "dig") + (setq mode-name dig-mode-name) (setq major-mode 'dig-mode) (use-local-map dig-mode-map) (buffer-disable-undo) diff -u -u -b -r7.7 dns-mode.el --- dns-mode.el 14 Sep 2004 11:14:28 -0000 7.7 +++ dns-mode.el 23 Nov 2004 03:44:38 -0000 @@ -117,8 +117,14 @@ ;; Mode. +(defcustom dns-mode-name "DNS" + "DNS mode name for the modeline" + :type 'string + :group 'dns-mode + :group 'gnus-mode-names) + ;;;###autoload -(define-derived-mode dns-mode text-mode "DNS" +(define-derived-mode dns-mode text-mode dns-mode-name "Major mode for viewing and editing DNS master files. This mode is inherited from text mode. It add syntax highlighting, and some commands for handling DNS master files. diff -u -u -b -r7.35 gnus-agent.el --- gnus-agent.el 2 Nov 2004 02:54:23 -0000 7.35 +++ gnus-agent.el 23 Nov 2004 03:44:40 -0000 @@ -2550,6 +2550,12 @@ (gnus-run-hooks 'gnus-category-menu-hook))) +(defcustom gnus-category-mode-name "Category" + "Category Mode name for the modeline" + :type 'string + :group 'gnus-agent + :group 'gnus-mode-names) + (defun gnus-category-mode () "Major mode for listing and editing agent categories. @@ -2567,7 +2573,7 @@ (kill-all-local-variables) (gnus-simplify-mode-line) (setq major-mode 'gnus-category-mode) - (setq mode-name "Category") + (setq mode-name gnus-category-mode-name) (gnus-set-default-directory) (setq mode-line-process nil) (use-local-map gnus-category-mode-map) diff -u -u -b -r7.63 gnus-art.el --- gnus-art.el 14 Nov 2004 23:46:46 -0000 7.63 +++ gnus-art.el 23 Nov 2004 03:44:44 -0000 @@ -58,6 +58,13 @@ :link '(custom-manual "(gnus)Article Hiding") :group 'gnus-article) +(defcustom gnus-article-mode-name "Article" + "Article Mode name for the modeline" + :type 'string + :group 'gnus-article + :group 'gnus-mode-names) + + (defgroup gnus-article-hiding nil "Hiding article parts." :link '(custom-manual "(gnus)Article Hiding") @@ -3719,7 +3726,7 @@ \\[gnus-info-find-node]\t Go to the Gnus info node" (interactive) (gnus-simplify-mode-line) - (setq mode-name "Article") + (setq mode-name gnus-article-mode-name) (setq major-mode 'gnus-article-mode) (make-local-variable 'minor-mode-alist) (use-local-map gnus-article-mode-map) @@ -5646,7 +5653,14 @@ ["Body" message-goto-body t] ["Signature" message-goto-signature t])) -(define-derived-mode gnus-article-edit-mode message-mode "Article Edit" +(defcustom gnus-article-edit-mode-name "Article Edit" + "Gnus Article Edit mode name for the modeline" + :type 'string + :group 'gnus-article-various + :group 'gnus-mode-names) + + +(define-derived-mode gnus-article-edit-mode message-mode gnus-article-edit-mode-name "Major mode for editing articles. This is an extended text-mode. diff -u -u -b -r7.7 gnus-cus.el --- gnus-cus.el 24 Aug 2004 06:54:33 -0000 7.7 +++ gnus-cus.el 23 Nov 2004 03:44:45 -0000 @@ -36,6 +36,12 @@ ;;; Widgets: + +(defcustom gnus-custom-mode-name "Gnus Customize" + "Gnus Customize Mode name for the modeline" + :type 'string + :group 'gnus-mode-names) + (defun gnus-custom-mode () "Major mode for editing Gnus customization buffers. @@ -50,7 +56,7 @@ if that value is non-nil." (kill-all-local-variables) (setq major-mode 'gnus-custom-mode - mode-name "Gnus Customize") + mode-name gnus-custom-mode-name) (use-local-map widget-keymap) ;; Emacs 21 stuff: (when (and (facep 'custom-button-face) diff -u -u -b -r7.3 gnus-dired.el --- gnus-dired.el 20 May 2004 08:02:39 -0000 7.3 +++ gnus-dired.el 23 Nov 2004 03:44:45 -0000 @@ -62,6 +62,11 @@ "\C-c\C-m\C-l" gnus-dired-find-file-mailcap "\C-c\C-m\C-p" gnus-dired-print)) +(defcustom gnus-dired-mode-name "" + "Gnus DirEd mode name for the modeline" + :type 'string + :group 'gnus-mode-names) + (defun gnus-dired-mode (&optional arg) "Minor mode for intersections of gnus and dired. @@ -72,7 +77,7 @@ (if (null arg) (not gnus-dired-mode) (> (prefix-numeric-value arg) 0))) (when gnus-dired-mode - (add-minor-mode 'gnus-dired-mode "" gnus-dired-mode-map) + (add-minor-mode 'gnus-dired-mode gnus-dired-mode-name gnus-dired-mode-map) (gnus-run-hooks 'gnus-dired-mode-hook)))) ;;;###autoload diff -u -u -b -r7.7 gnus-draft.el --- gnus-draft.el 20 May 2004 08:02:39 -0000 7.7 +++ gnus-draft.el 23 Nov 2004 03:44:45 -0000 @@ -62,6 +62,11 @@ ["Send all messages" gnus-draft-send-all-messages t] ["Delete draft" gnus-summary-delete-article t])))) +(defcustom gnus-draft-mode-name " Draft" + "Gnus Draft mode name for the modeline" + :type 'string + :group 'gnus-mode-names) + (defun gnus-draft-mode (&optional arg) "Minor mode for providing a draft summary buffers. @@ -74,7 +79,7 @@ ;; Set up the menu. (when (gnus-visual-p 'draft-menu 'menu) (gnus-draft-make-menu-bar)) - (add-minor-mode 'gnus-draft-mode " Draft" gnus-draft-mode-map) + (add-minor-mode 'gnus-draft-mode gnus-draft-mode-name gnus-draft-mode-map) (mml-mode) (gnus-run-hooks 'gnus-draft-mode-hook)))) diff -u -u -b -r7.3 gnus-eform.el --- gnus-eform.el 24 Aug 2004 06:54:33 -0000 7.3 +++ gnus-eform.el 23 Nov 2004 03:44:45 -0000 @@ -69,6 +69,12 @@ ["Exit" gnus-edit-form-exit t])) (gnus-run-hooks 'gnus-edit-form-menu-hook))) +(defcustom gnus-edit-form-mode-name "Edit Form" + "Gnus Edit Form Mode name for the modeline" + :type 'string + :group 'gnus-edit-form + :group 'gnus-mode-names) + (defun gnus-edit-form-mode () "Major mode for editing forms. It is a slightly enhanced emacs-lisp-mode. @@ -79,7 +85,7 @@ (gnus-edit-form-make-menu-bar)) (kill-all-local-variables) (setq major-mode 'gnus-edit-form-mode) - (setq mode-name "Edit Form") + (setq mode-name gnus-edit-form-mode-name) (use-local-map gnus-edit-form-mode-map) (make-local-variable 'gnus-edit-form-done-function) (make-local-variable 'gnus-prev-winconf) diff -u -u -b -r7.32 gnus-group.el --- gnus-group.el 23 Oct 2004 07:45:12 -0000 7.32 +++ gnus-group.el 23 Nov 2004 03:44:48 -0000 @@ -124,6 +124,13 @@ :group 'gnus-group-levels :type 'boolean) +(defcustom gnus-group-mode-name "Group" + "Group Mode name for the modeline" + :type 'string + :group 'gnus-group-list + :group 'gnus-mode-names) + + (defcustom gnus-group-sort-function 'gnus-group-sort-by-alphabet "*Function used for sorting the group buffer. This function will be called with group info entries as the arguments @@ -1038,7 +1045,7 @@ (gnus-group-make-tool-bar)) (gnus-simplify-mode-line) (setq major-mode 'gnus-group-mode) - (setq mode-name "Group") + (setq mode-name gnus-group-mode-name) (gnus-group-set-mode-line) (setq mode-line-process nil) (use-local-map gnus-group-mode-map) diff -u -u -b -r7.4 gnus-kill.el --- gnus-kill.el 20 May 2004 08:02:39 -0000 7.4 +++ gnus-kill.el 23 Nov 2004 03:44:48 -0000 @@ -38,6 +38,12 @@ :group 'gnus-score-kill :type 'hook) +(defcustom gnus-kill-file-mode-name "Kill" + "Kill file Mode name for the modeline" + :type 'string + :group 'gnus-score-kill + :group 'gnus-mode-names) + (defcustom gnus-kill-expiry-days 7 "*Number of days before expiring unused kill file entries." :group 'gnus-score-kill @@ -159,7 +165,7 @@ (use-local-map gnus-kill-file-mode-map) (set-syntax-table emacs-lisp-mode-syntax-table) (setq major-mode 'gnus-kill-file-mode) - (setq mode-name "Kill") + (setq mode-name gnus-kill-file-mode-name) (lisp-mode-variables nil) (gnus-run-hooks 'emacs-lisp-mode-hook 'gnus-kill-file-mode-hook)) diff -u -u -b -r7.4 gnus-ml.el --- gnus-ml.el 20 May 2004 08:02:39 -0000 7.4 +++ gnus-ml.el 23 Nov 2004 03:44:48 -0000 @@ -89,6 +89,11 @@ (gnus-mailing-list-mode 1)) (gnus-message 1 "no list-post in this message.")))) +(defcustom gnus-mailing-list-mode-name " Mailing-List" + "Gnus Mailing list mode name for the modeline" + :type 'string + :group 'gnus-mode-names) + ;;;###autoload (defun gnus-mailing-list-mode (&optional arg) "Minor mode for providing mailing-list commands. @@ -102,7 +107,7 @@ ;; Set up the menu. (when (gnus-visual-p 'mailing-list-menu 'menu) (gnus-mailing-list-make-menu-bar)) - (add-minor-mode 'gnus-mailing-list-mode " Mailing-List" gnus-mailing-list-mode-map) + (add-minor-mode 'gnus-mailing-list-mode gnus-mailing-list-mode-name gnus-mailing-list-mode-map) (gnus-run-hooks 'gnus-mailing-list-mode-hook)))) ;;; Commands diff -u -u -b -r7.6 gnus-salt.el --- gnus-salt.el 10 Sep 2004 15:04:33 -0000 7.6 +++ gnus-salt.el 23 Nov 2004 03:44:49 -0000 @@ -46,6 +46,8 @@ :type 'boolean :group 'gnus-summary-pick) + + (defcustom gnus-pick-mode-hook nil "Hook run in summary pick mode buffers." :type 'hook @@ -106,6 +108,12 @@ ["Start reading" gnus-pick-start-reading t] ["Switch pick mode off" gnus-pick-mode gnus-pick-mode])))) +(defcustom gnus-pick-mode-name " Pick" + "Gnus Pick mode name for the modeline" + :type 'string + :group 'gnus-summary-pick + :group 'gnus-mode-names) + (defun gnus-pick-mode (&optional arg) "Minor mode for providing a pick-and-read interface in Gnus summary buffers. @@ -128,7 +136,7 @@ ;; Set up the menu. (when (gnus-visual-p 'pick-menu 'menu) (gnus-pick-make-menu-bar)) - (add-minor-mode 'gnus-pick-mode " Pick" gnus-pick-mode-map + (add-minor-mode 'gnus-pick-mode gnus-pick-mode-name gnus-pick-mode-map nil 'gnus-pick-mode) (gnus-run-hooks 'gnus-pick-mode-hook)))) @@ -345,6 +353,11 @@ '("Pick" ["Switch binary mode off" gnus-binary-mode t])))) +(defcustom gnus-binary-mode-name " Binary" + "Gnus Binary mode name for the modeline" + :type 'string + :group 'gnus-mode-names) + (defun gnus-binary-mode (&optional arg) "Minor mode for providing a binary group interface in Gnus summary buffers." (interactive "P") @@ -362,7 +375,7 @@ ;; Set up the menu. (when (gnus-visual-p 'binary-menu 'menu) (gnus-binary-make-menu-bar)) - (add-minor-mode 'gnus-binary-mode " Binary" + (add-minor-mode 'gnus-binary-mode gnus-binary-mode-name gnus-binary-mode-map nil 'gnus-binary-mode) (gnus-run-hooks 'gnus-binary-mode-hook)))) @@ -421,6 +434,12 @@ (function :tag "Other" nil)) :group 'gnus-summary-tree) +(defcustom gnus-tree-mode-name "Tree" + "Category Mode name for the modeline" + :type 'string + :group 'gnus-summary-tree + :group 'gnus-mode-names) + (defcustom gnus-tree-mode-hook nil "*Hook run in tree mode buffers." :type 'hook @@ -486,7 +505,7 @@ (gnus-tree-make-menu-bar)) (kill-all-local-variables) (gnus-simplify-mode-line) - (setq mode-name "Tree") + (setq mode-name gnus-tree-mode-name) (setq major-mode 'gnus-tree-mode) (use-local-map gnus-tree-mode-map) (buffer-disable-undo) @@ -980,6 +999,11 @@ (defvar gnus-carpal-header-face 'bold-italic "*Face used on carpal buffer headers.") +(defcustom gnus-carpal-mode-name "Gnus Carpal" + "Category Mode name for the modeline" + :type 'string + :group 'gnus-mode-names) + (defvar gnus-carpal-mode-map nil) (put 'gnus-carpal-mode 'mode-class 'special) @@ -1003,7 +1027,7 @@ (kill-all-local-variables) (setq mode-line-modified (cdr gnus-mode-line-modified)) (setq major-mode 'gnus-carpal-mode) - (setq mode-name "Gnus Carpal") + (setq mode-name gnus-carpal-mode-name) (setq mode-line-process nil) (use-local-map gnus-carpal-mode-map) (buffer-disable-undo) diff -u -u -b -r7.12 gnus-srvr.el --- gnus-srvr.el 2 Nov 2004 02:54:22 -0000 7.12 +++ gnus-srvr.el 23 Nov 2004 03:44:49 -0000 @@ -233,6 +233,12 @@ :group 'gnus-server-visual :type 'face) +(defcustom gnus-server-mode-name "Server" + "Server mode name for the modeline" + :type 'string + :group 'gnus-server + :group 'gnus-mode-names) + (defvar gnus-server-font-lock-keywords (list '("(\\(agent\\))" 1 gnus-server-agent-face) @@ -258,7 +264,7 @@ (kill-all-local-variables) (gnus-simplify-mode-line) (setq major-mode 'gnus-server-mode) - (setq mode-name "Server") + (setq mode-name gnus-server-mode-name) (gnus-set-default-directory) (setq mode-line-process nil) (use-local-map gnus-server-mode-map) @@ -833,6 +839,11 @@ (gnus-message 5 "Connecting to %s...done" (nth 1 method)) t)))) +(defcustom gnus-browse-mode-name "Browse Server" + "Browse Server Mode name for the modeline" + :type 'string + :group 'gnus-mode-name) + (defun gnus-browse-mode () "Major mode for browsing a foreign server. @@ -854,7 +865,7 @@ (gnus-browse-make-menu-bar)) (gnus-simplify-mode-line) (setq major-mode 'gnus-browse-mode) - (setq mode-name "Browse Server") + (setq mode-name gnus-browse-mode-name) (setq mode-line-process nil) (use-local-map gnus-browse-mode-map) (buffer-disable-undo) diff -u -u -b -r7.29 gnus-start.el --- gnus-start.el 15 Nov 2004 05:31:51 -0000 7.29 +++ gnus-start.el 23 Nov 2004 03:44:51 -0000 @@ -2911,9 +2911,14 @@ (defvar gnus-slave-mode nil) +(defcustom gnus-slave-mode-name " Slave" + "Gnus Slave mode name for the modeline" + :type 'string + :group 'gnus-mode-names) + (defun gnus-slave-mode () "Minor mode for slave Gnusae." - (add-minor-mode 'gnus-slave-mode " Slave" (make-sparse-keymap)) + (add-minor-mode 'gnus-slave-mode gnus-slave-mode-name (make-sparse-keymap)) (gnus-run-hooks 'gnus-slave-mode-hook)) (defun gnus-slave-save-newsrc () diff -u -u -b -r7.66 gnus-sum.el --- gnus-sum.el 7 Nov 2004 22:00:10 -0000 7.66 +++ gnus-sum.el 23 Nov 2004 03:44:58 -0000 @@ -2731,6 +2731,11 @@ (list (nreverse outh)))))))) +(defcustom gnus-summary-mode-name "Summary" + "Summary Mode name for the modeline" + :type 'string + :group 'gnus-summary + :group 'gnus-mode-name) (defun gnus-summary-mode (&optional group) "Major mode for reading articles. @@ -2763,7 +2768,7 @@ (gnus-make-thread-indent-array) (gnus-simplify-mode-line) (setq major-mode 'gnus-summary-mode) - (setq mode-name "Summary") + (setq mode-name gnus-summary-mode-name) (make-local-variable 'minor-mode-alist) (use-local-map gnus-summary-mode-map) (buffer-disable-undo) @@ -6833,6 +6838,11 @@ (defvar gnus-dead-summary-mode nil "Minor mode for Gnus summary buffers.") + +(defcustom gnus-dead-summary-mode-name " Dead" + "Gnus dead summary ode name for the modeline" + :type 'string + :group 'gnus-mode-names) (defun gnus-dead-summary-mode (&optional arg) "Minor mode for Gnus summary buffers." diff -u -u -b -r7.10 gnus-topic.el --- gnus-topic.el 5 Oct 2004 23:13:27 -0000 7.10 +++ gnus-topic.el 23 Nov 2004 03:44:59 -0000 @@ -1120,6 +1120,12 @@ ["Edit parameters" gnus-topic-edit-parameters t]) ["List active" gnus-topic-list-active t])))) +(defcustom gnus-topic-mode-name " Topic" + "Gnus Topic mode name for the modeline" + :type 'string + :group 'gnus-topic + :group 'gnus-mode-names) + (defun gnus-topic-mode (&optional arg redisplay) "Minor mode for topicsifying Gnus group buffers." (interactive (list current-prefix-arg t)) @@ -1134,7 +1140,7 @@ (when (gnus-visual-p 'topic-menu 'menu) (gnus-topic-make-menu-bar)) (gnus-set-format 'topic t) - (add-minor-mode 'gnus-topic-mode " Topic" + (add-minor-mode 'gnus-topic-mode gnus-topic-mode-name gnus-topic-mode-map nil (lambda (&rest junk) (interactive) (gnus-topic-mode nil t))) diff -u -u -b -r7.5 gnus-undo.el --- gnus-undo.el 26 Sep 2004 18:40:31 -0000 7.5 +++ gnus-undo.el 23 Nov 2004 03:44:59 -0000 @@ -98,6 +98,12 @@ (cons "Undo" 'gnus-undo-actions) [menu-bar file whatever]))) +(defcustom gnus-undo-mode-name "" + "Gnus Undo mode name for the modeline" + :type 'string + :group 'gnus-undo + :group 'gnus-mode-names) + (defun gnus-undo-mode (&optional arg) "Minor mode for providing `undo' in Gnus buffers. @@ -112,7 +118,7 @@ ;; Set up the menu. (when (gnus-visual-p 'undo-menu 'menu) (gnus-undo-make-menu-bar)) - (add-minor-mode 'gnus-undo-mode "" gnus-undo-mode-map) + (add-minor-mode 'gnus-undo-mode gnus-undo-mode-name gnus-undo-mode-map) (gnus-make-local-hook 'post-command-hook) (add-hook 'post-command-hook 'gnus-undo-boundary nil t) (gnus-run-hooks 'gnus-undo-mode-hook))) diff -u -u -b -r7.31 gnus.el --- gnus.el 2 Nov 2004 02:54:23 -0000 7.31 +++ gnus.el 23 Nov 2004 03:45:01 -0000 @@ -41,6 +41,10 @@ :group 'news :group 'mail) +(defgroup gnus-mode-names nil + "Dealing with mode names on the modeline." + :group 'gnus) + (defgroup gnus-format nil "Dealing with formatting issues." :group 'gnus) diff -u -u -b -r7.59 message.el --- message.el 14 Nov 2004 14:27:44 -0000 7.59 +++ message.el 23 Nov 2004 03:45:05 -0000 @@ -2447,8 +2447,14 @@ (remove-text-properties (car from-to) (cdr from-to) message-forbidden-properties)))) +(defcustom message-mode-name "Message" + "Message mode name for the modeline" + :type 'string + :group 'message + :group 'gnus-mode-names) + ;;;###autoload -(define-derived-mode message-mode text-mode "Message" +(define-derived-mode message-mode text-mode message-mode-name "Major mode for editing mail and news to be sent. Like Text Mode but with these additional commands:\\ C-c C-s `message-send' (send the message) C-c C-c `message-send-and-exit' diff -u -u -b -r7.19 mml.el --- mml.el 12 Oct 2004 02:26:51 -0000 7.19 +++ mml.el 23 Nov 2004 03:45:06 -0000 @@ -886,6 +886,11 @@ (defvar mml-mode nil "Minor mode for editing MML.") +(defcustom mml-mode-name " MML" + "MML mode name for the modeline" + :type 'string + :group 'gnus-mode-names) + (defun mml-mode (&optional arg) "Minor mode for editing MML. MML is the MIME Meta Language, a minor mode for composing MIME articles. @@ -896,7 +901,7 @@ (when (set (make-local-variable 'mml-mode) (if (null arg) (not mml-mode) (> (prefix-numeric-value arg) 0))) - (add-minor-mode 'mml-mode " MML" mml-mode-map) + (add-minor-mode 'mml-mode mml-mode-name mml-mode-map) (easy-menu-add mml-menu mml-mode-map) (when (boundp 'x-dnd-protocol-alist) (set (make-local-variable 'x-dnd-protocol-alist) diff -u -u -b -r7.3 score-mode.el --- score-mode.el 24 Aug 2004 06:54:33 -0000 7.3 +++ score-mode.el 23 Nov 2004 03:45:06 -0000 @@ -56,6 +56,12 @@ ;; We need this to cope with non-ASCII scoring. (defvar score-mode-coding-system mm-universal-coding-system) + +(defcustom gnus-score-mode-name "Score" + "Score Mode name for the modeline" + :type 'string + :group 'gnus-mode-name) + ;;;###autoload (defun gnus-score-mode () "Mode for editing Gnus score files. @@ -68,7 +74,7 @@ (gnus-score-make-menu-bar) (set-syntax-table score-mode-syntax-table) (setq major-mode 'gnus-score-mode) - (setq mode-name "Score") + (setq mode-name gnus-score-mode-name) (lisp-mode-variables nil) (make-local-variable 'gnus-score-edit-exit-function) (run-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook)) diff -u -u -b -r7.3 sieve-mode.el --- sieve-mode.el 20 May 2004 08:02:41 -0000 7.3 +++ sieve-mode.el 23 Nov 2004 03:45:06 -0000 @@ -171,8 +171,14 @@ ;; Code for Sieve editing mode. +(defcustom sieve-mode-name "Sieve" + "Sieve mode name for the modeline" + :type 'string + :group 'sieve + :group 'gnus-mode-names) + ;;;###autoload -(define-derived-mode sieve-mode c-mode "Sieve" +(define-derived-mode sieve-mode c-mode sieve-mode-name "Major mode for editing Sieve code. This is much like C mode except for the syntax of comments. Its keymap inherits from C mode's and it has the same variables for customizing diff -u -u -b -r7.5 sieve.el --- sieve.el 2 Nov 2004 02:54:22 -0000 7.5 +++ sieve.el 23 Nov 2004 03:45:06 -0000 @@ -139,9 +139,16 @@ ["Activate script" sieve-activate t] ["Deactivate script" sieve-deactivate t])) -(define-derived-mode sieve-manage-mode fundamental-mode "SIEVE" +(defcustom sieve-manage-mode-name "SIEVE" + "Sieve mode name for the modeline" + :type 'string + :group 'sieve + :group 'gnus-mode-names) + + +(define-derived-mode sieve-manage-mode fundamental-mode sieve-manage-mode-name "Mode used for sieve script management." - (setq mode-name "SIEVE") + (setq mode-name sieve-manage-mode-name) (buffer-disable-undo (current-buffer)) (setq truncate-lines t) (easy-menu-add sieve-manage-mode-menu sieve-manage-mode-map)) diff -u -u -b -r7.5 smime.el --- smime.el 19 Sep 2004 20:24:26 -0000 7.5 +++ smime.el 23 Nov 2004 03:45:06 -0000 @@ -569,6 +569,12 @@ (define-key smime-mode-map "q" 'smime-exit) (define-key smime-mode-map "f" 'smime-certificate-info)) +(defcustom smime-mode-name "SMIME" + "SMIME mode name for the modeline" + :type 'string + :group 'smime + :group 'gnus-mode-names) + (defun smime-mode () "Major mode for browsing, viewing and fetching certificates. @@ -581,7 +587,7 @@ (interactive) (kill-all-local-variables) (setq major-mode 'smime-mode) - (setq mode-name "SMIME") + (setq mode-name smime-mode-name) (setq mode-line-process nil) (use-local-map smime-mode-map) (buffer-disable-undo) --=-=-= -- Nelson Ferreira --=-=-=--