469 |
(opoint (point)) |
(opoint (point)) |
470 |
ignore-quotes |
ignore-quotes |
471 |
expr) |
expr) |
472 |
(with-syntax-table emacs-lisp-mode-syntax-table |
(save-excursion |
473 |
;; If this sexp appears to be enclosed in `...' |
(with-syntax-table emacs-lisp-mode-syntax-table |
474 |
;; then ignore the surrounding quotes. |
;; If this sexp appears to be enclosed in `...' |
475 |
(setq ignore-quotes |
;; then ignore the surrounding quotes. |
476 |
(or (eq (following-char) ?\') |
(setq ignore-quotes |
477 |
(eq (preceding-char) ?\'))) |
(or (eq (following-char) ?\') |
478 |
(forward-sexp -1) |
(eq (preceding-char) ?\'))) |
479 |
;; If we were after `?\e' (or similar case), |
(forward-sexp -1) |
480 |
;; use the whole thing, not just the `e'. |
;; If we were after `?\e' (or similar case), |
481 |
(when (eq (preceding-char) ?\\) |
;; use the whole thing, not just the `e'. |
482 |
(forward-char -1) |
(when (eq (preceding-char) ?\\) |
483 |
(when (eq (preceding-char) ??) |
(forward-char -1) |
484 |
(forward-char -1))) |
(when (eq (preceding-char) ??) |
485 |
|
(forward-char -1))) |
486 |
|
|
487 |
;; Skip over `#N='s. |
;; Skip over `#N='s. |
488 |
(when (eq (preceding-char) ?=) |
(when (eq (preceding-char) ?=) |
489 |
(let (labeled-p) |
(let (labeled-p) |
490 |
(save-excursion |
(save-excursion |
491 |
(skip-chars-backward "0-9#=") |
(skip-chars-backward "0-9#=") |
492 |
(setq labeled-p (looking-at "\\(#[0-9]+=\\)+"))) |
(setq labeled-p (looking-at "\\(#[0-9]+=\\)+"))) |
493 |
(when labeled-p |
(when labeled-p |
494 |
(forward-sexp -1)))) |
(forward-sexp -1)))) |
495 |
|
|
496 |
(save-restriction |
(save-restriction |
497 |
;; vladimir@cs.ualberta.ca 30-Jul-1997: skip ` in |
;; vladimir@cs.ualberta.ca 30-Jul-1997: skip ` in |
498 |
;; `variable' so that the value is returned, not the |
;; `variable' so that the value is returned, not the |
499 |
;; name |
;; name |
500 |
(if (and ignore-quotes |
(if (and ignore-quotes |
501 |
(eq (following-char) ?`)) |
(eq (following-char) ?`)) |
502 |
(forward-char)) |
(forward-char)) |
503 |
(narrow-to-region (point-min) opoint) |
(narrow-to-region (point-min) opoint) |
504 |
(setq expr (read (current-buffer))) |
(setq expr (read (current-buffer))) |
505 |
;; If it's an (interactive ...) form, it's more |
;; If it's an (interactive ...) form, it's more |
506 |
;; useful to show how an interactive call would |
;; useful to show how an interactive call would |
507 |
;; use it. |
;; use it. |
508 |
(and (consp expr) |
(and (consp expr) |
509 |
(eq (car expr) 'interactive) |
(eq (car expr) 'interactive) |
510 |
(setq expr |
(setq expr |
511 |
(list 'call-interactively |
(list 'call-interactively |
512 |
(list 'quote |
(list 'quote |
513 |
(list 'lambda |
(list 'lambda |
514 |
'(&rest args) |
'(&rest args) |
515 |
expr |
expr |
516 |
'args))))) |
'args))))) |
517 |
expr)))))) |
expr))))))) |
518 |
(let ((unabbreviated (let ((print-length nil) (print-level nil)) |
(let ((unabbreviated (let ((print-length nil) (print-level nil)) |
519 |
(prin1-to-string value))) |
(prin1-to-string value))) |
520 |
(print-length eval-expression-print-length) |
(print-length eval-expression-print-length) |