comparison lisp/ielm.el @ 55144:ab3d5c605cad

(ielm-prompt-read-only, ielm-prompt): Expand docstring. (ielm): Only go to the end of the buffer when starting a new process.
author Luc Teirlinck <teirllm@auburn.edu>
date Mon, 26 Apr 2004 02:41:40 +0000
parents 0d9ec2b24429
children 1a8fe9f88f09
comparison
equal deleted inserted replaced
55143:4297b5c5091b 55144:ab3d5c605cad
54 Setting this variable does not affect existing IELM runs. 54 Setting this variable does not affect existing IELM runs.
55 55
56 You can give the IELM prompt more highly customized read-only 56 You can give the IELM prompt more highly customized read-only
57 type properties, by setting this option to nil, and then setting 57 type properties, by setting this option to nil, and then setting
58 `ielm-prompt', outside of Custom, to a string with the desired 58 `ielm-prompt', outside of Custom, to a string with the desired
59 text properties." 59 text properties.
60
61 Interrupting the IELM process with \\<ielm-map>\\[comint-interrupt-subjob],
62 and then restarting it using \\[ielm], makes the then current
63 default value affect _new_ prompts. However, executing \\[ielm]
64 does not have this effect on *ielm* buffers with a running process.
65 For IELM buffers that are not called *ielm*, you can execute
66 \\[inferior-emacs-lisp-mode] in that IELM buffer to update the value,
67 for new prompts. This works even if the buffer has a running process."
60 :type 'boolean 68 :type 'boolean
61 :group 'ielm 69 :group 'ielm
62 :version "21.4") 70 :version "21.4")
63 71
64 (defcustom ielm-prompt "ELISP> " 72 (defcustom ielm-prompt "ELISP> "
65 "Prompt used in IELM. 73 "Prompt used in IELM.
66 Setting the default value does not affect existing IELM runs. 74 Setting the default value does not affect existing IELM runs.
67 The command `inferior-emacs-lisp-mode' converts this into a 75 `inferior-emacs-lisp-mode' converts this into a buffer-local
68 buffer-local variable in IELM buffers. Do not try to set the 76 variable in IELM buffers. The buffer-local value is meant for
69 buffer-local value yourself in any way, unless you really know 77 internal use by IELM. Do not try to set the buffer-local value
70 what you are doing." 78 yourself in any way, unless you really know what you are doing.
79
80 Interrupting the IELM process with \\<ielm-map>\\[comint-interrupt-subjob],
81 and then restarting it using \\[ielm], makes the then current
82 _default_ value affect _new_ prompts. Unless the new prompt
83 differs only in text properties from the old one, IELM will no
84 longer recognize the old prompts. However, executing \\[ielm]
85 does not update the prompt of an *ielm* buffer with a running process.
86 For IELM buffers that are not called *ielm*, you can execute
87 \\[inferior-emacs-lisp-mode] in that IELM buffer to update the value,
88 for new prompts. This works even if the buffer has a running process."
71 :type 'string 89 :type 'string
72 :group 'ielm) 90 :group 'ielm)
73 91
74 (defcustom ielm-dynamic-return t 92 (defcustom ielm-dynamic-return t
75 "*Controls whether \\<ielm-map>\\[ielm-return] has intelligent behaviour in IELM. 93 "*Controls whether \\<ielm-map>\\[ielm-return] has intelligent behaviour in IELM.
545 ;;;###autoload 563 ;;;###autoload
546 (defun ielm nil 564 (defun ielm nil
547 "Interactively evaluate Emacs Lisp expressions. 565 "Interactively evaluate Emacs Lisp expressions.
548 Switches to the buffer `*ielm*', or creates it if it does not exist." 566 Switches to the buffer `*ielm*', or creates it if it does not exist."
549 (interactive) 567 (interactive)
550 (if (comint-check-proc "*ielm*") 568 (let (old-point)
551 nil 569 (unless (comint-check-proc "*ielm*")
552 (save-excursion 570 (with-current-buffer (get-buffer-create "*ielm*")
553 (set-buffer (get-buffer-create "*ielm*")) 571 (unless (eq (buffer-size) 0) (setq old-point (point)))
554 (inferior-emacs-lisp-mode))) 572 (inferior-emacs-lisp-mode)))
555 (pop-to-buffer "*ielm*") 573 (pop-to-buffer "*ielm*")
556 (goto-char (point-max))) 574 (when old-point (push-mark old-point))))
557 575
558 (provide 'ielm) 576 (provide 'ielm)
559 577
560 ;;; arch-tag: ef60e4c0-9c4f-4bdb-8402-271313329790 578 ;;; arch-tag: ef60e4c0-9c4f-4bdb-8402-271313329790
561 ;;; ielm.el ends here 579 ;;; ielm.el ends here