Mercurial > hg > xemacs-beta
comparison lisp/x-toolbar.el @ 239:41f2f0e326e9 r20-5b18
Import from CVS: tag r20-5b18
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:15:48 +0200 |
parents | 2c611d1463a6 |
children | ca9a9ec9c1c1 |
comparison
equal
deleted
inserted
replaced
238:b5f2e56b938d | 239:41f2f0e326e9 |
---|---|
152 ;; toolbar ispell variables and defuns | 152 ;; toolbar ispell variables and defuns |
153 ;; | 153 ;; |
154 | 154 |
155 (defun toolbar-ispell-internal () | 155 (defun toolbar-ispell-internal () |
156 (interactive) | 156 (interactive) |
157 (if (region-active-p) | 157 (cond |
158 (ispell-region (region-beginning) (region-end)) | 158 ((region-active-p) (ispell-region (region-beginning) (region-end))) |
159 (ispell-buffer))) | 159 ((eq major-mode 'mail-mode) (ispell-message)) |
160 ((eq major-mode 'message-mode) (ispell-message)) | |
161 (t (ispell-buffer)))) | |
160 | 162 |
161 (defcustom toolbar-ispell-function 'toolbar-ispell-internal | 163 (defcustom toolbar-ispell-function 'toolbar-ispell-internal |
162 "*Function to call when the ispell icon is selected." | 164 "*Function to call when the ispell icon is selected." |
163 :type '(radio (function-item toolbar-ispell-internal) | 165 :type '(radio (function-item toolbar-ispell-internal) |
164 (function :tag "Other")) | 166 (function :tag "Other")) |
188 (mh . mh-rmail) | 190 (mh . mh-rmail) |
189 (pine . (toolbar-external "xterm" "-e" "pine")) ; *gag* | 191 (pine . (toolbar-external "xterm" "-e" "pine")) ; *gag* |
190 (elm . (toolbar-external "xterm" "-e" "elm")) | 192 (elm . (toolbar-external "xterm" "-e" "elm")) |
191 (mutt . (toolbar-external "xterm" "-e" "mutt")) | 193 (mutt . (toolbar-external "xterm" "-e" "mutt")) |
192 (exmh . (toolbar-external "exmh")) | 194 (exmh . (toolbar-external "exmh")) |
193 (netscape . (toolbar-external "netscape" "mailbox:"))) | 195 (netscape . (toolbar-external "netscape" "mailbox:")) |
196 (send . mail)) | |
194 "*Alist of mail readers and their commands. | 197 "*Alist of mail readers and their commands. |
195 The car of each alist element is the mail reader, and the cdr is the form | 198 The car of each alist element is the mail reader, and the cdr is the form |
196 used to start it." | 199 used to start it." |
197 :type '(repeat (cons :format "%v" | 200 :type '(repeat (cons :format "%v" |
198 (symbol :tag "Mailer") (function :tag "Start with"))) | 201 (symbol :tag "Mailer") (function :tag "Start with"))) |
201 (defcustom toolbar-mail-reader 'not-configured | 204 (defcustom toolbar-mail-reader 'not-configured |
202 "*Mail reader toolbar will invoke. | 205 "*Mail reader toolbar will invoke. |
203 The legal values are the keys from `toolbar-mail-command-alist', which | 206 The legal values are the keys from `toolbar-mail-command-alist', which |
204 should be used to add new mail readers. | 207 should be used to add new mail readers. |
205 Mail readers known by default are vm, gnus, rmail, mh, pine, elm, | 208 Mail readers known by default are vm, gnus, rmail, mh, pine, elm, |
206 mutt, exmh and netscape." | 209 mutt, exmh, netscape and send." |
207 :type '(choice (const :tag "Not Configured" not-configured) | 210 :type '(choice (const :tag "Not Configured" not-configured) |
208 (const vm) (const gnus) (const rmail) (const mh) | 211 (const vm) (const gnus) (const rmail) (const mh) |
209 (const pine) (const elm) (const mutt) (const exmh) | 212 (const pine) (const elm) (const mutt) (const exmh) |
210 (const netscape) | 213 (const netscape) |
214 (const send) | |
211 (symbol :tag "Other" | 215 (symbol :tag "Other" |
212 :validate (lambda (wid) | 216 :validate (lambda (wid) |
213 (if (assq (widget-value wid) | 217 (if (assq (widget-value wid) |
214 toolbar-mail-commands-alist) | 218 toolbar-mail-commands-alist) |
215 nil | 219 nil |