From: ueno Date: Fri, 3 May 2002 15:48:53 +0000 (+0000) Subject: * wl-draft.el (wl-draft-beginning-of-line): New command imported X-Git-Tag: elmo-mark-root~158 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edafeb2a79066c28d008382473ff92bb78b4c54e;p=elisp%2Fwanderlust.git * 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. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index e66a7cf..15dd304 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,15 @@ +2002-05-03 Daiki Ueno + + * 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 * wl-summary.el (wl-summary-prev): Fixed regexp. @@ -406,7 +418,7 @@ message is not displayed yet. (wl-summary-prev-page): Ditto. -2002-03-11 J.ANirNtme Marant +2002-03-11 J,Ai(Br,At(Bme Marant * wl-folder.el (wl-folder-mode-menu-spec): Fixed typo. diff --git a/wl/wl-draft.el b/wl/wl-draft.el index e71640a..1455972 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -774,6 +774,29 @@ text was killed." (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) diff --git a/wl/wl-e21.el b/wl/wl-e21.el index 00bd461..a38ef75 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -625,7 +625,8 @@ Special commands: (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) diff --git a/wl/wl-folder.el b/wl/wl-folder.el index fa56b15..3e16795 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -317,16 +317,6 @@ (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'." @@ -339,6 +329,16 @@ 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)) diff --git a/wl/wl-mule.el b/wl/wl-mule.el index d1d577a..7038452 100644 --- a/wl/wl-mule.el +++ b/wl/wl-mule.el @@ -159,7 +159,8 @@ Special commands: ;; (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))) diff --git a/wl/wl-xmas.el b/wl/wl-xmas.el index 8e73b84..1c94b77 100644 --- a/wl/wl-xmas.el +++ b/wl/wl-xmas.el @@ -524,7 +524,8 @@ Special commands: ;; (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)