comparison lisp/emacs-lisp/lisp-mode.el @ 249:43cdaf2db624

*** empty log message ***
author Roland McGrath <roland@gnu.org>
date Wed, 01 May 1991 05:28:37 +0000
parents 287cf3ae183a
children 6617b231ec15
comparison
equal deleted inserted replaced
248:287cf3ae183a 249:43cdaf2db624
207 207
208 (defun eval-last-sexp (arg) 208 (defun eval-last-sexp (arg)
209 "Evaluate sexp before point; print value in minibuffer. 209 "Evaluate sexp before point; print value in minibuffer.
210 With argument, print output into current buffer." 210 With argument, print output into current buffer."
211 (interactive "P") 211 (interactive "P")
212 (prin1 (let ((stab (syntax-table))) 212 (let ((standard-output (if arg (current-buffer) t)))
213 (eval (unwind-protect 213 (prin1 (let ((stab (syntax-table)))
214 (save-excursion 214 (eval (unwind-protect
215 (set-syntax-table emacs-lisp-mode-syntax-table) 215 (save-excursion
216 (forward-sexp -1) 216 (set-syntax-table emacs-lisp-mode-syntax-table)
217 (read (current-buffer))) 217 (forward-sexp -1)
218 (set-syntax-table stab)))) 218 (read (current-buffer)))
219 (if arg (current-buffer) t))) 219 (set-syntax-table stab)))))))
220 220
221 (defun eval-defun (arg) 221 (defun eval-defun (arg)
222 "Evaluate defun that point is in or before. 222 "Evaluate defun that point is in or before.
223 Print value in minibuffer. 223 Print value in minibuffer.
224 With argument, insert value in current buffer after the defun." 224 With argument, insert value in current buffer after the defun."
225 (interactive "P") 225 (interactive "P")
226 (prin1 (eval (save-excursion 226 (let ((standard-output (if arg (current-buffer) t)))
227 (end-of-defun) 227 (prin1 (eval (save-excursion
228 (beginning-of-defun) 228 (end-of-defun)
229 (read (current-buffer)))) 229 (beginning-of-defun)
230 (if arg (current-buffer) t))) 230 (read (current-buffer)))))))
231 231
232 (defun lisp-comment-indent () 232 (defun lisp-comment-indent ()
233 (if (looking-at "\\s<\\s<\\s<") 233 (if (looking-at "\\s<\\s<\\s<")
234 (current-column) 234 (current-column)
235 (if (looking-at "\\s<\\s<") 235 (if (looking-at "\\s<\\s<")