From 25d722b1cf2cddd2382ded215fba3441c059e920 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Wed, 13 Sep 2000 16:02:16 +0000 Subject: [PATCH] (gnus-custom-mode): Conditionally set local variables for Emacs 21. (gnus-group-customize): Disable undo while laying out the buffer. --- lisp/gnus-cus.el | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/lisp/gnus-cus.el b/lisp/gnus-cus.el index 7af9c93ee..142049a7f 100644 --- a/lisp/gnus-cus.el +++ b/lisp/gnus-cus.el @@ -1,6 +1,6 @@ ;;; gnus-cus.el --- customization commands for Gnus ;; -;; Copyright (C) 1996,1999 Free Software Foundation, Inc. +;; Copyright (C) 1996,1999, 2000 Free Software Foundation, Inc. ;; Author: Per Abrahamsen ;; Keywords: news @@ -52,6 +52,21 @@ if that value is non-nil." (setq major-mode 'gnus-custom-mode mode-name "Gnus Customize") (use-local-map widget-keymap) + ;; Emacs 21 stuff: + (when (and (facep 'custom-button-face) + (facep 'custom-button-pressed-face)) + (set (make-local-variable 'widget-button-face) + 'custom-button-face) + (set (make-local-variable 'widget-button-pressed-face) + 'custom-button-pressed-face) + (set (make-local-variable 'widget-mouse-face) + 'custom-button-pressed-face)) + (when (and (boundp 'custom-raised-buttons) + (symbol-value 'custom-raised-buttons)) + (set (make-local-variable 'widget-push-button-prefix) "") + (set (make-local-variable 'widget-push-button-suffix) "") + (set (make-local-variable 'widget-link-prefix) "") + (set (make-local-variable 'widget-link-suffix) "")) (gnus-run-hooks 'gnus-custom-mode-hook)) ;;; Group Customization: @@ -137,7 +152,7 @@ listserv has inserted `Reply-To' headers that point back to the listserv itself. This is broken behavior. So there!") (to-group (string :tag "To Group") "\ -All posts will be send to the specified group.") +All posts will be sent to the specified group.") (gcc-self (choice :tag "GCC" :value t @@ -305,6 +320,7 @@ DOC is a documentation string for the parameter.") (setq gnus-custom-group group) (make-local-variable 'gnus-custom-topic) (setq gnus-custom-topic topic) + (buffer-disable-undo) (widget-insert "Customize the ") (if group (widget-create 'info-link @@ -375,6 +391,7 @@ form, but who cares?" :value (gnus-info-method info)))) (use-local-map widget-keymap) (widget-setup) + (buffer-enable-undo) (goto-char (point-min)))) (defun gnus-group-customize-done (&rest ignore) -- 2.34.1