Commit 6a65537f authored by Linus Tolke's avatar Linus Tolke
Browse files

lyskom-edit-extract-text omskriven

parent 13b3db25
No preview for this file type
...@@ -266,12 +266,12 @@ Entry to this mode runs lyskom-edit-mode-hook." ...@@ -266,12 +266,12 @@ Entry to this mode runs lyskom-edit-mode-hook."
(save-excursion (save-excursion
(setq misc-list (lyskom-edit-read-misc-list) (setq misc-list (lyskom-edit-read-misc-list)
subject (lyskom-edit-extract-subject) subject (lyskom-edit-extract-subject)))
message (lyskom-edit-extract-text)))
(let ((minibuffer-local-map (overlay-map (current-local-map) (let ((minibuffer-local-map (overlay-map (current-local-map)
minibuffer-local-map))) minibuffer-local-map)))
(setq subject (read-string (lyskom-get-string 'subject) (setq subject (read-string (lyskom-get-string 'subject)
subject))) subject)))
(setq message (lyskom-edit-extract-text))
(setq mode-name "LysKOM sending") (setq mode-name "LysKOM sending")
(save-excursion (save-excursion
(set-buffer (process-buffer lyskom-proc)) (set-buffer (process-buffer lyskom-proc))
...@@ -480,12 +480,19 @@ Point must be located on the line where the subject is." ...@@ -480,12 +480,19 @@ Point must be located on the line where the subject is."
(defun lyskom-edit-extract-text () (defun lyskom-edit-extract-text ()
"Get text as a string." "Get text as a string."
(beginning-of-line 3) (save-excursion
(buffer-substring (point) (goto-char (point-min))
(if (eq (char-after (1- (point-max))) ; remove trailing (if (not (re-search-forward (regexp-quote lyskom-header-separator)
?\n) ; linefeed if present nil (point-max)))
(1- (point-max)) (signal 'lyskom-internal-error
(point-max)))) "Altered lyskom-header-separator line.")
(buffer-substring (1+ (point))
(progn
(goto-char (1- (point-max)))
(while (looking-at "\\s-") ; remove trailing
(backward-char 1)) ; whitespace
(forward-char 1)
(point))))))
(defun lyskom-create-text-handler (text-no edit-buffer) (defun lyskom-create-text-handler (text-no edit-buffer)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment