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