From bd40775a7384d32a4f4706496feb3f0f800b401e Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 27 Aug 1998 11:53:03 +0000 Subject: [PATCH] * ew-dec.el (ew-decode-field-test): Search around current point as default argument when called interactive. --- ChangeLog | 5 +++++ ew-dec.el | 19 +++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) 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) -- 1.7.10.4