X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgmm-utils.el;h=8deb27379a37b9602a9097f07866d7b8ae3654b0;hb=d7925de009d5e3047e07e52657d7312d9f97979c;hp=b44d3c08c4aa55fb0dc7b1a2b8960ff9788eef1a;hpb=9a8731d6dea8021a10dec1b42f382609336a9aa9;p=gnus diff --git a/lisp/gmm-utils.el b/lisp/gmm-utils.el index b44d3c08c..8deb27379 100644 --- a/lisp/gmm-utils.el +++ b/lisp/gmm-utils.el @@ -1,6 +1,6 @@ ;;; gmm-utils.el --- Utility functions for Gnus, Message and MML -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Reiner Steib ;; Keywords: news @@ -28,8 +28,6 @@ ;;; Code: -(require 'wid-edit) - (defgroup gmm nil "Utility functions for Gnus, Message and MML." :prefix "gmm-" @@ -95,6 +93,10 @@ ARGS are passed to `message'." "Non-nil if SYMBOL is a widget." (get symbol 'widget-type)) +(autoload 'widget-create-child-value "wid-edit") +(autoload 'widget-convert "wid-edit") +(autoload 'widget-default-get "wid-edit") + ;; Copy of the `nnmail-lazy' code from `nnmail.el': (define-widget 'gmm-lazy 'default "Base widget for recursive datastructures. @@ -265,27 +267,16 @@ DEFAULT-MAP specifies the default key map for ICON-LIST." ;; (tool-bar-add-item ICON DEF KEY &rest PROPS) (apply 'tool-bar-add-item icon nil nil :enable nil props))) ((equal fmap t) ;; Not a menu command - (if (fboundp 'tool-bar-local-item) - (apply 'tool-bar-local-item - icon command - (intern icon) ;; reuse icon or fmap here? - tool-bar-map props) - ;; Emacs 21 compatibility: - (apply 'tool-bar-add-item - icon command - (intern icon) - props))) + (apply 'tool-bar-local-item + icon command + (intern icon) ;; reuse icon or fmap here? + tool-bar-map props)) (t ;; A menu command - (if (fboundp 'tool-bar-local-item-from-menu) - (apply 'tool-bar-local-item-from-menu - ;; (apply 'tool-bar-local-item icon def key - ;; tool-bar-map props) - command icon tool-bar-map (symbol-value fmap) - props) - ;; Emacs 21 compatibility: - (apply 'tool-bar-add-item-from-menu - command icon (symbol-value fmap) - props)))) + (apply 'tool-bar-local-item-from-menu + ;; (apply 'tool-bar-local-item icon def key + ;; tool-bar-map props) + command icon tool-bar-map (symbol-value fmap) + props))) t)) (if (symbolp icon-list) (eval icon-list) @@ -420,16 +411,12 @@ If mode is nil, use `major-mode' of the current buffer." In XEmacs, the seventh argument of `write-region' specifies the coding-system." - (if (and mustbenew - (or (featurep 'xemacs) - (= emacs-major-version 20))) + (if (and mustbenew (featurep 'xemacs)) (if (file-exists-p filename) - (signal 'file-already-exists - (list "File exists" filename)) + (signal 'file-already-exists (list "File exists" filename)) (write-region start end filename append visit lockname)) (write-region start end filename append visit lockname mustbenew))) (provide 'gmm-utils) -;; arch-tag: e0b60920-2ce6-40c1-bfc0-cadbbe26b602 ;;; gmm-utils.el ends here