* [PATCH] Some fixes for XEmacs
@ 2001-01-09 16:56 Didier Verna
0 siblings, 0 replies; only message in thread
From: Didier Verna @ 2001-01-09 16:56 UTC (permalink / raw)
Dear folks,
I'm going to apply the following patch to the CVS archive. This fixes
different things for XEmacs.
2001-01-09 Didier Verna <didier@xemacs.org>
* dgnushack.el (dgnushack-compile): give a dummy value to
`gnus-xmas-glyph-directory' for the time of compilation.
* gnus-xmas.el (gnus-xmas-glyph-directory): generate a
non-continuable error when the directory can't be found.
* gnus-agent.el: moved some XEmacs specific hook add-ons from
`gnus-xmas-[re]define' to avoid loosing user custom settings.
* gnus-art.el: ditto.
* gnus-group.el: ditto.
* gnus-salt.el: ditto.
* gnus-sum.el: ditto.
* gnus-topic.el: ditto.
* gnus-xmas.el (gnus-xmas-define): see above.
* gnus-xmas.el (gnus-xmas-redefine): see above.
Index: lisp/dgnushack.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/dgnushack.el,v
retrieving revision 6.4
diff -u -w -r6.4 dgnushack.el
--- lisp/dgnushack.el 2001/01/03 06:26:20 6.4
+++ lisp/dgnushack.el 2001/01/09 16:45:02
@@ -119,6 +119,10 @@
(let ((files (directory-files srcdir nil "^[^=].*\\.el$"))
;;(byte-compile-generate-call-tree t)
file elc)
+ ;; Avoid barfing (from gnus-xmas) because the etc directory is not yet
+ ;; installed.
+ (when (featurep 'xemacs)
+ (setq gnus-xmas-glyph-directory "dummy"))
(dolist (file '("dgnushack.el" "lpath.el"))
(setq files (delete file files)))
(when (featurep 'base64)
@@ -158,4 +162,3 @@
(byte-recompile-directory "." 0))
;;; dgnushack.el ends here
-
Index: lisp/gnus-agent.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-agent.el,v
retrieving revision 6.5
diff -u -w -r6.5 gnus-agent.el
--- lisp/gnus-agent.el 2001/01/06 00:24:07 6.5
+++ lisp/gnus-agent.el 2001/01/09 16:45:02
@@ -70,16 +70,28 @@
:group 'gnus-agent
:type 'hook)
+;; Extracted from gnus-xmas-redefine in order to preserve user settings
+(when (featurep 'xemacs)
+ (add-hook 'gnus-agent-group-mode-hook 'gnus-xmas-agent-group-menu-add))
+
(defcustom gnus-agent-summary-mode-hook nil
"Hook run in Agent summary minor modes."
:group 'gnus-agent
:type 'hook)
+;; Extracted from gnus-xmas-redefine in order to preserve user settings
+(when (featurep 'xemacs)
+ (add-hook 'gnus-agent-summary-mode-hook 'gnus-xmas-agent-summary-menu-add))
+
(defcustom gnus-agent-server-mode-hook nil
"Hook run in Agent summary minor modes."
:group 'gnus-agent
:type 'hook)
+;; Extracted from gnus-xmas-redefine in order to preserve user settings
+(when (featurep 'xemacs)
+ (add-hook 'gnus-agent-server-mode-hook 'gnus-xmas-agent-server-menu-add))
+
(defcustom gnus-agent-confirmation-function 'y-or-n-p
"Function to confirm when error happens."
:version "21.1"
Index: lisp/gnus-art.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-art.el,v
retrieving revision 6.50
diff -u -w -r6.50 gnus-art.el
--- lisp/gnus-art.el 2001/01/09 06:57:52 6.50
+++ lisp/gnus-art.el 2001/01/09 16:45:05
@@ -470,6 +470,13 @@
:type 'hook
:group 'gnus-article-various)
+(when (featurep 'xemacs)
+ ;; Extracted from gnus-xmas-define in order to preserve user settings
+ (when (fboundp 'turn-off-scroll-in-place)
+ (add-hook 'gnus-article-mode-hook 'turn-off-scroll-in-place))
+ ;; Extracted from gnus-xmas-redefine in order to preserve user settings
+ (add-hook 'gnus-article-mode-hook 'gnus-xmas-article-menu-add))
+
(defcustom gnus-article-menu-hook nil
"*Hook run after the creation of the article mode menu."
:type 'hook
Index: lisp/gnus-group.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-group.el,v
retrieving revision 6.15
diff -u -w -r6.15 gnus-group.el
--- lisp/gnus-group.el 2000/12/31 04:26:59 6.15
+++ lisp/gnus-group.el 2001/01/09 16:45:09
@@ -206,6 +206,11 @@
:options '(gnus-topic-mode)
:type 'hook)
+;; Extracted from gnus-xmas-redefine in order to preserve user settings
+(when (featurep 'xemacs)
+ (add-hook 'gnus-group-mode-hook 'gnus-xmas-group-menu-add)
+ (add-hook 'gnus-group-mode-hook 'gnus-xmas-setup-group-toolbar))
+
(defcustom gnus-group-menu-hook nil
"Hook run after the creation of the group mode menu."
:group 'gnus-group-various
Index: lisp/gnus-salt.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-salt.el,v
retrieving revision 6.1
diff -u -w -r6.1 gnus-salt.el
--- lisp/gnus-salt.el 2000/12/19 22:18:48 6.1
+++ lisp/gnus-salt.el 2001/01/09 16:45:09
@@ -36,7 +36,8 @@
;;;
(defvar gnus-pick-mode nil
- "Minor mode for providing a pick-and-read interface in Gnus summary buffers.")
+ "Minor mode for providing a pick-and-read interface in Gnus
+summary buffers.")
(defcustom gnus-pick-display-summary nil
"*Display summary while reading."
@@ -48,13 +49,17 @@
:type 'hook
:group 'gnus-summary-pick)
+(when (featurep 'xemacs)
+ (add-hook 'gnus-pick-mode-hook 'gnus-xmas-pick-menu-add))
+
(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' runs `gnus-summary-next-group' when no articles have been picked."
+ "If non-nil, `gnus-pick-start-reading' runs
+ `gnus-summary-next-group' when no articles have been picked."
:type 'boolean
:group 'gnus-summary-pick)
@@ -417,6 +422,11 @@
"*Hook run in tree mode buffers."
:type 'hook
:group 'gnus-summary-tree)
+
+(when (featurep 'xemacs)
+ (add-hook 'gnus-tree-mode-hook 'gnus-xmas-tree-menu-add)
+ (add-hook 'gnus-tree-mode-hook 'gnus-xmas-switch-horizontal-scrollbar-off))
+
;;; Internal variables.
Index: lisp/gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 6.35
diff -u -w -r6.35 gnus-sum.el
--- lisp/gnus-sum.el 2001/01/09 05:50:41 6.35
+++ lisp/gnus-sum.el 2001/01/09 16:45:14
@@ -650,6 +650,13 @@
:group 'gnus-summary-various
:type 'hook)
+;; Extracted from gnus-xmas-redefine in order to preserve user settings
+(when (featurep 'xemacs)
+ (add-hook 'gnus-summary-mode-hook 'gnus-xmas-summary-menu-add)
+ (add-hook 'gnus-summary-mode-hook 'gnus-xmas-setup-summary-toolbar)
+ (add-hook 'gnus-summary-mode-hook
+ 'gnus-xmas-switch-horizontal-scrollbar-off))
+
(defcustom gnus-summary-menu-hook nil
"*Hook run after the creation of the summary mode menu."
:group 'gnus-summary-visual
Index: lisp/gnus-topic.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-topic.el,v
retrieving revision 6.4
diff -u -w -r6.4 gnus-topic.el
--- lisp/gnus-topic.el 2000/12/22 18:21:25 6.4
+++ lisp/gnus-topic.el 2001/01/09 16:45:15
@@ -46,6 +46,9 @@
:type 'hook
:group 'gnus-topic)
+(when (featurep 'xemacs)
+ (add-hook 'gnus-topic-mode-hook 'gnus-xmas-topic-menu-add))
+
(defcustom gnus-topic-line-format "%i[ %(%{%n%}%) -- %A ]%v\n"
"Format of topic lines.
It works along the same lines as a normal formatting string,
Index: lisp/gnus-xmas.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-xmas.el,v
retrieving revision 6.3
diff -u -w -r6.3 gnus-xmas.el
--- lisp/gnus-xmas.el 2001/01/09 04:36:58 6.3
+++ lisp/gnus-xmas.el 2001/01/09 16:45:16
@@ -47,7 +47,8 @@
(unless gnus-xmas-glyph-directory
(unless (setq gnus-xmas-glyph-directory
(message-xmas-find-glyph-directory "gnus"))
- (gnus-error 1 "Can't find glyph directory. Possibly the `etc' directory is not installed.")))
+ (error "Can't find glyph directory. \
+Possibly the `etc' directory has not been installed.")))
;;(format "%02x%02x%02x" 114 66 20) "724214"
@@ -94,10 +95,6 @@
;; Don't warn about these undefined variables.
-(defvar gnus-group-mode-hook)
-(defvar gnus-summary-mode-hook)
-(defvar gnus-article-mode-hook)
-
;;defined in gnus.el
(defvar gnus-active-hashtb)
(defvar gnus-article-buffer)
@@ -436,9 +433,6 @@
(< emacs-minor-version 14))
(defalias 'gnus-set-text-properties 'gnus-xmas-set-text-properties))
- (when (fboundp 'turn-off-scroll-in-place)
- (add-hook 'gnus-article-mode-hook 'turn-off-scroll-in-place))
-
(unless (boundp 'standard-display-table)
(setq standard-display-table nil))
@@ -483,30 +477,17 @@
(defalias 'gnus-annotation-in-region-p 'gnus-xmas-annotation-in-region-p)
(defalias 'gnus-mime-button-menu 'gnus-xmas-mime-button-menu)
- (add-hook 'gnus-group-mode-hook 'gnus-xmas-group-menu-add)
- (add-hook 'gnus-summary-mode-hook 'gnus-xmas-summary-menu-add)
- (add-hook 'gnus-article-mode-hook 'gnus-xmas-article-menu-add)
+ ;; These ones are not defcutom'ed, sometimes not even defvar'ed. They
+ ;; probably should. If that is done, the code below should then be moved
+ ;; where each variable is defined, in order not to mess with user settings.
+ ;; -- didier
(add-hook 'gnus-score-mode-hook 'gnus-xmas-score-menu-add)
-
- (add-hook 'gnus-pick-mode-hook 'gnus-xmas-pick-menu-add)
- (add-hook 'gnus-topic-mode-hook 'gnus-xmas-topic-menu-add)
- (add-hook 'gnus-tree-mode-hook 'gnus-xmas-tree-menu-add)
(add-hook 'gnus-binary-mode-hook 'gnus-xmas-binary-menu-add)
(add-hook 'gnus-grouplens-mode-hook 'gnus-xmas-grouplens-menu-add)
(add-hook 'gnus-server-mode-hook 'gnus-xmas-server-menu-add)
(add-hook 'gnus-browse-mode-hook 'gnus-xmas-browse-menu-add)
-
- (add-hook 'gnus-group-mode-hook 'gnus-xmas-setup-group-toolbar)
- (add-hook 'gnus-summary-mode-hook 'gnus-xmas-setup-summary-toolbar)
-
- (add-hook 'gnus-agent-summary-mode-hook 'gnus-xmas-agent-summary-menu-add)
- (add-hook 'gnus-agent-group-mode-hook 'gnus-xmas-agent-group-menu-add)
- (add-hook 'gnus-agent-server-mode-hook 'gnus-xmas-agent-server-menu-add)
-
(add-hook 'gnus-draft-mode-hook 'gnus-xmas-draft-menu-add)
- (add-hook 'gnus-summary-mode-hook
- 'gnus-xmas-switch-horizontal-scrollbar-off)
- (add-hook 'gnus-tree-mode-hook 'gnus-xmas-switch-horizontal-scrollbar-off))
+ (add-hook 'gnus-mailing-list-mode-hook 'gnus-xmas-mailing-list-menu-add))
;;; XEmacs logo and toolbar.
@@ -874,8 +855,6 @@
(defun gnus-xmas-mailing-list-menu-add ()
(gnus-xmas-menu-add mailing-list
gnus-mailing-list-menu))
-
-(add-hook 'gnus-mailing-list-mode-hook 'gnus-xmas-mailing-list-menu-add)
(provide 'gnus-xmas)
--
/ / _ _ Didier Verna http://www.inf.enst.fr/~verna/
- / / - / / /_/ / EPITA / LRDE mailto:didier@lrde.epita.fr
/_/ / /_/ / /__ / 14-16 rue Voltaire Tel. +33 (1) 53 14 59 47
94276 Kremlin-Bicêtre cedex Fax. +33 (1) 44 08 01 99
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-01-09 16:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-09 16:56 [PATCH] Some fixes for XEmacs Didier Verna
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).