comparison lisp/emacs-lisp/lisp-mode.el @ 1163:c205d560cc22

entered into RCS
author Richard M. Stallman <rms@gnu.org>
date Fri, 18 Sep 1992 18:47:19 +0000
parents 5b1c5b4286e7
children 05be3e0c082f
comparison
equal deleted inserted replaced
1162:7d6e0669b3dc 1163:c205d560cc22
213 213
214 (defun eval-last-sexp (arg) 214 (defun eval-last-sexp (arg)
215 "Evaluate sexp before point; print value in minibuffer. 215 "Evaluate sexp before point; print value in minibuffer.
216 With argument, print output into current buffer." 216 With argument, print output into current buffer."
217 (interactive "P") 217 (interactive "P")
218 (let ((standard-output (if arg (current-buffer) t))) 218 (let ((standard-output (if arg (current-buffer) t))
219 (opoint (point)))
219 (prin1 (let ((stab (syntax-table))) 220 (prin1 (let ((stab (syntax-table)))
220 (eval (unwind-protect 221 (eval (unwind-protect
221 (save-excursion 222 (save-excursion
222 (set-syntax-table emacs-lisp-mode-syntax-table) 223 (set-syntax-table emacs-lisp-mode-syntax-table)
223 (forward-sexp -1) 224 (forward-sexp -1)
224 (read (current-buffer))) 225 (save-restriction
226 (narrow-to-region (point-min) opoint)
227 (read (current-buffer))))
225 (set-syntax-table stab))))))) 228 (set-syntax-table stab)))))))
226 229
227 (defun eval-defun (arg) 230 (defun eval-defun (arg)
228 "Evaluate defun that point is in or before. 231 "Evaluate defun that point is in or before.
229 Print value in minibuffer. 232 Print value in minibuffer.
479 (put 'prog1 'lisp-indent-function 1) 482 (put 'prog1 'lisp-indent-function 1)
480 (put 'prog2 'lisp-indent-function 2) 483 (put 'prog2 'lisp-indent-function 2)
481 (put 'save-excursion 'lisp-indent-function 0) 484 (put 'save-excursion 'lisp-indent-function 0)
482 (put 'save-window-excursion 'lisp-indent-function 0) 485 (put 'save-window-excursion 'lisp-indent-function 0)
483 (put 'save-restriction 'lisp-indent-function 0) 486 (put 'save-restriction 'lisp-indent-function 0)
487 (put 'save-match-data 'lisp-indent-function 0)
484 (put 'let 'lisp-indent-function 1) 488 (put 'let 'lisp-indent-function 1)
485 (put 'let* 'lisp-indent-function 1) 489 (put 'let* 'lisp-indent-function 1)
486 (put 'while 'lisp-indent-function 1) 490 (put 'while 'lisp-indent-function 1)
487 (put 'if 'lisp-indent-function 2) 491 (put 'if 'lisp-indent-function 2)
488 (put 'catch 'lisp-indent-function 1) 492 (put 'catch 'lisp-indent-function 1)