2001-11-27 14:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 27 Nov 2001 19:15:09 +0000 (19:15 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 27 Nov 2001 19:15:09 +0000 (19:15 +0000)
* gnus-topic.el (gnus-topic-mode): Add LOCAL for add-hook.

* message.el (message-mode): make-local-hook is harmless in Emacs 21.

* gnus-msg.el (gnus-configure-posting-styles): use
make-local-hook. Add LOCAL for add-hook.

lisp/ChangeLog
lisp/gnus-msg.el
lisp/gnus-topic.el
lisp/message.el

index df49f62..5dfe707 100644 (file)
@@ -1,3 +1,12 @@
+2001-11-27 14:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-topic.el (gnus-topic-mode): Add LOCAL for add-hook.
+
+       * message.el (message-mode): make-local-hook is harmless in Emacs 21.
+
+       * gnus-msg.el (gnus-configure-posting-styles): use
+       make-local-hook. Add LOCAL for add-hook.
+
 2001-11-27  Per Abrahamsen  <abraham@dina.kvl.dk>
 
        * message.el (message-mode): Use `make-local-hook' unless
index 1cece49..80abc5d 100644 (file)
@@ -1464,7 +1464,8 @@ this is a reply."
       (setq name (assq 'name results)
            address (assq 'address results))
       (setq results (delq name (delq address results)))
-      (make-local-variable 'message-setup-hook)
+      ;; make-local-hook is not obsolete in Emacs 20 or XEmacs.
+      (make-local-hook 'message-setup-hook)
       (dolist (result results)
        (add-hook 'message-setup-hook
                  (cond
@@ -1496,7 +1497,8 @@ this is a reply."
                           (let ((value ,(cdr result)))
                             (when value
                               (message-goto-eoh)
-                              (insert ,header ": " value "\n"))))))))))
+                              (insert ,header ": " value "\n")))))))) 
+                 nil 'local))
       (when (or name address)
        (add-hook 'message-setup-hook
                  `(lambda ()
@@ -1508,7 +1510,8 @@ this is a reply."
                       (save-excursion
                         (message-remove-header "From")
                         (message-goto-eoh)
-                        (insert "From: " (message-make-from) "\n")))))))))
+                        (insert "From: " (message-make-from) "\n"))))
+                 nil 'local)))))
 
 ;;; Allow redefinition of functions.
 
index 154de2d..ead95c3 100644 (file)
@@ -1104,7 +1104,8 @@ articles in the topic and its subtopics."
       (setq gnus-group-change-level-function 'gnus-topic-change-level)
       (setq gnus-goto-missing-group-function 'gnus-topic-goto-missing-group)
       (make-local-hook 'gnus-check-bogus-groups-hook)
-      (add-hook 'gnus-check-bogus-groups-hook 'gnus-topic-clean-alist)
+      (add-hook 'gnus-check-bogus-groups-hook 'gnus-topic-clean-alist 
+               nil 'local)
       (setq gnus-topology-checked-p nil)
       ;; We check the topology.
       (when gnus-newsrc-alist
index d5e5dca..e166ae8 100644 (file)
@@ -1727,10 +1727,12 @@ M-RET    `message-newline-and-reformat' (break the line and reformat)."
        (set (make-local-variable 'tool-bar-map) (message-tool-bar-map))))
   (easy-menu-add message-mode-menu message-mode-map)
   (easy-menu-add message-mode-field-menu message-mode-map)
+  ;; make-local-hook is harmless though obsolete in Emacs 21.
+  ;; Emacs 20 and XEmacs need make-local-hook. 
+  (make-local-hook 'after-change-functions)
   ;; Mmmm... Forbidden properties...
-  (unless (eq (get 'make-local-hook 'byte-compile) 'byte-compile-obsolete)
-    (eval '(make-local-hook 'after-change-functions)))
-  (add-hook 'after-change-functions 'message-strip-forbidden-properties nil t)
+  (add-hook 'after-change-functions 'message-strip-forbidden-properties 
+           nil 'local)
   ;; Allow mail alias things.
   (when (eq message-mail-alias-type 'abbrev)
     (if (fboundp 'mail-abbrevs-setup)