diff options
author | Miles Bader <miles@gnu.org> | 2005-02-06 12:06:02 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2005-02-06 12:06:02 +0000 |
commit | a359f0e0ff878285654e2f0bcc7bd3b4340c778c (patch) | |
tree | cc0aff13c751bb8ab7ccaae29082bab32e15fd13 /lisp/calc/calc-embed.el | |
parent | f3d3402885646e6fa79f1ad59fb8a1f9017851d7 (diff) | |
parent | 56c30d721096a64f151f9ea6e3c76562380da895 (diff) | |
download | emacs-a359f0e0ff878285654e2f0bcc7bd3b4340c778c.tar.gz emacs-a359f0e0ff878285654e2f0bcc7bd3b4340c778c.tar.bz2 emacs-a359f0e0ff878285654e2f0bcc7bd3b4340c778c.zip |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-11
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-69
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-71
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-72
src/dispextern.h (xassert): Enable unconditionally.
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-73
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-81
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-82
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-12
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-13
Update from CVS
Diffstat (limited to 'lisp/calc/calc-embed.el')
-rw-r--r-- | lisp/calc/calc-embed.el | 15 |
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." (calc-embedded-original-buffer t info) (or (equal str (aref info 6)) (let ((delta (- (aref info 5) (aref info 3))) + (adjbot 0) (buffer-read-only nil)) (goto-char (aref info 2)) (delete-region (point) (aref info 3)) (and (> (nth 1 entry) (1+ extra)) (aref info 7) (progn - (aset info 7 nil) (delete-horizontal-space) - (insert "\n\n") - (delete-horizontal-space) - (backward-char 1))) + (if (looking-at "\n") + ;; If there's a newline there, don't add one + (insert "\n") + (insert "\n\n") + (delete-horizontal-space) + (setq adjbot 1) +; (setq delta (1+ delta)) + (backward-char 1)))) (insert str) - (set-marker (aref info 3) (point)) + (set-marker (aref info 3) (+ (point) adjbot)) (set-marker (aref info 5) (+ (point) delta)) (aset info 6 str)))))) (if (eq (car-safe val) 'calcFunc-evalto) |