diff options
| author | Richard M. Stallman | 1998-05-25 22:40:45 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-05-25 22:40:45 +0000 |
| commit | 2d75b395350d36d126f71085622b696380b2a9a9 (patch) | |
| tree | e9a5144c0602ec26c44dcc972dd8d99dd5d81a68 | |
| parent | f9ba10b0112e8e2b6c285bd96a92dcda96d3ebca (diff) | |
| download | emacs-2d75b395350d36d126f71085622b696380b2a9a9.tar.gz emacs-2d75b395350d36d126f71085622b696380b2a9a9.zip | |
(eval-defun): Pass proper beg to eval-region.
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 473ecd734e8..0058b4622f8 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -342,11 +342,12 @@ Print value in minibuffer. | |||
| 342 | With argument, insert value in current buffer after the defun." | 342 | With argument, insert value in current buffer after the defun." |
| 343 | (interactive "P") | 343 | (interactive "P") |
| 344 | (let ((standard-output (if eval-defun-arg-internal (current-buffer) t)) | 344 | (let ((standard-output (if eval-defun-arg-internal (current-buffer) t)) |
| 345 | end form) | 345 | beg end form) |
| 346 | ;; Read the form from the buffer, and record where it ends. | 346 | ;; Read the form from the buffer, and record where it ends. |
| 347 | (save-excursion | 347 | (save-excursion |
| 348 | (end-of-defun) | 348 | (end-of-defun) |
| 349 | (beginning-of-defun) | 349 | (beginning-of-defun) |
| 350 | (setq beg (point)) | ||
| 350 | (setq form (read (current-buffer))) | 351 | (setq form (read (current-buffer))) |
| 351 | (setq end (point))) | 352 | (setq end (point))) |
| 352 | ;; Alter the form if necessary. | 353 | ;; Alter the form if necessary. |
| @@ -367,7 +368,7 @@ With argument, insert value in current buffer after the defun." | |||
| 367 | ;; will make eval-region return. | 368 | ;; will make eval-region return. |
| 368 | (goto-char end) | 369 | (goto-char end) |
| 369 | form))) | 370 | form))) |
| 370 | (eval-region (point) end standard-output))))) | 371 | (eval-region beg end standard-output))))) |
| 371 | 372 | ||
| 372 | (defun lisp-comment-indent () | 373 | (defun lisp-comment-indent () |
| 373 | (if (looking-at "\\s<\\s<\\s<") | 374 | (if (looking-at "\\s<\\s<\\s<") |