Mercurial > emacs
comparison lisp/emacs-lisp/lisp-mode.el @ 22463:fd555029931d
(eval-defun): Pass read function to
eval-region as arg, instead of binding load-read-function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 13 Jun 1998 04:33:31 +0000 |
parents | afacb0a7e251 |
children | 06d8312c50a4 |
comparison
equal
deleted
inserted
replaced
22462:198054d3498c | 22463:fd555029931d |
---|---|
360 ;; Force variable to be bound. | 360 ;; Force variable to be bound. |
361 (set-default (nth 1 form) (eval (nth 2 form))))) | 361 (set-default (nth 1 form) (eval (nth 2 form))))) |
362 ;; Now arrange for eval-region to "read" the (possibly) altered form. | 362 ;; Now arrange for eval-region to "read" the (possibly) altered form. |
363 ;; eval-region handles recording which file defines a function or variable. | 363 ;; eval-region handles recording which file defines a function or variable. |
364 (save-excursion | 364 (save-excursion |
365 (let ((load-read-function | 365 (eval-region beg end standard-output |
366 #'(lambda (ignore) | 366 #'(lambda (ignore) |
367 ;; Skipping to the end of the specified region | 367 ;; Skipping to the end of the specified region |
368 ;; will make eval-region return. | 368 ;; will make eval-region return. |
369 (goto-char end) | 369 (goto-char end) |
370 form))) | 370 form))))) |
371 (eval-region beg end standard-output))))) | |
372 | 371 |
373 (defun lisp-comment-indent () | 372 (defun lisp-comment-indent () |
374 (if (looking-at "\\s<\\s<\\s<") | 373 (if (looking-at "\\s<\\s<\\s<") |
375 (current-column) | 374 (current-column) |
376 (if (looking-at "\\s<\\s<") | 375 (if (looking-at "\\s<\\s<") |