comparison lisp/emacs-lisp/lisp-mode.el @ 28324:979a905864ab

(lisp-eval-defun): Make arglist compatible with inf-lisp version. (eval-defun-1): Fix custom-declare-variable case.
author Dave Love <fx@gnu.org>
date Sun, 26 Mar 2000 16:36:17 +0000
parents 8c28c1c31e9b
children 0388cb689633
comparison
equal deleted inserted replaced
28323:c58dc3f08133 28324:979a905864ab
276 (lisp-mode-variables t) 276 (lisp-mode-variables t)
277 (setq imenu-case-fold-search t) 277 (setq imenu-case-fold-search t)
278 (set-syntax-table lisp-mode-syntax-table) 278 (set-syntax-table lisp-mode-syntax-table)
279 (run-hooks 'lisp-mode-hook)) 279 (run-hooks 'lisp-mode-hook))
280 280
281 ;; This will do unless shell.el is loaded. 281 ;; This will do unless inf-lisp.el is loaded.
282 (defun lisp-eval-defun nil 282 (defun lisp-eval-defun (&optional and-go)
283 "Send the current defun to the Lisp process made by \\[run-lisp]." 283 "Send the current defun to the Lisp process made by \\[run-lisp]."
284 (interactive) 284 (interactive)
285 (error "Process lisp does not exist")) 285 (error "Process lisp does not exist"))
286 286
287 (defvar lisp-interaction-mode-map 287 (defvar lisp-interaction-mode-map
393 (defun eval-defun-1 (form) 393 (defun eval-defun-1 (form)
394 (cond ((and (eq (car form) 'defvar) 394 (cond ((and (eq (car form) 'defvar)
395 (cdr-safe (cdr-safe form))) 395 (cdr-safe (cdr-safe form)))
396 ;; Force variable to be bound. 396 ;; Force variable to be bound.
397 (cons 'defconst (cdr form))) 397 (cons 'defconst (cdr form)))
398 ;; `defcustom' is now macroexpanded to `custom-declare-variable'. 398 ;; `defcustom' is now macroexpanded to
399 ;; `custom-declare-variable' with a quoted value arg.
399 ((and (eq (car form) 'custom-declare-variable) 400 ((and (eq (car form) 'custom-declare-variable)
400 (default-boundp (eval (nth 1 form)))) 401 (default-boundp (eval (nth 1 form))))
401 ;; Force variable to be bound. 402 ;; Force variable to be bound.
402 (set-default (eval (nth 1 form)) (eval (nth 2 form))) 403 (set-default (eval (nth 1 form)) (eval (nth 1 (nth 2 form))))
403 form) 404 form)
404 ((eq (car form) 'progn) 405 ((eq (car form) 'progn)
405 (cons 'progn (mapcar 'eval-defun-1 (cdr form)))) 406 (cons 'progn (mapcar 'eval-defun-1 (cdr form))))
406 (t form))) 407 (t form)))
407 408