* wl.el (toplevel): Added (C) to copyright notice, and
[elisp/wanderlust.git] / wl / wl-nemacs.el
1 ;;; wl-nemacs.el -- Wanderlust modules for Nemacs.
2
3 ;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
4
5 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
6 ;; Keywords: mail, net news
7
8 ;; This file is part of Wanderlust (Yet Another Message Interface on Emacsen).
9
10 ;; This program is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version.
14 ;;
15 ;; This program is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 ;; GNU General Public License for more details.
19 ;;
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
24 ;;
25
26 ;;; Commentary:
27 ;;
28
29 ;;; Code:
30 ;;
31
32 (defun wl-message-overload-functions ()
33   (local-set-key "l" 'wl-message-toggle-disp-summary))
34
35 (defun wl-message-wheel-up (event)
36   (interactive "e"))
37 (defun wl-message-wheel-down (event)
38   (interactive "e"))
39
40 (defun wl-highlight-folder-current-line (&optional numbers))
41 (defun wl-highlight-folder-path (folder-path))
42 (defun wl-highlight-summary (start end))
43 (defun wl-highlight-folder-group-line (numbers))
44 (defun wl-highlight-summary-line-string (line mark indent before-indent))
45 (defun wl-highlight-body-region (beg end))
46 (defun wl-highlight-message (start end hack-sig &optional body-only))
47 (defun wl-highlight-summary-current-line (&optional smark regexp temp-too))
48
49 (defun wl-highlight-plugged-current-line ())
50 (defun wl-plugged-set-folder-icon (folder string)
51   string)
52
53 (defmacro wl-defface (face spec doc &rest args)
54   (` (defvar (, face) (, spec) (, doc))))
55
56 (defsubst elmo-archive-call-process (prog args &optional output)
57   (apply 'call-process prog nil output nil args)
58   0)
59
60 (defun wl-draft-mode-setup ()
61   (defalias 'wl-draft-mode 'mail-mode))
62 (defun wl-draft-key-setup ())
63
64 ;; ???
65 (defvar mime-article/kanji-code-alist
66   (list (cons t (mime-charset-to-coding-system default-mime-charset))))
67
68 (defun wl-draft-overload-functions ()
69   (wl-mode-line-buffer-identification)
70   (local-set-key "\C-c\C-y" 'wl-draft-yank-original)
71   (local-set-key "\C-c\C-s" 'wl-draft-send)
72   (local-set-key "\C-c\C-a" 'wl-draft-insert-x-face-field)
73   (local-set-key "\C-c\C-c" 'wl-draft-send-and-exit)
74   (local-set-key "\C-c\C-z" 'wl-draft-save-and-exit)
75   (local-set-key "\C-c\C-k" 'wl-draft-kill)
76   (local-set-key "\C-l"     'wl-draft-highlight-and-recenter)
77   (local-set-key "\C-i"     'wl-complete-field-body-or-tab)
78   (local-set-key "\C-c\C-r" 'wl-draft-caesar-region)
79   (local-set-key "\M-t"     'wl-toggle-plugged)
80   (local-set-key "\C-c\C-o" 'wl-jump-to-draft-buffer)
81   (local-set-key "\C-c\C-j" 'wl-template-select)
82   (local-set-key "\C-c\C-p" 'wl-draft-preview-message)
83   (local-set-key "\C-x\C-s" 'wl-draft-save)
84   (local-set-key "\C-xk"    'wl-draft-mimic-kill-buffer))
85
86 ;;; Emulations.
87
88 (defvar-maybe user-mail-address nil)
89 (defvar-maybe mail-send-actions nil)
90 (defvar-maybe mail-default-headers nil)
91 (defvar-maybe mail-citation-hook nil)
92 (defvar-maybe mail-yank-hooks nil)
93 (defvar-maybe mail-mailer-swallows-blank-line nil)
94
95 (defvar mail-send-actions nil)
96
97 (defun-maybe mail-indent-citation ()
98   "Modify text just inserted from a message to be cited.
99 The inserted text should be the region.
100 When this function returns, the region is again around the modified text.
101
102 Normally, indent each nonblank line `mail-indentation-spaces' spaces.
103 However, if `mail-yank-prefix' is non-nil, insert that prefix on each line."
104   (let ((start (point)))
105     (mail-yank-clear-headers start (mark t))
106     (if (null mail-yank-prefix)
107         (indent-rigidly start (mark t) mail-indentation-spaces)
108       (save-excursion
109         (goto-char start)
110         (while (< (point) (mark t))
111           (insert mail-yank-prefix)
112           (forward-line 1))))))
113
114 (defun-maybe mail-yank-clear-headers (start end)
115   (save-excursion
116     (goto-char start)
117     (if (search-forward "\n\n" end t)
118         (save-restriction
119           (narrow-to-region start (point))
120           (goto-char start)
121           (while (let ((case-fold-search t))
122                    (re-search-forward mail-yank-ignored-headers nil t))
123             (beginning-of-line)
124             (delete-region (point)
125                            (progn (re-search-forward "\n[^ \t]")
126                                   (forward-char -1)
127                                   (point))))))))
128
129 (defun-maybe find-file-name-handler (filename operation))
130
131 (defun-maybe read-event ()
132   (setq unread-command-events
133         (if (fboundp 'read-char-exclusive)
134             (read-char-exclusive)
135           ;; XXX Emacs18.59 does not have read-char-exclusive().
136           (read-char))))
137
138 (defmacro easy-menu-define (a b c d)
139   (` (defvar (, a) nil (, c))))
140 (defmacro easy-menu-add (a)
141   (` nil))
142
143 (defun copy-face (a b))
144 (defun make-face (a))
145 (defun set-face-foreground (a b))
146 (defun set-face-background (a b))
147 (defun set-face-underline-p (a b))
148 (defun set-face-font (a b))
149
150 ;;; XXX cl's member() brings evil upon MIME-View.
151 ;; cl is always called after poe-18, so `(require 'poe-18)' is
152 ;; a dead duck... We MUST re-load it certainly.
153 (load-library "poe-18")
154
155 (require 'product)
156 (product-provide (provide 'wl-nemacs) (require 'wl-version))
157
158 ;;; wl-nemacs.el ends here