aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2005-02-04 06:22:18 +0000
committerJay Belanger2005-02-04 06:22:18 +0000
commit954fc58360d31c5cb80bc059d6363f671a263129 (patch)
tree089c1418862726d841f7301b9bd703b20c41c273
parent7592e97042f083f5700778d88d153b2d12443699 (diff)
downloademacs-954fc58360d31c5cb80bc059d6363f671a263129.tar.gz
emacs-954fc58360d31c5cb80bc059d6363f671a263129.zip
(calc-embedded-update): Don't put in unnecessary newlines.
Adjust the end of formula marker.
-rw-r--r--lisp/calc/calc-embed.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el
index 4c6311c9a5b..e3b3b6b5b19 100644
--- a/lisp/calc/calc-embed.el
+++ b/lisp/calc/calc-embed.el
@@ -967,19 +967,24 @@ The command \\[yank] can retrieve it from there."
967 (calc-embedded-original-buffer t info) 967 (calc-embedded-original-buffer t info)
968 (or (equal str (aref info 6)) 968 (or (equal str (aref info 6))
969 (let ((delta (- (aref info 5) (aref info 3))) 969 (let ((delta (- (aref info 5) (aref info 3)))
970 (adjbot 0)
970 (buffer-read-only nil)) 971 (buffer-read-only nil))
971 (goto-char (aref info 2)) 972 (goto-char (aref info 2))
972 (delete-region (point) (aref info 3)) 973 (delete-region (point) (aref info 3))
973 (and (> (nth 1 entry) (1+ extra)) 974 (and (> (nth 1 entry) (1+ extra))
974 (aref info 7) 975 (aref info 7)
975 (progn 976 (progn
976 (aset info 7 nil)
977 (delete-horizontal-space) 977 (delete-horizontal-space)
978 (insert "\n\n") 978 (if (looking-at "\n")
979 (delete-horizontal-space) 979 ;; If there's a newline there, don't add one
980 (backward-char 1))) 980 (insert "\n")
981 (insert "\n\n")
982 (delete-horizontal-space)
983 (setq adjbot 1)
984; (setq delta (1+ delta))
985 (backward-char 1))))
981 (insert str) 986 (insert str)
982 (set-marker (aref info 3) (point)) 987 (set-marker (aref info 3) (+ (point) adjbot))
983 (set-marker (aref info 5) (+ (point) delta)) 988 (set-marker (aref info 5) (+ (point) delta))
984 (aset info 6 str)))))) 989 (aset info 6 str))))))
985 (if (eq (car-safe val) 'calcFunc-evalto) 990 (if (eq (car-safe val) 'calcFunc-evalto)