From: akr Date: Thu, 27 Aug 1998 11:53:03 +0000 (+0000) Subject: * ew-dec.el (ew-decode-field-test): Search around current point X-Git-Tag: doodle-1_9_2~5 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=bd40775a7384d32a4f4706496feb3f0f800b401e;p=elisp%2Fflim.git * ew-dec.el (ew-decode-field-test): Search around current point as default argument when called interactive. --- diff --git a/ChangeLog b/ChangeLog index 928a664..16c4cc1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 1998-08-27 Tanaka Akira + * ew-dec.el (ew-decode-field-test): Search around current point + as default argument when called interactive. + +1998-08-27 Tanaka Akira + * FLIM-ELS (flime-modules): Add ew-ccl. * ew-bq.el: Now it is stub to ew-ccl and mel. diff --git a/ew-dec.el b/ew-dec.el index 9636058..4c2675c 100644 --- a/ew-dec.el +++ b/ew-dec.el @@ -464,8 +464,23 @@ each line is separated by CRLF." (defun ew-decode-field-test (field-name field-body) (interactive (list - (read-string "field-name:" (or (get-text-property (point) 'original-field-name) "")) - (read-string "field-body:" (or (get-text-property (point) 'original-field-body) "")))) + (read-string "field-name:" (or (get-text-property (point) 'original-field-name) + (save-excursion + (end-of-line) + (and + (re-search-backward "^\\([!-9;-~]+\\):" nil t) + (match-string 1))) + "")) + (read-string "field-body:" (or (get-text-property (point) 'original-field-body) + (save-excursion + (end-of-line) + (and + (re-search-backward "^\\([!-9;-~]+\\):" nil t) + (progn + (goto-char (match-end 0)) + (looking-at ".*\\(\n[ \t].*\\)*") + (ew-lf-crlf-to-crlf (match-string 0))))) + "")))) (with-output-to-temp-buffer "*DOODLE*" (save-excursion (set-buffer standard-output)