Mercurial > emacs
comparison lisp/emacs-lisp/lisp-mode.el @ 69851:169719af1b5e
(eval-print-last-sexp, eval-last-sexp, eval-defun): Doc fixes.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 07 Apr 2006 23:30:23 +0000 |
parents | 067115a6e738 |
children | fbe329a11cee 65ca8fb66a0d |
comparison
equal
deleted
inserted
replaced
69850:c4252aefa1ad | 69851:169719af1b5e |
---|---|
441 if that value is non-nil.") | 441 if that value is non-nil.") |
442 | 442 |
443 (defun eval-print-last-sexp () | 443 (defun eval-print-last-sexp () |
444 "Evaluate sexp before point; print value into current buffer. | 444 "Evaluate sexp before point; print value into current buffer. |
445 | 445 |
446 If `eval-expression-debug-on-error' is non-nil, which is the default, | |
447 this command arranges for all errors to enter the debugger. | |
448 | |
446 Note that printing the result is controlled by the variables | 449 Note that printing the result is controlled by the variables |
447 `eval-expression-print-length' and `eval-expression-print-level', | 450 `eval-expression-print-length' and `eval-expression-print-level', |
448 which see." | 451 which see." |
449 (interactive) | 452 (interactive) |
450 (let ((standard-output (current-buffer))) | 453 (let ((standard-output (current-buffer))) |
612 | 615 |
613 (defvar eval-last-sexp-fake-value (make-symbol "t")) | 616 (defvar eval-last-sexp-fake-value (make-symbol "t")) |
614 | 617 |
615 (defun eval-last-sexp (eval-last-sexp-arg-internal) | 618 (defun eval-last-sexp (eval-last-sexp-arg-internal) |
616 "Evaluate sexp before point; print value in minibuffer. | 619 "Evaluate sexp before point; print value in minibuffer. |
617 Interactively, with prefix argument, print output into current buffer." | 620 Interactively, with prefix argument, print output into current buffer. |
621 | |
622 If `eval-expression-debug-on-error' is non-nil, which is the default, | |
623 this command arranges for all errors to enter the debugger." | |
618 (interactive "P") | 624 (interactive "P") |
619 (if (null eval-expression-debug-on-error) | 625 (if (null eval-expression-debug-on-error) |
620 (eval-last-sexp-1 eval-last-sexp-arg-internal) | 626 (eval-last-sexp-1 eval-last-sexp-arg-internal) |
621 (let ((old-value eval-last-sexp-fake-value) new-value value) | 627 (let ((old-value eval-last-sexp-fake-value) new-value value) |
622 (let ((debug-on-error old-value)) | 628 (let ((debug-on-error old-value)) |
719 If the current defun is actually a call to `defvar' or `defcustom', | 725 If the current defun is actually a call to `defvar' or `defcustom', |
720 evaluating it this way resets the variable using its initial value | 726 evaluating it this way resets the variable using its initial value |
721 expression even if the variable already has some other value. | 727 expression even if the variable already has some other value. |
722 \(Normally `defvar' and `defcustom' do not alter the value if there | 728 \(Normally `defvar' and `defcustom' do not alter the value if there |
723 already is one.) | 729 already is one.) |
730 | |
731 If `eval-expression-debug-on-error' is non-nil, which is the default, | |
732 this command arranges for all errors to enter the debugger. | |
724 | 733 |
725 With a prefix argument, instrument the code for Edebug. | 734 With a prefix argument, instrument the code for Edebug. |
726 | 735 |
727 If acting on a `defun' for FUNCTION, and the function was | 736 If acting on a `defun' for FUNCTION, and the function was |
728 instrumented, `Edebug: FUNCTION' is printed in the minibuffer. If not | 737 instrumented, `Edebug: FUNCTION' is printed in the minibuffer. If not |