Mercurial > hg > xemacs-beta
diff lisp/modes/lisp-mode.el @ 70:131b0175ea99 r20-0b30
Import from CVS: tag r20-0b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:02:59 +0200 |
parents | ec9a17fef872 |
children | 0d2f883870bc |
line wrap: on
line diff
--- a/lisp/modes/lisp-mode.el Mon Aug 13 09:00:04 2007 +0200 +++ b/lisp/modes/lisp-mode.el Mon Aug 13 09:02:59 2007 +0200 @@ -316,7 +316,7 @@ ;; XEmacs change: emacs-lisp-mode-map is a more appropriate parent. (defvar lisp-interaction-mode-map () - "Keymap for Lisp Interaction mode. + "Keymap for Lisp Interaction moe. All commands in `shared-lisp-mode-map' are inherited by this map.") (if lisp-interaction-mode-map @@ -367,34 +367,28 @@ (if (and (consp expr) (eq (car expr) 'defvar) (> (length expr) 2)) - (eval (cons 'defconst (cdr expr))) + (progn (eval (cons 'defconst (cdr expr))) + (message "defvar treated as defconst") + (sit-for 1) + (message "")) (eval expr))) -;; XEmacs change, based on Bob Weiner suggestion -(defun eval-last-sexp (eval-last-sexp-arg-internal) ;dynamic scoping wonderment +(defun eval-last-sexp (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in minibuffer. With argument, print output into current buffer." (interactive "P") (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t)) (opoint (point))) - (prin1 (let ((stab (syntax-table)) - expr) - (eval-interactive - (unwind-protect - (save-excursion - (set-syntax-table emacs-lisp-mode-syntax-table) - (forward-sexp -1) - (save-restriction - (narrow-to-region (point-min) opoint) - (setq expr (read (current-buffer))) - (if (and (consp expr) - (eq (car expr) 'interactive)) - (list 'quote - (call-interactively - (eval (` (lambda (&rest args) - (, expr) args))))) - expr))) - (set-syntax-table stab))))))) + (prin1 (let ((stab (syntax-table))) + ;; XEmacs change use eval-interactive not eval + (eval-interactive (unwind-protect + (save-excursion + (set-syntax-table emacs-lisp-mode-syntax-table) + (forward-sexp -1) + (save-restriction + (narrow-to-region (point-min) opoint) + (read (current-buffer)))) + (set-syntax-table stab))))))) (defun eval-defun (eval-defun-arg-internal) "Evaluate defun that point is in or before.