;;; sieve.el --- Utilities to manage sieve scripts
-;; Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
(define-key sieve-manage-mode-map [(down-mouse-2)] 'sieve-edit-script)
(define-key sieve-manage-mode-map [(down-mouse-3)] 'sieve-manage-mode-menu))
+(easy-menu-define sieve-manage-mode-menu sieve-manage-mode-map
+ "Sieve Menu."
+ '("Manage Sieve"
+ ["Edit script" sieve-edit-script t]
+ ["Activate script" sieve-activate t]
+ ["Deactivate script" sieve-deactivate t]))
+
(define-derived-mode sieve-manage-mode fundamental-mode "SIEVE"
"Mode used for sieve script management."
(setq mode-name "SIEVE")
(buffer-disable-undo (current-buffer))
(setq truncate-lines t)
- (easy-menu-add-item nil nil sieve-manage-mode-menu))
+ (easy-menu-add sieve-manage-mode-menu sieve-manage-mode-map))
(put 'sieve-manage-mode 'mode-class 'special)
-(easy-menu-define sieve-manage-mode-menu sieve-manage-mode-map
- "Sieve Menu."
- '("Manage Sieve"
- ["Edit script" sieve-edit-script t]
- ["Activate script" sieve-activate t]
- ["Deactivate script" sieve-deactivate t]))
-
;; This is necessary to allow correct handling of \\[cvs-mode-diff-map]
;; in substitute-command-keys.
;(fset 'sieve-manage-mode-map sieve-manage-mode-map)
(sieve-refresh-scriptlist)
(if (sieve-manage-ok-p err)
(message "Deactivating scripts...done")
- (message "Deactivating scripts...failed" (nth 2 err)))))
+ (message "Deactivating scripts...failed: %s" (nth 2 err)))))
(defalias 'sieve-deactivate 'sieve-deactivate-all)