changeset 19057:b1251bcaaa0e

(eval-last-sexp): Ignore `...' around sexp.
author Richard M. Stallman <rms@gnu.org>
date Thu, 31 Jul 1997 06:59:37 +0000
parents 3c63e633c40c
children 96413dc296fe
files lisp/emacs-lisp/lisp-mode.el
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/lisp-mode.el	Thu Jul 31 06:48:05 1997 +0000
+++ b/lisp/emacs-lisp/lisp-mode.el	Thu Jul 31 06:59:37 1997 +0000
@@ -296,12 +296,24 @@
   (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t)))
     (prin1 (eval (let ((stab (syntax-table))
 		       (opoint (point))
+		       ignore-quotes
 		       expr)
 		   (unwind-protect
 		       (save-excursion
 			 (set-syntax-table emacs-lisp-mode-syntax-table)
+			 ;; If this sexp appears to be enclosed in `...'
+			 ;; then ignore the surrounding quotes.
+			 (setq ignore-quotes
+			       (or (eq (following-char) ?\')
+				   (eq (preceding-char) ?\')))
 			 (forward-sexp -1)
 			 (save-restriction
+			   ;; vladimir@cs.ualberta.ca 30-Jul-1997: skip ` in
+			   ;; `variable' so that the value is returned, not the
+			   ;; name 
+			   (if (and ignore-quotes
+				    (eq (following-char) ?`))
+			       (forward-char))
 			   (narrow-to-region (point-min) opoint)
 			   (setq expr (read (current-buffer)))
 			   ;; If it's an (interactive ...) form, it's more