comparison lisp/emacs-lisp/lisp-mode.el @ 88123:375f2633d815

New directory
author Kenichi Handa <handa@m17n.org>
date Mon, 08 Sep 2003 11:56:09 +0000
parents 695cf19ef79e
children af0933fdc21a
comparison
equal deleted inserted replaced
52428:27bc8b966642 88123:375f2633d815
356 (setq font-lock-keywords-case-fold-search t) 356 (setq font-lock-keywords-case-fold-search t)
357 (setq imenu-case-fold-search t) 357 (setq imenu-case-fold-search t)
358 (set-syntax-table lisp-mode-syntax-table) 358 (set-syntax-table lisp-mode-syntax-table)
359 (run-mode-hooks 'lisp-mode-hook)) 359 (run-mode-hooks 'lisp-mode-hook))
360 360
361 ;; Used in old LispM code.
362 (defalias 'common-lisp-mode 'lisp-mode)
363
364 ;; This will do unless inf-lisp.el is loaded. 361 ;; This will do unless inf-lisp.el is loaded.
365 (defun lisp-eval-defun (&optional and-go) 362 (defun lisp-eval-defun (&optional and-go)
366 "Send the current defun to the Lisp process made by \\[run-lisp]." 363 "Send the current defun to the Lisp process made by \\[run-lisp]."
367 (interactive) 364 (interactive)
368 (error "Process lisp does not exist")) 365 (error "Process lisp does not exist"))
513 (list 'lambda 510 (list 'lambda
514 '(&rest args) 511 '(&rest args)
515 expr 512 expr
516 'args))))) 513 'args)))))
517 expr))))))) 514 expr)))))))
518 (eval-last-sexp-print-value value)))) 515 (let ((unabbreviated (let ((print-length nil) (print-level nil))
519 516 (prin1-to-string value)))
520 (defun eval-last-sexp-print-value (value) 517 (print-length eval-expression-print-length)
521 (let ((unabbreviated (let ((print-length nil) (print-level nil)) 518 (print-level eval-expression-print-level)
522 (prin1-to-string value))) 519 (char-string (prin1-char value))
523 (print-length eval-expression-print-length) 520 (beg (point))
524 (print-level eval-expression-print-level) 521 end)
525 (char-string (prin1-char value)) 522 (prog1
526 (beg (point)) 523 (prin1 value)
527 end) 524 (if (and (eq standard-output t) char-string)
528 (prog1 525 (princ (concat " = " char-string)))
529 (prin1 value) 526 (setq end (point))
530 (if (and (eq standard-output t) char-string) 527 (when (and (bufferp standard-output)
531 (princ (concat " = " char-string))) 528 (or (not (null print-length))
532 (setq end (point)) 529 (not (null print-level)))
533 (when (and (bufferp standard-output) 530 (not (string= unabbreviated
534 (or (not (null print-length)) 531 (buffer-substring-no-properties beg end))))
535 (not (null print-level))) 532 (last-sexp-setup-props beg end value
536 (not (string= unabbreviated 533 unabbreviated
537 (buffer-substring-no-properties beg end)))) 534 (buffer-substring-no-properties beg end))
538 (last-sexp-setup-props beg end value 535 ))))))
539 unabbreviated
540 (buffer-substring-no-properties beg end))
541 ))))
542 536
543 537
544 (defun eval-last-sexp (eval-last-sexp-arg-internal) 538 (defun eval-last-sexp (eval-last-sexp-arg-internal)
545 "Evaluate sexp before point; print value in minibuffer. 539 "Evaluate sexp before point; print value in minibuffer.
546 Interactively, with prefix argument, print output into current buffer." 540 Interactively, with prefix argument, print output into current buffer."
1171 (forward-line 1) (point)) 1165 (forward-line 1) (point))
1172 nil nil state)))))) 1166 nil nil state))))))
1173 1167
1174 (provide 'lisp-mode) 1168 (provide 'lisp-mode)
1175 1169
1176 ;;; arch-tag: 414c7f93-c245-4b77-8ed5-ed05ef7ff1bf
1177 ;;; lisp-mode.el ends here 1170 ;;; lisp-mode.el ends here