from the recent message.el.
(wl-draft-point-in-header-p): Ditto.
* wl-mule.el (wl-draft-mode-map): Bind "\C-a" to
wl-draft-beginning-of-line.
* wl-e21.el (wl-draft-mode-map): Ditto.
* wl-xmacs.el (wl-draft-mode-map): Ditto.
* wl-folder.el: Sort macrodefs by dependencies.
+2002-05-03 Daiki Ueno <ueno@unixuser.org>
+
+ * wl-draft.el (wl-draft-beginning-of-line): New command imported
+ from the recent message.el.
+ (wl-draft-point-in-header-p): Ditto.
+ * wl-mule.el (wl-draft-mode-map): Bind "\C-a" to
+ wl-draft-beginning-of-line.
+ * wl-e21.el (wl-draft-mode-map): Ditto.
+ * wl-xmacs.el (wl-draft-mode-map): Ditto.
+
+ * wl-folder.el: Sort macrodefs by dependencies.
+
2002-05-03 Yuuichi Teranishi <teranisi@ns.templewest.net>
* wl-summary.el (wl-summary-prev): Fixed regexp.
message is not displayed yet.
(wl-summary-prev-page): Ditto.
-2002-03-11 J\e.A\eNir\eNtme Marant <jerome.marant@free.fr>
+2002-03-11 J\e,Ai\e(Br\e,At\e(Bme Marant <jerome.marant@free.fr>
* wl-folder.el (wl-folder-mode-menu-spec): Fixed typo.
(kill-region b e)
(insert wl-draft-elide-ellipsis))
+;; Imported from message.el.
+(defun wl-draft-beginning-of-line (&optional n)
+ "Move point to beginning of header value or to beginning of line."
+ (interactive "p")
+ (if (wl-draft-point-in-header-p)
+ (let* ((here (point))
+ (bol (progn (beginning-of-line n) (point)))
+ (eol (line-end-position))
+ (eoh (re-search-forward ": *" eol t)))
+ (if (or (not eoh) (equal here eoh))
+ (goto-char bol)
+ (goto-char eoh)))
+ (beginning-of-line n)))
+
+(defun wl-draft-point-in-header-p ()
+ "Return t if point is in the header."
+ (save-excursion
+ (let ((p (point)))
+ (goto-char (point-min))
+ (not (re-search-forward
+ (concat "^" (regexp-quote mail-header-separator) "\n")
+ p t)))))
+
;; function for wl-sent-message-via
(defmacro wl-draft-sent-message-p (type)
(define-key wl-draft-mode-map "\C-c\C-a" 'wl-addrmgr)
;; (define-key wl-draft-mode-map "\C-x\C-s" 'wl-draft-save)
(define-key wl-draft-mode-map "\C-xk" 'wl-draft-mimic-kill-buffer)
- (define-key wl-draft-mode-map "\C-c\C-d" 'wl-draft-elide-region))
+ (define-key wl-draft-mode-map "\C-c\C-d" 'wl-draft-elide-region)
+ (define-key wl-draft-mode-map "\C-a" 'wl-draft-beginning-of-line))
(defun wl-draft-overload-functions ()
(wl-mode-line-buffer-identification)
(setq li (cdr li))))))))
;;; ELMO folder structure with cache.
-(defmacro wl-folder-get-elmo-folder (entity &optional no-cache)
- "Get elmo folder structure from entity."
- (` (if (, no-cache)
- (elmo-make-folder (elmo-string (, entity)))
- (or (wl-folder-elmo-folder-cache-get (, entity))
- (let* ((name (elmo-string (, entity)))
- (folder (elmo-make-folder name)))
- (wl-folder-elmo-folder-cache-put name folder)
- folder)))))
-
(defmacro wl-folder-elmo-folder-cache-get (name &optional hashtb)
"Returns a elmo folder structure associated with NAME from HASHTB.
Default HASHTB is `wl-folder-elmo-folder-hashtb'."
(` (elmo-set-hash-val (, name) (, folder)
(or (, hashtb) wl-folder-elmo-folder-hashtb))))
+(defmacro wl-folder-get-elmo-folder (entity &optional no-cache)
+ "Get elmo folder structure from entity."
+ (` (if (, no-cache)
+ (elmo-make-folder (elmo-string (, entity)))
+ (or (wl-folder-elmo-folder-cache-get (, entity))
+ (let* ((name (elmo-string (, entity)))
+ (folder (elmo-make-folder name)))
+ (wl-folder-elmo-folder-cache-put name folder)
+ folder)))))
+
(defun wl-folder-prev-entity ()
(interactive)
(forward-line -1))
;; (define-key wl-draft-mode-map "\C-x\C-s" 'wl-draft-save)
(define-key wl-draft-mode-map "\C-c\C-a" 'wl-addrmgr)
(define-key wl-draft-mode-map "\C-xk" 'wl-draft-mimic-kill-buffer)
- (define-key wl-draft-mode-map "\C-c\C-d" 'wl-draft-elide-region))
+ (define-key wl-draft-mode-map "\C-c\C-d" 'wl-draft-elide-region)
+ (define-key wl-draft-mode-map "\C-a" 'wl-draft-beginning-of-line))
(defun wl-draft-overload-menubar ()
(let ((keymap (current-local-map)))
;; (define-key wl-draft-mode-map "\C-x\C-s" 'wl-draft-save)
(define-key wl-draft-mode-map "\C-c\C-a" 'wl-addrmgr)
(define-key wl-draft-mode-map "\C-xk" 'wl-draft-mimic-kill-buffer)
- (define-key wl-draft-mode-map "\C-c\C-d" 'wl-draft-elide-region))
+ (define-key wl-draft-mode-map "\C-c\C-d" 'wl-draft-elide-region)
+ (define-key wl-draft-mode-map "\C-a" 'wl-draft-beginning-of-line))
(defun wl-draft-overload-functions ()
(wl-mode-line-buffer-identification)